【发布时间】:2020-03-17 10:03:38
【问题描述】:
我不希望 filebeat 向 elasticsearch 报告任何指标。
启动守护程序集后,我可以看到以下消息:
2020-03-17T09:14:59.524Z INFO [monitoring] log/log.go:118 Starting metrics logging every 30s
如何禁用它?
基本上我认为我需要的是logging.metrics.enabled: false 还是monitoring.enabled: false ?
我就是不能让它工作。我不知道该放在哪里。 documentation 只是说将其放入我的 filebeat.yaml 的日志记录部分。所以我将它添加到与“filebeat.inputs”相同的意图级别。没有成功... - 我需要把它放在哪里?还是我正在查看的配置设置完全错误?
https://raw.githubusercontent.com/elastic/beats/master/deploy/kubernetes/filebeat-kubernetes.yaml
---
apiVersion: v1
kind: ConfigMap
metadata:
name: filebeat-config
namespace: kube-system
labels:
k8s-app: filebeat
data:
filebeat.yml: |-
filebeat.inputs:
- type: container
paths:
- /var/log/containers/*.log
processors:
- add_kubernetes_metadata:
host: ${NODE_NAME}
matchers:
- logs_path:
logs_path: "/var/log/containers/"
# To enable hints based autodiscover, remove `filebeat.inputs` configuration and uncomment this:
#filebeat.autodiscover:
# providers:
# - type: kubernetes
# node: ${NODE_NAME}
# hints.enabled: true
# hints.default_config:
# type: container
# paths:
# - /var/log/containers/*${data.kubernetes.container.id}.log
processors:
- add_cloud_metadata:
- add_host_metadata:
cloud.id: ${ELASTIC_CLOUD_ID}
cloud.auth: ${ELASTIC_CLOUD_AUTH}
output.elasticsearch:
hosts: ['${ELASTICSEARCH_HOST:elasticsearch}:${ELASTICSEARCH_PORT:9200}']
username: ${ELASTICSEARCH_USERNAME}
password: ${ELASTICSEARCH_PASSWORD}
logging.metrics.enabled: false
---
【问题讨论】:
标签: elasticsearch kubernetes filebeat