Metricsbeat on docker swarm: how to monitor host/system stats?

Hi,

The relevant section of my docker compose file looks like this:

user: root
deploy:
  mode: global
volumes:
  - /proc:/hostfs/proc:ro
  - /sys/fs/cgroup:/hostfs/sys/fs/cgroup:ro
  - /:/hostfs:ro
  - ./metricbeat.yml:/usr/share/metricbeat/metricbeat.yml
  - /var/run/docker.sock:/var/run/docker.sock:ro

However, the sample dashboard '[Metricbeat System] Host overview' is showing the container's statistics and processes. How can I make it monitor the host?

The only setting I've not been able to apply is the "network_mode: host" at the composer since it's not supported in docker swarm and composer v3.

thanks!

I was missing something! -system.hostfs=/hostfs

command: --strict.perms=false -e -system.hostfs=/hostfs

So the only issue left is that reported interfaces belong to the metricbeat container and not to the host, due to the fact that "network_mode host" can't be used in my setup. Any comments regarding this will be appreciated!

Hi @gianpietro,

I believe that currently host network is the only way to achieve this, could you please open a new enhancement request under https://github.com/elastic/beats/issues?

Best regards

Hi @exekias, just did, thank you!

Regards,
Gianpietro

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