I'm trying to monitor the docker. Unfortunately it is not working as expected. I went through many of the related forum query but none of them was able to resolve my case.
Attaching the screen shot of service status of my server from my Nagios XI.
One of the service alert is showing OK status but status information is not present. Below is the cmd o/p from the terminal.
Code: Select all
[e5613751@avgdlnxvp126 libexec]$ ./check_docker.py -H https://10.173.14.214:2376/ --check-type 'containers_cpu' -C 'AGASPCTNVT0009-*******-mcm4387-151074492723' -t 30 --networks-use-avg -w '90:' -c '90:' --debug
containers
['AGASPCTNVT0009-*******-mcm4387-151074492723']
End selection + type
hit containers_list_to_dict
hit is_docker_container_ID
hit talk_to_docker
curl 'https://10.173.14.214:2376/containers/json?&filters={%22id%22:%5B%22AGASPCTNVT0009-*******-mcm4387-151074492723%22%5D}&all=1' -k -g -f
hit is_docker_container_name
hit talk_to_docker
curl 'https://10.173.14.214:2376/containers/json?&filters={%22name%22:%5B%22AGASPCTNVT0009-*******-mcm4387-151074492723%22%5D}&all=true' -k -g -f
hit get_container_IDs_from_names
hit talk_to_docker
curl 'https://10.173.14.214:2376/containers/json?&filters={%22name%22:%5B%22AGASPCTNVT0009-*******-mcm4387-151074492723%22%5D}&all=true' -k -g -f
selection before assigning thresholds
{'AGASPCTNVT0009-*******-mcm4387-151074492723': [u'5e6759a22520f7793cbb7b7df546b82e2a3751825153ad5f795c737514974a35']}
hit threshold_string_to_tuple
hit threshold_string_to_tuple
threshold maps
{'AGASPCTNVT0009-*******-mcm4387-151074492723': {'value': 0, 'warning': (90.0, inf, False), 'critical': (90.0, inf, False), 'name': 'AGASPCTNVT0009-*******-mcm4387-151074492723', 'containers': [u'5e6759a22520f7793cbb7b7df546b82e2a3751825153ad5f795c737514974a35']}}
hit get_container_IDs
hit do_check
hit check_containers_CPU
hit talk_to_docker
curl 'https://10.173.14.214:2376/containers/5e6759a22520f7793cbb7b7df546b82e2a3751825153ad5f795c737514974a35/stats?&stream=false' -k -g -f
hit process_value
hit process_usage
container_id_to_usage is
{u'5e6759a22520f7793cbb7b7df546b82e2a3751825153ad5f795c737514974a35': 0.0030965983866722406}
hit threshold_string_to_tuple
hit threshold_string_to_tuple
hit check_all_values_against_thresholds
hit check_against_thresholds
hit check_against_threshold
hit nagios_exit
CRITICAL: |
AGASPCTNVT0009-*******-mcm4387-151074492723 returned CRITICAL (value 0.00309659838667%)
| AGASPCTNVT0009-*******-mcm4387-151074492723=0.00309659838667%;90.0:;90.0: