Example: File to AMQP - sipcapture/paStash GitHub Wiki
AMQP
PaStash natively support AMQP exchange such as RabbitMQ (required) for distribution and queuing of data and messages.
Log Agent(s)
Send messages with topic test on exchange pastash
input {
file {
path => "/var/log/nginx/access.log"
}
}
output {
amqp {
host => log_server
port => 5672
exchange_name => pastash
topic => test
}
}
Log Server
Receive messages from topic test on exchange pastash
input {
amqp {
host => localhost
port => 5672
exchange_name => pastash
topic => test
}
}
output {
stdout {}
}
Multiple AMQP Exchanges
Send messages with topic test on exchange pastash
input {
file {
path => "/var/log/nginx/access.log"
}
}
output {
if [type] == nginx {
amqp {
host => log_server_1
port => 5672
exchange_name => pastash
topic => test
}
} else {
amqp {
host => log_server_2
port => 5672
exchange_name => pastash
topic => test
}
}
}