The only issue I have is that the command "docker logs " does not show any log. It seems that this appears because of the -system.hostfs=/hostfs parameter.
Is it a normal behaviour ? Sorry if it's an obvious topic...
Thanks in advance.
I don't think this has any relationship with -system.hostfs parameter. docker logs only shows the logs printed to standard output/error, metricbeat logs to file by default, this is something that can be changed by config, but in your case you probably have enough with using the -e parameter (after -system.hostfs=/hostfs) that makes metricbeat to log to standard error ignoring other logging outputs.
Thanks for your reply. Let me elaborate why I mentionned this parameter:
When I run : docker run --mount type=bind,source=/proc,target=/hostfs/proc,readonly --mount type=bind,source=/sys/fs/cgroup,target=/hostfs/sys/fs/cgroup,readonly --mount type=bind,source=/,target=/hostfs,readonly --net=host docker.elastic.co/beats/metricbeat:6.4.0
I have the logs in the console.
When I run: docker run --mount type=bind,source=/proc,target=/hostfs/proc,readonly --mount type=bind,source=/sys/fs/cgroup,target=/hostfs/sys/fs/cgroup,readonly --mount type=bind,source=/,target=/hostfs,readonly --net=host docker.elastic.co/beats/metricbeat:6.4.0 -system.hostfs=/hostfs
I do NOT have the logs in the console.
As you can see, the system.hostfs=/hostfs is the only difference in the command.
Oh, I see. The thing is that -e parameter is passed to metricbeat by default. If you set other parameters they are used instead, so if you want to keep the logs this way you need to add -e too:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.