Airflow 如何将气流日志写入Elasticsearch?

Airflow 如何将气流日志写入Elasticsearch?,airflow,airflow-scheduler,Airflow,Airflow Scheduler,我使用的是气流1.10.5。似乎找不到关于如何使用Elasticsearch设置远程日志记录的完整文档或示例。我看到了,但没用。我正在尝试将气流(非任务)日志写入ES。据我所知,ES日志处理程序只能从ES读取。您必须设置日志以打印到文件中,然后使用filebeat之类的工具将文件内容发布到ES,然后Airflow可以将其读回 将日志写入Elasticsearch 气流可配置为读取任务 从Elasticsearch记录日志,并可选择将日志写入 标准或json格式。这些日志可以在以后收集并保存 使

我使用的是
气流1.10.5
。似乎找不到关于如何使用Elasticsearch设置远程日志记录的完整文档或示例。我看到了,但没用。我正在尝试将气流(非任务)日志写入ES。

据我所知,ES日志处理程序只能从ES读取。您必须设置日志以打印到文件中,然后使用filebeat之类的工具将文件内容发布到ES,然后Airflow可以将其读回

将日志写入Elasticsearch

气流可配置为读取任务 从Elasticsearch记录日志,并可选择将日志写入 标准或json格式。这些日志可以在以后收集并保存 使用fluentd等工具转发至Elasticsearch群集, logstash或其他


我能够通过使用
[filebeat][1]
shipper实现

filebeat.yml中输入配置部分

</snip>

# ============================== Filebeat inputs ===============================

filebeat.inputs:

# Each - is an input. Most options can be set at the input level, so
# you can use different inputs for various configurations.
# Below are the input specific configurations.

- type: log

  # Change to true to enable this input configuration.
  enabled: true

  # Paths that should be crawled and fetched. Glob based paths.
  paths:
    - /path/to/logs/*.log

</snip>
<snip>
# ---------------------------- Elasticsearch Output ----------------------------
output.elasticsearch:
  # Array of hosts to connect to.
  hosts: ["localhost:9200"]

  # Protocol - either `http` (default) or `https`.
  #protocol: "https"

  # Authentication credentials - either API key or username/password.
  #api_key: "id:api_key"
  username: "elastic"
  password: "changeme"

</snip>

很好阅读,尤其是关于Estation-->ES的内容。

阅读elasticsearch文档部分有史以来最差的标题: