Hi swolf,
Please find below output for given command.
[nagios@<nagiosXI> ~]$ curl '
http://10.23.201.85:1111/containers/json?&all=true' -g -f
[{"Id":"afe5db67b697cffbfa418301046909bb8e5930edf2be7d90b3f133b008ac66be","Names":["/store-order-svc"],"Image":"wsvmlnnep01.ec.lowes.com:8800/docker-hosted/store-order-svc:v10-release-1.1.4","ImageID":"sha256:2b9ef8a2924296b4b690a6e9b0a64a518d474006e5c79fae793b277e15946823","Command":"java -jar /app/order-service.jar","Created":1576232098,"Ports":[{"IP":"127.0.0.1","PrivatePort":10001,"PublicPort":10001,"Type":"tcp"}],"Labels":{},"State":"running","Status":"Up 3 days","HostConfig":{"NetworkMode":"container-network"},"NetworkSettings":{"Networks":{"container-network":{"IPAMConfig":null,"Links":null,"Aliases":null,"NetworkID":"96bb406d447beb79585f5db4d1710ef9341edd019afc0238eb082bdf0ca80ed5","EndpointID":"e6f4a9e8f2e197dcadb0ecd3f19c87a369dd4372f47f7b25a2cdea0f1ffc9671","Gateway":"192.168.100.1","IPAddress":"192.168.100.2","IPPrefixLen":24,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"02:42:c0:a8:64:02","DriverOpts":null}}},"Mounts":[]}]
[nagios@<NagiosXI> libexec]$ ./check_docker.py -H
http://10.23.201.85:1111/ --check-type 'containers_running' --all -t 0 -l -w '2:' -c '1:' --debug
all
['all']
End selection + type
Traceback (most recent call last):
File "./check_docker.py", line 988, in <module>
_ = main()
File "./check_docker.py", line 959, in main
checks = choose_checks(options)
File "./check_docker.py", line 226, in choose_checks
check_data = get_threshold_maps(options.warning, options.critical, selection)
File "./check_docker.py", line 329, in get_threshold_maps
for triplet in zip(attrs.keys(), warning_list, critical_list):
AttributeError: 'list' object has no attribute 'keys'
Getting the output for second command in other nagios instance.
[nagios@nagiosXI2 libexec]$ ./check_docker.py -H
http://10.23.201.85:1111/ --check-type 'containers_running' --all -t 0 -l -w '2:' -c '1:' --debug
[]
[]
End containers + networks
hit get_thresholds
hit threshold_string_to_tuple
hit threshold_string_to_tuple
hit get_all_container_IDs
hit talk_to_docker
curl '
http://10.23.201.85:1111/containers/json?&all=1' -g -f
hit do_check
hit check_containers_running
hit talk_to_docker
curl '
http://10.23.201.85:1111/containers/jso ... ning%22%5D}' -g -f
hit process_value
hit process_counter
hit make_perfdata
hit check_all_values_against_thresholds
hit check_against_thresholds
hit check_against_threshold
hit check_against_threshold
hit nagios_exit
WARNING: 1 running | count=1;2:;1:
Thanks & Regards,
amane