Hi,
I'm running metricbeat 6.2.2 using the official Docker image and have it configured to use the system and docker modules (see configuration below). I mapped the required volumes to /hostfs and my logstash is receiving messages from both modules. However, for the Docker module, the healthcheck metricset is missing. All other metric from the docker module are being sent without problems.
I checked the metricbeat logs with debug setting, and see that the [publish] entries contain the docker metricsets, except for the healthcheck. Looking at the logs (see below), the healthcheck module is started, it just doesn't seem to report anything. The logs do report an error, but I'm not sure if that's related:
|metricbeat_1 | 2018-03-01T08:46:09.837Z|ERROR|instance/metrics.go:69|Error while getting memory usage: error retrieving process stats|
|---|---|---|---|
|metricbeat_1 | 2018-03-01T08:46:09.840Z|ERROR|instance/metrics.go:113|Error retrieving CPU percentages: error retrieving process stats|
Any idea what I'm doing wrong here?
Thanks,
Thomas
My metricbeat.yml config:
metricbeat.modules:
- module: system
metricsets: ["cpu", "fsstat", "load", "memory"]
enabled: true
period: 60s
processes: ['.*']
- module: docker
metricsets: ["container", "cpu", "diskio", "healthcheck", "memory"]
hosts: ["unix:///hostfs/var/run/docker.sock"]
period: 60s
output.elasticsearch:
enabled: false
output.logstash:
enabled: true
hosts: ["xxxxxxxxxxxx:5044"]
The full log output:
metricbeat_1 | 2018-03-01T08:45:39.831Z INFO instance/beat.go:468 Home path: [/usr/share/metricbeat] Config path: [/usr/share/metricbeat] Data path: [/usr/share/metricbeat/data] Logs path: [/usr/share/metricbeat/logs]
metricbeat_1 | 2018-03-01T08:45:39.832Z DEBUG [beat] instance/beat.go:495 Beat metadata path: /usr/share/metricbeat/data/meta.json
metricbeat_1 | 2018-03-01T08:45:39.832Z INFO instance/beat.go:475 Beat UUID: c64d7621-e962-487a-a1f4-1126b95351df
metricbeat_1 | 2018-03-01T08:45:39.832Z INFO instance/beat.go:213 Setup Beat: metricbeat; Version: 6.2.2
metricbeat_1 | 2018-03-01T08:45:39.832Z DEBUG [beat] instance/beat.go:230 Initializing output plugins
metricbeat_1 | 2018-03-01T08:45:39.832Z DEBUG [processors] processors/processor.go:49 Processors:
metricbeat_1 | 2018-03-01T08:45:39.834Z INFO pipeline/module.go:76 Beat name: deployment-monitoring
metricbeat_1 | 2018-03-01T08:45:39.835Z DEBUG [processors] processors/processor.go:49 Processors:
metricbeat_1 | 2018-03-01T08:45:39.835Z DEBUG [processors] processors/processor.go:49 Processors:
metricbeat_1 | 2018-03-01T08:45:39.835Z INFO instance/beat.go:301 metricbeat start running.
metricbeat_1 | 2018-03-01T08:45:39.835Z DEBUG [module] module/wrapper.go:100 Starting Wrapper[name=system, len(metricSetWrappers)=4]
metricbeat_1 | 2018-03-01T08:45:39.836Z DEBUG [module] module/wrapper.go:100 Starting Wrapper[name=docker, len(metricSetWrappers)=5]
metricbeat_1 | 2018-03-01T08:45:39.836Z INFO [monitoring] log/log.go:97 Starting metrics logging every 30s
metricbeat_1 | 2018-03-01T08:45:39.836Z DEBUG [module] module/wrapper.go:146 system/cpu will start after 2.614424912s
metricbeat_1 | 2018-03-01T08:45:39.836Z DEBUG [module] module/wrapper.go:146 system/fsstat will start after 6.380252131s
metricbeat_1 | 2018-03-01T08:45:39.836Z DEBUG [module] module/wrapper.go:146 system/load will start after 3.676958315s
metricbeat_1 | 2018-03-01T08:45:39.836Z DEBUG [module] module/wrapper.go:146 system/memory will start after 2.709925784s
metricbeat_1 | 2018-03-01T08:45:39.836Z DEBUG [module] module/wrapper.go:146 docker/container will start after 1.864830474s
metricbeat_1 | 2018-03-01T08:45:39.836Z DEBUG [module] module/wrapper.go:146 docker/cpu will start after 6.846147598s
metricbeat_1 | 2018-03-01T08:45:39.836Z DEBUG [module] module/wrapper.go:146 docker/diskio will start after 4.704152646s
metricbeat_1 | 2018-03-01T08:45:39.836Z DEBUG [module] module/wrapper.go:146 docker/healthcheck will start after 7.408250999s
metricbeat_1 | 2018-03-01T08:45:39.836Z DEBUG [module] module/wrapper.go:146 docker/memory will start after 1.738964743s
metricbeat_1 | 2018-03-01T08:45:41.576Z DEBUG [module] module/wrapper.go:154 Starting metricSetWrapper[module=docker, name=memory, host=/hostfs/var/run/docker.sock]
metricbeat_1 | 2018-03-01T08:45:41.701Z DEBUG [module] module/wrapper.go:154 Starting metricSetWrapper[module=docker, name=container, host=/hostfs/var/run/docker.sock]
metricbeat_1 | 2018-03-01T08:45:42.451Z DEBUG [module] module/wrapper.go:154 Starting metricSetWrapper[module=system, name=cpu, host=]
metricbeat_1 | 2018-03-01T08:45:42.546Z DEBUG [module] module/wrapper.go:154 Starting metricSetWrapper[module=system, name=memory, host=]
metricbeat_1 | 2018-03-01T08:45:43.513Z DEBUG [module] module/wrapper.go:154 Starting metricSetWrapper[module=system, name=load, host=]
metricbeat_1 | 2018-03-01T08:45:44.541Z DEBUG [module] module/wrapper.go:154 Starting metricSetWrapper[module=docker, name=diskio, host=/hostfs/var/run/docker.sock]
metricbeat_1 | 2018-03-01T08:45:46.218Z DEBUG [module] module/wrapper.go:154 Starting metricSetWrapper[module=system, name=fsstat, host=]
metricbeat_1 | 2018-03-01T08:45:46.683Z DEBUG [module] module/wrapper.go:154 Starting metricSetWrapper[module=docker, name=cpu, host=/hostfs/var/run/docker.sock]
metricbeat_1 | 2018-03-01T08:45:47.245Z DEBUG [module] module/wrapper.go:154 Starting metricSetWrapper[module=docker, name=healthcheck, host=/hostfs/var/run/docker.sock]
metricbeat_1 | 2018-03-01T08:46:09.837Z ERROR instance/metrics.go:69 Error while getting memory usage: error retrieving process stats
metricbeat_1 | 2018-03-01T08:46:09.840Z ERROR instance/metrics.go:113 Error retrieving CPU percentages: error retrieving process stats
metricbeat_1 | 2018-03-01T08:46:09.841Z INFO [monitoring] log/log.go:124 Non-zero metrics in the last 30s {"monitoring": {"metrics": {"beat":{"info":{"ephemeral_id":"45993308-fe8b-4085-ab00-95d8c41f4233","uptime":{"ms":30030}},"memstats":{"gc_next":4488208,"memory_alloc":4107584,"memory_total":11721832}},"libbeat":{"config":{"module":{"running":0}},"output":{"events":{"acked":24,"batches":4,"total":24},"read":{"bytes":24},"type":"logstash","write":{"bytes":6550}},"pipeline":{"clients":2,"events":{"active":0,"published":24,"retry":7,"total":24},"queue":{"acked":24}}},"metricbeat":{"docker":{"container":{"events":5,"success":5},"cpu":{"events":5,"success":5},"diskio":{"events":5,"success":5},"memory":{"events":5,"success":5}},"system":{"cpu":{"events":1,"success":1},"fsstat":{"events":1,"success":1},"load":{"events":1,"success":1},"memory":{"events":1,"success":1}}},"system":{"cpu":{"cores":1},"load":{"1":0,"15":0.03,"5":0.04,"norm":{"1":0,"15":0.03,"5":0.04}}}}}}