check_docker.py

This board serves as an open discussion and support collaboration point for Nagios XI. NOTE: Nagios XI customers should use the Customer Support forum to obtain expedited support.

check_docker.py

Postby gad314 » Wed Oct 16, 2019 3:23 pm

Hello team,

I am trying to have check_docker.py working, but it has a lot of bugs.
is there any new version or an alternative to it?
gad314
 
Posts: 6
Joined: Wed Jul 17, 2019 4:02 pm

Re: check_docker.py

Postby mbellerue » Wed Oct 16, 2019 4:17 pm

You can check for updates to the wizards by going to Admin -> Manage Config Wizards, and selecting the Check For Updates button. Any wizards that have updates available will have their status field highlighted.

What kind of bugs are you running into?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
mbellerue
 
Posts: 882
Joined: Fri Jul 12, 2019 11:10 am

Re: check_docker.py

Postby gad314 » Fri Oct 18, 2019 9:21 am

Thanks mbellerue for you reply.

here is example of docker- container memory check:

(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



also I have two containers running normally so why i am seeing this critical message:

CRITICAL: 100.000000% of containers (2/2) running

CRITICAL: 0.000000% of containers (0/2) healthy
Attachments
docker-checks.PNG
gad314
 
Posts: 6
Joined: Wed Jul 17, 2019 4:02 pm

Re: check_docker.py

Postby mbellerue » Fri Oct 18, 2019 2:38 pm

Can you PM me your system profile? You can get it from Admin -> System Profile -> Download Profile. I will take a look at the commands, and see if I can replicate the issue on this end.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
mbellerue
 
Posts: 882
Joined: Fri Jul 12, 2019 11:10 am

Re: check_docker.py

Postby mbellerue » Mon Oct 21, 2019 12:12 pm

Hi gad314,

I got your PM regarding not being able to send the full profile. Let's focus on check_docker.py.

Can you run your check command from the command line, after having switched to the nagios user? Specifically using su - nagios

I think this script may be creating a temp file somewhere, and it's not accessible by the nagios user right now.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
mbellerue
 
Posts: 882
Joined: Fri Jul 12, 2019 11:10 am


Return to Nagios XI

Who is online

Users browsing this forum: No registered users and 22 guests