

I've seen some logs getting lost in the past while using Logstash alone. The biggest advantage of having Filebeat is that, even if the Logstash server is down, it keeps on retrying. We can manage all the pipelines to process logs centrally on a single server.But I generally prefer it to be on a different server because: Logstash can be on the same or different servers. This Filebeat is sending logs to the Logstash server that is being used to process/transform the logs and sends them to Elasticsearch. You can see that we are using Filebeat (or any other Beats) on the main server where our application is adding logs to the log file(s). Let's understand this using the architecture: Image Source: logz.io But after using both of them alone and together in several projects I got to know the differences and I started using both of them together only. It felt like they both are doing the same things: They both can read from a file, convert JSON string logs to JSON, add extra fields if needed, etc. When I was setting this up for the first time, I was very confused between these two.

Why do we need both Filebeat and Logstash?
FILEBEATS CONFIGURATION HOW TO
There are a lot of blogs and video tutorials on how to set up Filebeat and Logstash with self-hosted Elasticsearch.
