Hi lmiltchev,
10.23.201.85 is the docker ip address.
Now the status is showing ok (No values) for CPU, Memory usage and running count isin critical state with 0 running.
Docker Container: CPU Usage: Store-order-svc Ok 7d 13h 2m 9s 1/5 2019-12-10 06:57:02 OK:
Docker Container: Memory Usage: Store-order-svc Ok 4d 13h 32m 40s 1/5 2019-12-10 06:55:40 OK:
Docker Container: Running Count: Store-order-svc Critical 24d 20h 51m 45s 5/5 2019-12-10 06:57:48 CRITICAL: 0 running, 1 not running, containers not running: ['/store-order-svc']
Thanks & Regards,
amane
UNKNOWN: cURL call failed' - Docker monitoring
Re: UNKNOWN: cURL call failed' - Docker monitoring
Try running something like this from the command line on the Nagios XI server:
or this
You should get a "CRITICAL" state, since your container is not running.
Did this help?
Code: Select all
/usr/local/nagios/libexec/check_docker.py -H http://10.23.201.85:1111/ --check-type 'containers_running' -C ''/store-order-svc' -t 0 -l -w '2:' -c '1:'Code: Select all
/usr/local/nagios/libexec/check_docker.py -H http://10.23.201.85:1111/ --check-type 'containers_running' --all -t 0 -l -w '2:' -c '1:'I will talk to our developers about this, but I would assume that the state is set to "OK" since the containers are NOT running, and CPU & Memory values cannot be determined. Start your container, then run your CPU & Memory checks. You should get some values back now.Now the status is showing ok (No values) for CPU, Memory usage and running count isin critical state with 0 running.
Did this help?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: UNKNOWN: cURL call failed' - Docker monitoring
Hi lmiltchev,
Below is the output for given command.
[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:'
WARNING: 1 running | count=1;2:;1:
Below is the statue in Console for same docker
'Docker Container: Running Count: Store-order-svc Critical 25d 23h 10m 38s 5/5 2019-12-11 09:16:03 CRITICAL: 0 running, 1 not running, containers not running: ['/store-order-svc']'
Thanks & Regards,
amane
Below is the output for given command.
[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:'
WARNING: 1 running | count=1;2:;1:
Below is the statue in Console for same docker
'Docker Container: Running Count: Store-order-svc Critical 25d 23h 10m 38s 5/5 2019-12-11 09:16:03 CRITICAL: 0 running, 1 not running, containers not running: ['/store-order-svc']'
Thanks & Regards,
amane
-
swolf
Re: UNKNOWN: cURL call failed' - Docker monitoring
I'm not sure why the plugin would show different values from your console. Can you show output for these two commands?
Code: Select all
curl 'http://10.23.201.85:1111/containers/json?&all=true' -g -f
./check_docker.py -H http://10.23.201.85:1111/ --check-type 'containers_running' --all -t 0 -l -w '2:' -c '1:' --debug
Re: UNKNOWN: cURL call failed' - Docker monitoring
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
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
Re: UNKNOWN: cURL call failed' - Docker monitoring
Are both versions of check_docker.py the same? Please validate.
Which version are you using?
Does this one work on the non-working system?
- Let me know if you're unable to view this post
https://support.nagios.com/forum/viewto ... 32#p284532
Thank you!
Code: Select all
diff file1 file2Code: Select all
grep VERSION /usr/local/nagios/libexec/check_docker.py- Let me know if you're unable to view this post
https://support.nagios.com/forum/viewto ... 32#p284532
Thank you!
Re: UNKNOWN: cURL call failed' - Docker monitoring
Hi Ssax,
Tried this https://support.nagios.com/forum/viewto ... 32#p284532
Still same issue.
Tried comparing version of check_docker.py on two of our nagios instances.
[nagios@lxapxxxxx ~]$ grep VERSION /usr/local/nagios/libexec/check_docker.py
__VERSION__ = "1.1.0"
version = '%s, Version %s. See --help for more info.' % (__PLUGIN_NAME__, __VERSION__)
[nagios@lxapxxxx ~]$ timed out waiting for input: auto-logout
[nagios@lxapxxxx ~]$ grep VERSION /usr/local/nagios/libexec/check_docker.py
__VERSION__ = "1.0.4" version = '%s, Version %s. See --help for more info.' % (__PLUGIN_NAME__, __VERSION__)
[nagios@lxapxxxx ~]$ timed out waiting for input: auto-logout
Thanks
Tried this https://support.nagios.com/forum/viewto ... 32#p284532
Still same issue.
Tried comparing version of check_docker.py on two of our nagios instances.
[nagios@lxapxxxxx ~]$ grep VERSION /usr/local/nagios/libexec/check_docker.py
__VERSION__ = "1.1.0"
version = '%s, Version %s. See --help for more info.' % (__PLUGIN_NAME__, __VERSION__)
[nagios@lxapxxxx ~]$ timed out waiting for input: auto-logout
[nagios@lxapxxxx ~]$ grep VERSION /usr/local/nagios/libexec/check_docker.py
__VERSION__ = "1.0.4" version = '%s, Version %s. See --help for more info.' % (__PLUGIN_NAME__, __VERSION__)
[nagios@lxapxxxx ~]$ timed out waiting for input: auto-logout
Thanks
Re: UNKNOWN: cURL call failed' - Docker monitoring
The latest version of the check_docker.py plugin is 1.1.1. You can download it from the "Configuration Wizard: Docker - Step 1" page in Nagios XI. Try using the latest plugin to see if this is going to fix your issue.
Be sure to check out our Knowledgebase for helpful articles and solutions!