How to configure metricbeat helm chart to output to elasticsearch?

1/9/2019

I'm trying to install metricbeat helm chart to forward my kubernetes metrics to elasticsearch.

Default configuration works but when I configure output to elasticsearch, the pod tell me

Exiting: error unpacking config data: more than one namespace configured accessing 'output' (source:'metricbeat.yml')

I download the values.yaml and modify output.file in both daemonset and deployment from

output.file:
  path: "/usr/share/metricbeat/data"
  filename: metricbeat
  rotate_every_kb: 10000
  number_of_files: 5

to

output.file:
  enable: false
output.elasticsearch:
  enable: true
  hosts: ["http://192.168.10.156:9200/"]

How do I modify the config to forward metrics to elasticsearch?

-- Leisen Chang
elasticsearch
kubernetes
kubernetes-helm
metricbeat

1 Answer

1/9/2019

According to the fine manual, the property is actually enabled: not enable: so I would presume you actually want:

output.file:
  enabled: false

Although to be honest, I always thought you could have as many outputs as you wish, but that is clearly not true

-- mdaniel
Source: StackOverflow