[英]Filebeat vs Directly pushing logs to logstash from application
I am planning to architect a centralized logging system for one of our project which has multiple components written in Java, Python & Scala.我计划为我们的一个项目构建一个集中式日志系统,该项目具有多个用 Java、Python 和 Scala 编写的组件。 I want to collect logs from different parts ( REST Server, Spark Jobs, Airflow server ) to logstash and index into Elastic search.
我想从不同部分(REST 服务器、Spark 作业、Airflow 服务器)收集日志到 logstash 并索引到弹性搜索中。 I could see there are direct libraries in both Python & Java logging modules to push logs directly to logstash from application.
我可以看到Python和Java日志记录模块中都有直接库,可以将日志直接从应用程序推送到 logstash。 And I could see filebeat which can be configured on servers to push logs to logstash from files.
我可以看到 filebeat,它可以在服务器上配置以将日志从文件推送到 logstash。 What is the advantage of having filebeat rather than sending logs directly to logstash?
使用 filebeat 而不是直接将日志发送到 logstash 有什么好处? What is the best practice?
最佳做法是什么?
Here are a few pros and cons of both approaches:以下是这两种方法的一些优缺点:
Pros:优点:
Cons:缺点:
Pros:优点:
Cons:缺点:
Filebeat and other beats can directly send the message to ES but there are addition advantages while using logstash. Filebeat等beats可以直接将消息发送给ES,但是使用logstash还有其他优势。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.