I have two running containers inside docker hosts. I am using check_docker.py plugin to do attached checks but the output is not ok.
CRITICAL: 100.000000% of containers (2/2) running (how critical if running normally)
CRITICAL: 0.000000% of containers (0/2) healthy (the two containers are healthy but output shows the opposite)
checking cpu and memory give the following error message.(No output on stdout) stderr: Traceback (most recent call last):
File "/usr/local/nagios/libexec/check_docker.py", line 888, in <module>
_ = main()
File "/usr/local/nagios/libexec/check_docker.py", line 861, in main
(out, value) = do_check(ID_list) # Gives plugin output and a number/dict{str:int}
File "/usr/local/nagios/libexec/check_docker.py", line 849, in do_check
(out,value) = valid_checks[options.check_type][0](ID_list)
File "/usr/local/nagios/libexec/check_docker.py", line 690, in check_containers_memory
if 'usage' in json_object['memory_stats'].keys() and 'limit' in json_object['memory_stats'].keys():
TypeError: list indices must be integers, not str