Hi,
can i use multiple logstash servers in filebeat.My requirement is, if one logstash server gets down another server needs to be take responsibilty with out loss and duplicate of logs data.
will it be done with filebeat?
Thanks in advance
Hi,
can i use multiple logstash servers in filebeat.My requirement is, if one logstash server gets down another server needs to be take responsibilty with out loss and duplicate of logs data.
will it be done with filebeat?
Thanks in advance
filebeat supports loadbalancing and/or failover. But it can not guarantee no duplicates, as filebeat has send-at-least-once semantics. Guaranteeing no duplication would require some non-trivial coordination on protocol level and between logstash instances. Or document IDs used to index-or-update documents in ES.
Thanks Steffens for your reply,
can you please provide a sample filebeat configuration code with multiple logstash servers.
Hi steffens,
I have been working on Logstash with kafka.I am seeing different behaviour of Logstash while pushing messages into kafka.
Requirement:
I will get different files continously in a location assume /tmp/input-logs/ . all are with extension .log.I have to push the messages of that files to a topic(stagin-topic) in kafka broker lets say 10.0.24.33:9092.Later kafka consmer will consumes the messages from topic and display.
Some times i will restart logstash, then i want to get latest data without duplicate and loss.
Code I have written for logstash
input
{
file {
path => "/file0/file1/logstash-input-logs/*.log"
start_position => "end"
sincedb_path => "/file0/file1/logstash-conf/input.sincedb"
}
}
output {
kafka {
codec => plain {
format => "%{message}"
}
bootstrap_servers => "10.0.24.23:9092"
topic_id => "staging-topic"
}
}
Problems I got
If i put start_postion => "beginning".It is working fine untill we stop logstash while it is writing data to kafka.When we start logstash again then it
reads data from all files.
If i put start_postion => "end". Logstash not writes complete data to kafka ex: I have 100000 records in 20 files, but while consuming from zookeeper topic i can
able to get only 40000 or 25000 and sometimes it is 60000.
When i increased pipeline workers count from default 8 to 30.I am able to get all messages but if we restart logstash it is ignoring the messages which are not sent
kafka.
please suggest for best solution to my requirement.
Thanks
regarding logstash+kafka issues, please ask in logstash forum.
beginning
(always use offset 0 on start) or end
(always start at end of file - like tail -f
) as start position, ignores the last offset processed.This topic was automatically closed after 21 days. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
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.