plugin timeout with gearman

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

plugin timeout with gearman

Post by morabanc »

Hello,

We're expecting problems with a plugin when using gearman, the services using this plugin crashed with a timeout message. In gearman worker's log appears this message: timeout (180s) hit for servicecheck.

All the others plugins are working correctly, even very similar plugins. And this plugin works correctly if I disable the gearman broker_module to use nagios.

I attach debug from gearman

Regards
You do not have the required permissions to view the files attached to this post.
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

Re: plugin timeout with gearman

Post by cmerchant »

Do you have any firewall issues between the gearman worker and the oracle server? What are the similar checks, are they to the same host?
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Re: plugin timeout with gearman

Post by morabanc »

There are not firewall issues, and the checks are to the same hosts.
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

Re: plugin timeout with gearman

Post by cmerchant »

Your gearman worker server does not have the necessary prereqs to do perform the oracle sql query. Could you show us the check plugin script that runs from the XI server?
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Re: plugin timeout with gearman

Post by morabanc »

Hello,

I attach the plugin

Regards.
You do not have the required permissions to view the files attached to this post.
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Re: plugin timeout with gearman

Post by morabanc »

An update about that issue:

If line "kill_sqlplus $$ 30 ${TMP_FILE} &" is commented then script with gearman works fine.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: plugin timeout with gearman

Post by jdalrymple »

It looks like this is a stateful plugin - meaning it remembers stuff from one iteration to the next. You will need to make sure this plugin is always run from the same server if you want it to output useful results.
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Re: plugin timeout with gearman

Post by morabanc »

It seems "&" to execute script "kill_sqplus" is not working, this script is executed in background, and original script continue executing, but when gearman is working, script stops at this point, as kill_sqlpus is executing more than timeout configured (this is the reason why is executed in background) the "main" script crashes with a timeout.
Someone has had a similar problem? There are another way to execute a script in background?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: plugin timeout with gearman

Post by lmiltchev »

You will need to make sure this plugin is always run from the same server if you want it to output useful results.
@morabanc
Is the mod gearman worker a local worker? You need to run the plugin from the same sever as jdalrymple pointed out.
It seems "&" to execute script "kill_sqplus" is not working...
Can you elaborate on this? Did you try modifying the script? Have you tried increasing the timeout?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked