Timeout in check_wmi_plus.pl

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mon-team
Posts: 171
Joined: Thu Jun 28, 2012 9:22 am

Timeout in check_wmi_plus.pl

Post by mon-team »

Hi guys,

It seems like the timeout set into the plugin check_wmi_plus.pl is ignored when the check is executed by modgearman.

Running the check in a gearman queue, we get a CRITICAL status with output "(Service Check Timed Out On Worker: ...)" and execution_time >=60s while without gearman, the same service go into UNKNOWN status with "UNKNOWN - Plugin Timed out (15 sec)".

Any idea about this behaviour?. We would like to executed those services through gearman with timeout=15s.

We are running Nagios XI 2012R2.9 and mod_gearman-1.4.14.

Thanks

Best Regards
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Timeout in check_wmi_plus.pl

Post by lmiltchev »

Can you post the service config along with the other relevant configs (templates, commands, etc.)? Also, post the "mod_gearman_worker.conf". Hide sensitive info.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mon-team
Posts: 171
Joined: Thu Jun 28, 2012 9:22 am

Re: Timeout in check_wmi_plus.pl

Post by mon-team »

see in attachments our config files.
You do not have the required permissions to view the files attached to this post.
User avatar
rseiwert
Posts: 196
Joined: Wed Jun 22, 2011 10:33 pm
Location: Somewhere between Here and Now

Re: Timeout in check_wmi_plus.pl

Post by rseiwert »

I might be wrong here but it looks like you have your check_wmi_plus command defined with a hardcoded timeout of 15 secs

Code: Select all

define command {
       command_name                             check_wmi_plus
       command_line                             $USER1$/check_wmi_plus.pl -H $HOSTADDRESS$ -u username -p password -t 15 $ARG1$
}
I would just try changing the -t 15 to -t 60 in your command def and see if that solves your problem.
Grumpy Olde IT Guy
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Timeout in check_wmi_plus.pl

Post by jdalrymple »

I would think 15 seconds should be plenty.

I'm assuming this works form the Nagios server proper, just not from gearman? Is it on the same host or a different host? If different I'd look at your firewall configuration.
mon-team
Posts: 171
Joined: Thu Jun 28, 2012 9:22 am

Re: Timeout in check_wmi_plus.pl

Post by mon-team »

I'm assuming this works form the Nagios server proper, just not from gearman?
yes, with gearman the script's timeout is ignored.
yes, wiht gearman the script timeout is being ignored
We experience this issue on all services using check_wmi_plus.pl as plugin

No problem when running the check from the commandline of nagiosxi server and worker servers.
Our Modgearman workers and nagiosXI belong to the same subnet.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Timeout in check_wmi_plus.pl

Post by tgriep »

On the worker that is failing, can you increase the debug log level and send in the log file?

Edit the mod_gearman_worker.conf file on the remote worker.

Change this from

Code: Select all

debug=0
to

Code: Select all

debug=3
Restart the worker

Code: Select all

service mod_gearman_worker restart
Then post the following file after the check is run.

Code: Select all

/var/log/mod_gearman/mod_gearman_worker.log
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked