Metricbeat docker fail to start under not a root user

Hi Team,
Task is set-up Docker containers monitoring using Metricbeat container.
I am following YAML file as mentioned in this article and trying to use my metricbeat.docker.yml but not able to use --user=root as I am getting error :grimacing: :

Exiting: error loading config file: config file ("metricbeat.yml") must be owned by the beat user (uid=0) or root

In case when I use --user=$(id -u) , I am getting error:

/usr/local/bin/docker-entrypoint: line 13: metricbeat: command not found

What you would recommend (if i am not able to use root user)?

Command looks like this:
docker run -it
--user=$(id -u)
mydockerhub/beats/metricbeat-oss:6.6.2 metricbeat -e
-E output.elasticsearch.hosts=["my-host"]

Solved with:

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