I have metricbeat running inside a docker container, and have been able to successfully get docker and ES stack monitored. I'm trying to extend the monitoring to the system. However, I'm unable to see any of the system stats.
The base os is Ubuntu. My ES version is 8.11.0.
Here is how my module file looks:
- module: system
metricsets:
- cpu # CPU usage
- load # CPU load averages
- memory # Memory usage
- network # Network IO
- process # Per process metrics
- process_summary # Process summary
- uptime # System Uptime
- socket_summary # Socket summary
- core # Per CPU core usage
- diskio # Disk IO
- filesystem # File system usage for each mountpoint
- fsstat # File system summary metrics
- raid # Raid
- socket # Sockets and connection info (linux only)
- service # systemd service information
enabled: true
period: 10s
processes: [".*"]
# Configure the mount point of the host’s filesystem for use in monitoring a host from within a container
hostfs: "/hostfs"
This is a portion of my docker-compose file that pertains to metricbeat
metricbeat-01:
....
....
restart: unless-stopped #.................................................................. Restarts on reboot and crashes
networks:
- elastic-network #.................................................................... Needs to talk to elastic
user: "0" #>........................................................................... Run as root
volumes:
- ${PATH_MODULE_METRICBEAT_NODE01_CONFIG}/metricbeat.yml:/usr/share/metricbeat/metricbeat.yml:ro
- ${PATH_MODULE_METRICBEAT_NODE01_CONFIG}/modules.d:/usr/share/metricbeat/modules.d:ro
- ${PATH_MODULE_METRICBEAT_NODE01_DATA}/metricbeat-01:/usr/share/metricbeat/data
- /proc:/hostfs/proc:ro
- /sys/fs/cgroup:/hostfs/sys/fs/cgroup:ro
- /:/hostfs:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
The metricbeat container logs indicate the following:
{"log.level":"debug","@timestamp":"2023-11-30T13:54:41.764+0530","log.logger":"cfgfile","log.origin":{"file.name":"cfgfile/cfgfile.go","file.line":204},"message":"Load config from file: /usr/share/metricbeat/modules.d/system.yml","service.name":"metricbeat","ecs.version":"1.6.0"}
{"log.level":"debug","@timestamp":"2023-11-30T13:54:41.765+0530","log.logger":"cfgfile","log.origin":{"file.name":"cfgfile/reload.go","file.line":212},"message":"Number of module configs found: 1","service.name":"metricbeat","ecs.version":"1.6.0"}
{"log.level":"debug","@timestamp":"2023-11-30T13:54:41.765+0530","log.logger":"reload","log.origin":{"file.name":"cfgfile/list.go","file.line":92},"message":"Starting reload procedure, current runners: 0","service.name":"metricbeat","ecs.version":"1.6.0"}
{"log.level":"debug","@timestamp":"2023-11-30T13:54:41.765+0530","log.logger":"reload","log.origin":{"file.name":"cfgfile/list.go","file.line":110},"message":"Start list: 1, Stop list: 0","service.name":"metricbeat","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2023-11-30T13:54:41.769+0530","log.origin":{"file.name":"filesystem/filesystem.go","file.line":70},"message":"Ignoring filesystem types: sysfs, tmpfs, bdev, proc, cgroup, cgroup2, cpuset, devtmpfs, configfs, debugfs, tracefs, securityfs, sockfs, bpf, pipefs, ramfs, hugetlbfs, devpts, ecryptfs, fuse, fusectl, efivarfs, mqueue, resctrl, pstore, autofs, binfmt_misc, overlay, aufs","service.name":"metricbeat","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2023-11-30T13:54:41.770+0530","log.logger":"system.fsstat","log.origin":{"file.name":"fsstat/fsstat.go","file.line":60},"message":"Ignoring filesystem types: %ssysfs, tmpfs, bdev, proc, cgroup, cgroup2, cpuset, devtmpfs, configfs, debugfs, tracefs, securityfs, sockfs, bpf, pipefs, ramfs, hugetlbfs, devpts, ecryptfs, fuse, fusectl, efivarfs, mqueue, resctrl, pstore, autofs, binfmt_misc, overlay, aufs","service.name":"metricbeat","ecs.version":"1.6.0"}
{"log.level":"warn","@timestamp":"2023-11-30T13:54:41.873+0530","log.logger":"cfgwarn","log.origin":{"file.name":"service/service.go","file.line":61},"message":"BETA: The system service metricset is beta.","service.name":"metricbeat","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2023-11-30T13:54:41.873+0530","log.logger":"reload","log.origin":{"file.name":"cfgfile/list.go","file.line":138},"message":"Error creating runner from config: 1 error: error connecting to dbus: dial unix /run/systemd/private: connect: no such file or directory","service.name":"metricbeat","ecs.version":"1.6.0"}
I'm not sure what else I'm missing. Kindly advice