Mk_docker.py not discovering anything?

I’m running 1.6.0p13 with a test docker host (also running latest agent and installed mk_docker.py):
from host CLI (ubuntu 16.0.4) I’m seeing the following, but check_mk discovery is not finding docker-related… any ideas?

/usr/lib/check_mk_agent/plugins# python mk_docker.py

<<<docker_node_info:sep(0)>>>

@docker_version_info{“PluginVersion”: “0.1”, “DockerPyVersion”: “4.2.2”, “ApiVersion”: “1.39”}

{“ContainersPaused”: 0, “Labels”: [“com.docker.security.apparmor=enabled”, “com.docker.security.seccomp=enabled”], “CgroupDriver”: “cgroupfs”, “ContainersRunning”: 7, “ProductLicense”: “this node is not a swarm manager - check license status on a manager node”, “ContainerdCommit”: {“Expected”: “bb71b10fd8f58240ca47fbb579b9d1028eea7c84”, “ID”: “bb71b10fd8f58240ca47fbb579b9d1028eea7c84”}, “InitBinary”: “docker-init”, “NGoroutines”: 170, “Swarm”: {“ControlAvailable”: false, “NodeID”: “roa2dm6rpw5o09lafcpyedged”, “Error”: “”, “RemoteManagers”: [{“NodeID”: “qwdw1fevxeej9ksaaiukp732i”, “Addr”: “10.70.73.32:2377”}, {“NodeID”: “f6ybuikr4mux7mm5old51lr0t”, “Addr”: “10.70.73.31:2377”}, {“NodeID”: “fg4c743wnzww9kmlcc2vhnfc3”, “Addr”: “10.70.73.33:2377”}], “LocalNodeState”: “active”, “NodeAddr”: “10.70.73.53”}, “LoggingDriver”: “json-file”, “OSType”: “linux”, “HttpProxy”: “”, “Runtimes”: {“runc”: {“path”: “runc”}}, “DriverStatus”: [[“Backing Filesystem”, “extfs”], [“Supports d_type”, “true”], [“Native Overlay Diff”, “true”]], “OperatingSystem”: “Ubuntu 16.04.6 LTS”, “Containers”: 12, “HttpsProxy”: “”, “BridgeNfIp6tables”: true, “MemTotal”: 540693004288, “Warnings”: [“WARNING: No swap limit support”], “SecurityOptions”: [“name=apparmor”, “name=seccomp,profile=default”], “Driver”: “overlay2”, “IndexServerAddress”: “https://index.docker.io/v1/”, “ClusterStore”: “”, “InitCommit”: {“Expected”: “fec3683”, “ID”: “fec3683”}, “GenericResources”: null, “Isolation”: “”, “SystemStatus”: null, “OomKillDisable”: true, “ClusterAdvertise”: “”, “SystemTime”: “2020-07-14T10:49:40.01276728+08:00”, “Name”: “sha2upp-dock12”, “CPUSet”: true, “RegistryConfig”: {“AllowNondistributableArtifactsCIDRs”: [], “Mirrors”: [], “IndexConfigs”: {“docker.io”: {“Official”: true, “Name”: “docker.io”, “Secure”: true, “Mirrors”: []}}, “AllowNondistributableArtifactsHostnames”: [], “InsecureRegistryCIDRs”: [“127.0.0.0/8”]}, “DefaultRuntime”: “runc”, “ContainersStopped”: 5, “NCPU”: 72, “NFd”: 98, “Architecture”: “x86_64”, “KernelMemory”: true, “CpuCfsQuota”: true, “Debug”: false, “ID”: “U2G7:M2QR:MQHD:CKGA:LKYZ:FRM4:MMQS:CAAX:QJ56:SKWO:5GWB:YQI5”, “IPv4Forwarding”: true, “KernelVersion”: “4.19.0-041900-generic”, “BridgeNfIptables”: true, “NoProxy”: “”, “LiveRestoreEnabled”: false, “ServerVersion”: “18.09.11”, “CpuCfsPeriod”: true, “ExperimentalBuild”: true, “MemoryLimit”: true, “SwapLimit”: false, “Plugins”: {“Volume”: [“local”], “Network”: [“bridge”, “host”, “ipvlan”, “macvlan”, “null”, “overlay”], “Authorization”: null, “Log”: [“awslogs”, “fluentd”, “gcplogs”, “gelf”, “journald”, “json-file”, “local”, “logentries”, “splunk”, “syslog”]}, “Images”: 27, “DockerRootDir”: “/var/lib/docker”, “NEventsListener”: 4, “CPUShares”: true, “RuncCommit”: {“Expected”: “2b18fe1d885ee5083ef9f0838fee39b62d653e30”, “ID”: “2b18fe1d885ee5083ef9f0838fee39b62d653e30”}}

<<<docker_node_disk_usage:sep(0)>>>

@docker_version_info{“PluginVersion”: “0.1”, “DockerPyVersion”: “4.2.2”, “ApiVersion”: “1.39”}

{“count”: 27, “active”: 5, “type”: “images”, “reclaimable”: 2330839616, “size”: 3059699350}

{“count”: 12, “active”: 7, “type”: “containers”, “reclaimable”: 4436, “size”: 13143}

{“count”: 13, “active”: 13, “type”: “volumes”, “reclaimable”: 0, “size”: 3083}

{“count”: 0, “active”: 0, “type”: “buildcache”, “reclaimable”: 0, “size”: 0}

<<<docker_node_images:sep(0)>>>

@docker_version_info{“PluginVersion”: “0.1”, “DockerPyVersion”: “4.2.2”, “ApiVersion”: “1.39”}

[[[images]]]

First question. Is this output also included in your agent output on the monitoring server?
You can test this inside the gui with the “Download agent output” button behind the “Check_MK” service or on the command line with “cmk -d hostname”.

Hi

the agent output doesn’t seem to contain the previously pasted info that was generated from CLI.
I also checked using strings /tmp/check_mk/cache/hostxx | | grep “<<<docker” but no output…

You are sure that the agent is executing the Docker plugin?
Is the executable flag set on the “mk_docker.py” script?

thanks I believe that was the missing piece =) discovery found the docker services
now I need to understand how to monitor the containers

ok got it!!

agent installed
plugin installed and executable

docker services discovered
then check ~/tmp/check_mk/piggyback/ for

manually add to check_mk as a monitored host,
specifying no IP address and ensuring piggyback is enabled (by default yes)
once added, do service discovery on the new monitored host…

thanks!

Hi

I added a few containers and they are discovering… but I’m also getting these alerts:
host level alert – (for individual containers)
check_icmp: No hosts to check

service level alert (for individual containers)
CRIT - no unmonitored services found, no vanished services found, no new host labels, [agent] Host as no IP address configured. CRIT

do I need to apply a rule to stop checking for IP address?

ok I think I solved this by changing containerized host property to “no agent” and then updating host label/rediscovery.

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