Hi There,
I have configured rabbitmq as a broker for reliability, below is my configuration:
input {
udp {
port => 5114
type => "syslog.imq"
}
}
output {
if [type] == "syslog.imq" {
rabbitmq {
key => "mykey"
exchange => "myex"
exchange_type => "direct"
user => "username"
password => "password"
host => "127.0.0.1"
port => 5672
durable => true
persistent => true
}
}
}
input {
rabbitmq {
host => "127.0.0.1"
queue => "myq"
durable => true
key => "mykey"
exchange => "myex"
threads => 1
prefetch_count => 50
port => 5672
user => "user"
password => "password"
type => "syslog.raw"
tags => "syslog.input"
tags => "ti.pending"
}
}
filter {
if "syslog.input" in [tags] {
# formatting commands
mutate {
remove_tag => "syslog.input"
add_tag => "syslog.output"
}
}
}
output {
if "syslog.output" in [tags] {
elasticsearch{
hosts => "localhost:9200"
action => "index"
index => "myfile-%{+YYYY.MM.dd}"
template => "/etc/logstash/file1.json"
template_name => "myfile-*"
manage_template => "true"
template_overwrite => "true"
}
}
}
Problem: One message is being repeatedly sent to Elasticsearch.
There are no errors in logstash and elasticsearch log files.
Please help me.
Regards,
Jay