plugin timeout

This forum is intended for the discussion of Nagios plugin development. Feature requests, patches, bug fixes, and all types of development-related discussions are welcome!

NOTE: The nagiosplug-devel mailing list has been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

plugin timeout

Postby jotagera » Wed Sep 28, 2016 11:01 am

Hi all

I´m using nagiosgraph to view response time of my service checks.

We are using a web browser plugin developed internally in shell script and links.

When this plugin takes too long to terminate, nagios kills it and give me a "Service check timed out after 50.01 seconds" message.

In this situation i can´t receive performance data values and the graph in nagiosgraph got no point on this time.

I tried to solve this problem inside bash script:
i ran the links browser in background and control the timeout in a while loop. If the ackgroung process can´t finish, i kill it and return to nagios the time taken with a timeout message and a exit contition for CRITICAL (2).

But the Nagios can´t survive to this plugin. After some time it´s running, the nagios core stops to proccess results, including the received by nsca.

I can´t see nothing special on nagios logs.

Anyone got some similar behavior?
Anyone can help me with this situation?

Thanks in advance
PS: Sorry my poor english. :)
Posts: 4
Joined: Mon Jun 06, 2016 9:43 am

Re: plugin timeout

Postby rkennedy » Wed Sep 28, 2016 1:02 pm

In your nagios.cfg file, you should be able to increase the service_check_timeout variable to be longer than 50 seconds. You could set it to 120 for example. ... gmain.html

Then, on the individual check, try passing the -t 120 parameter to allow it more time to execute. The -t flag might not be applicable to all plugins, though.

This would allow the check to have 2 minutes to process.
Posts: 6562
Joined: Mon Oct 05, 2015 11:45 am

Return to Nagios Plugin Development

Who is online

Users browsing this forum: No registered users and 4 guests