Hello,
We too have the exact same issue as mblower. Upon replacing the check_docker.py file there is no longer a callback error, but the resulting check is invalid.
For example:
I have one docker container running at the moment:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
69527ab31b70 jupyterhub/jupyterhub "jupyterhub" 14 minutes ago Up 14 minutes 8000/tcp competent_brahmagupta
However the updated check_docker.py script indicates it is not running:
WARNING: 0 running, 40 not running, containers not running: ['/competent_brahmagupta', '/brave_turing', '/angry_kapitsa', '/zen_shtern', '/hungry_shannon', '/nervous_sanderson', '/wizardly_dijkstra', '/admiring_agnesi', '/boring_montalcini', '/elastic_men
Here is the information with the debug command:
[root@nagiosxi libexec]# /usr/local/nagios/libexec/check_docker.py -H
http://hostname:4243/ --check-type 'containers_running' --debug
all
{'total_usage': []}
End selection + type
hit threshold_string_to_tuple
hit threshold_string_to_tuple
hit get_all_container_IDs
hit get_all_containers
hit talk_to_docker
curl '
http://hostname:4243/containers/json?&all=1' -g -f
hit do_check
hit check_containers_running
hit talk_to_docker
curl '
http://hostname:4243/containers/json?&all=true' -g -f
hit process_value
hit process_counter
hit check_all_values_against_thresholds
hit check_against_thresholds
hit check_against_threshold
hit check_against_threshold
hit nagios_exit
OK: 0 running, 40 not running | total_usage=0;50;75
If I manually curl that curl '
http://hostnamer:4243/containers/json?&all=1' -g -f I do indeed get data back, and visiting
http://hostname:4243/containers/json?all=true shows thae state of the container running.
Hope this helps.
EDIT-----Found the culprit for check_containers_running -- line 681 in check_docker.py needs to be if container["State"] == "running": instead of if container["State"] == "
Running":