Loading configmap in k8s has error "exec metricbeat no found"

I deployed the metricbeat docker on kubernetes, the metricbeat.yml is in configmap. When the pod starts, came across an CrashLoopBackOff error:
"/usr/local/bin/docker-entrypoint: line 8: exec: metricbeat: not found"

the yml doesn't matter here as the error appeared with an empty configmap. Certainly, no configmap, no error appeared.

I guess the error is there as docker entrypoint run the metricbeat command to init? However, the error wasnt seen in docker running, weird!

Can anyone know if the metricbeat command running when container starting, please?

My deployment definition:

Hi @Yveseirean,

I think you are overriding Metricbeat binary path (/usr/share/metricbeat) with your own volume :slight_smile: I guess you are trying to chagne default metricbeat.yml? Could you explain your use case?

You may want to use --path.config to override default config folder, and put your metricbeat.yml there.

Thanks @exekias

Yes, I thought the configmap able to overwrite the default metricbeat.yml, but it cannot

After specify the customer folder, have to clarify the value of setup.template.fields: "fields.yml" if it keeps by default

Thank you again!

one thing:
If add loading dashboard into configmap, the pod could fail as
Exiting: Error importing Kibana dashboards: fail to import the dashboards in Elasticsearch: Error importing directory /usr/share/metricbeat/kibana: Failed to import dashboard: Failed to load directory /usr/share/metricbeat/kibana/5.x/dashboard:
error loading /usr/share/metricbeat/kibana/5.x/dashboard/Metricbeat-Rabbitmq.json: open /usr/share/metricbeat/kibana/5.x/visualization/RabbitMQ-Memory-Usage.json: no such file or directory

So have to manually run this cli to avoid the pod clashed

You should point that one to the original fields (under /usr/share/metricbeat/fields.yml), as it contains all field mapping definitions that will be pushed to Elasticsearch for event mapping.

Thanks for the Dashboards report, we are looking into it

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.