I am planning to architect a centralized logging system for one of our project which has multiple components written in Java, Python & Scala. I want to collect logs from different parts ( REST Server, Spark Jobs, Airflow server ) to logstash and index into Elastic search. I could see there are direct libraries in both Python & Java logging modules to push logs directly to logstash from application. And I could see filebeat which can be configured on servers to push logs to logstash from files. What is the advantage of having filebeat rather than sending logs directly to logstash? What is the best practice?
Here are a few pros and cons of both approaches:
Pros:
Cons:
Pros:
Cons: