I'm trying to send log messages from MinIO object storage to RabbitMQ and then from RabbitMQ to Logstash input. The problem is that messages are recieved correctly, but they are always indexed in Elasticsearch as two documents with the same content except document ID.
Duplication also happens if i do test message publish from RabbitMQ GUI to the defined queue, so i guess MinIO is not the problem. Also in RabbitMQ GUI i see that there is only one message recieved in exchange and only one message pushed to queue, so i guess RabbitMQ is working fine also?
You get two copies of the events but you have three copies of logstash?
If so I would start by modifying the logstash configurations to always add the hostname where logstash is running. Then review the events. Do the duplicates only come from one host?
That said, this really sounds like a RabbitMQ question. If you have a single queue then messages are load balanced across clients. If you have multiple queues and a fanout or topic then the same message will go to multiple queues and therefore multiple clients.
Are you pointing path.config at a directory? If so, is it possible you have a second output configured in another file? logstash.conf.bak and logstash.conf, for example. logstash will read every file in the directory and concatenate them.
I have 3 logstash instances behind haproxy loadbalancer and pacemaker cluster.
MinIO is sending messages to Haproxy RabbitMQ VIP. RabbitMQ is configured in 3 node cluster with queue mirror. There is single exchange with MinIO and it is binded to single queue for logstash. I have configured logstash now for direct queue type and the problem is still happening.
I event tried to shutdown haproxy and PCS cluster and try to send only to single logstash instance directly and the duplicate problem is still happening.
Well i removed output from the second file and i get only single message now
I guess i didn't understand how logstash works with multiple config files...
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.