简体   繁体   English

使用 Logstash 将 airflow 日志传递给 Elasticsearch

[英]Using Logstash to pass airflow logs to Elasticsearch

When using logstash to retrieve airflow logs from a folder you have access to, would I still need to make any changes in the airflow.cfg file?当使用 logstash 从您有权访问的文件夹中检索 airflow 日志时,我还需要在 airflow.cfg 文件中进行任何更改吗?

For instance, I have airflow and ELK deployed on same ec2 instance.例如,我将 airflow 和 ELK 部署在同一个 ec2 实例上。 The logstash.conf file has access to the airflow logs path since they are on the same instance. logstash.conf 文件可以访问 airflow 日志路径,因为它们位于同一实例上。 Do I need to turn on remote logging in airflow config?我是否需要在 airflow 配置中打开remote logging

In fact you have two options to push airflow logs to Elastic Search:实际上,您有两个选项可以将 airflow 日志推送到 Elastic Search:

  1. Using a log collector (logstash, fluentd, ...) to collect Airflow log then send it to Elastic Search server, in this case you don't need to change any Airflow config, you can just read the logs from the files or stdout and send it to ES.使用日志收集器(logstash,fluentd,...)收集 Airflow 日志,然后将其发送到 Elastic Search 服务器,在这种情况下,您无需更改任何 Airflow 配置,只需从文件或标准输出中读取日志并将其发送给 ES。
  2. Using Airflow remote logging feature, in this case Airflow will log directly to your remote logging server (ES in your case), and will store a local version of this log to show it when the remote server is unavailable.使用 Airflow 远程日志功能,在这种情况下 Airflow 将直接登录到您的远程日志服务器(在您的情况下为 ES),并将存储此日志的本地版本以在远程服务器不可用时显示它。

So the answer to your question is no, if you have a logstash, you don't need Airflow remote logging config所以你的问题的答案是否定的,如果你有一个logstash,你不需要Airflow remote logging配置

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM