【问题标题】:Automated Setup of Kibana and Elasticsearch with Filebeat Module in Elastic Cloud for Kubernetes (ECK)在 Elastic Cloud for Kubernetes (ECK) 中使用 Filebeat 模块自动设置 Kibana 和 Elasticsearch
【发布时间】:2022-01-17 23:06:31
【问题描述】:

我正在试用 K8s Operator(又名 ECK),到目前为止,一切都很好。

但是,我想知道正确的模式是什么,例如,使用 Apache 模块配置 Kibana 和 Elasticsearch。

我知道我可以临时使用:

filebeat setup --modules apache2 --strict.perms=false \
  --dashboards --pipelines --template \
  -E setup.kibana.host="${KIBANA_URL}"

但是自动化的方法是什么?我看到了Kibana dashboard portion of it 的一些文档,但其余的(管道等)呢?

注意:在某些时候,我可能最终会为 K8s 集群运行节拍,但我还没有到那个阶段。目前,我只想设置 Elasticsearch/Kibana 并添加 Apache 模块,以便外部 Apache 服务的 Filebeats 可以正确摄取/显示。

仅供参考,我目前使用的是 Elastic 堆栈的 6.8 版。

【问题讨论】:

    标签: elasticsearch kibana elastic-stack filebeat


    【解决方案1】:

    您可以尝试使用基于标签的方法进行自动发现。

    config:
    filebeat.autodiscover:
     providers:
      - type: kubernetes
        hints.default_config.enabled: "false"
        templates:
          - condition.contains:
            kubernetes.labels.app: "apache"
        config:
        - module: apache
          access:
            enabled: true
            var.paths: ["/path/to/log/apache/access.log*"]
          error:
            enabled: true
            var.paths: ["/path/to/log/apache/error.log*"]
    

    【讨论】:

    • 感谢您的回复。看起来这实际上是在配置 Filebeat,而不是只是为 Kibana 和 Elasticsearch 准备 Filebeats。正在记录的服务还没有在 K8s 上,所以我认为这个答案不是我想要的(还)。不过,如果我误解了,请告诉我。
    猜你喜欢
    • 2020-03-28
    • 2023-01-30
    • 2018-05-09
    • 1970-01-01
    • 2021-01-17
    • 1970-01-01
    • 2013-05-06
    • 2021-06-21
    • 1970-01-01
    相关资源
    最近更新 更多