Service Check timeout increase on single check

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
gomatze
Posts: 64
Joined: Mon Jan 09, 2017 12:33 am
Location: Duesseldorf, Germany

Service Check timeout increase on single check

Post by gomatze »

Good Morning,

is there a way to define a higher timeout Value for a single check?
I know that i can do it in the Nagios.cfg but this is than working for each and every check. I just want a longer timout for one specific check...
HOMO SUM HUMANI NIHIL A ME ALIENUM PUTO
User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: Service Check timeout increase on single check

Post by tacolover101 »

pending what your global vars are set to, some specific plugins allow you to set it at a plugin level.

another option is re-writing or adding a timeout feature to the plugin. i believe the 'timeout' command works for this purpose if you wanted to write a wrapper.
kyang

Re: Service Check timeout increase on single check

Post by kyang »

Thanks @tacolover101!

@gomatze, tacolover101 is correct. Which plugin are you using for that specific check?

Some plugins will allow for a timeout -t
User avatar
gomatze
Posts: 64
Joined: Mon Jan 09, 2017 12:33 am
Location: Duesseldorf, Germany

Re: Service Check timeout increase on single check

Post by gomatze »

The Plugin is a selfmade perlscript which checks the daily renewed /etc/Hosts File of our Enviroment against the configuration of Nagiosxi-Hosts and Returns new Hosts we might want to Monitor and every Kind of Changes applied to the /etc/Hosts which is not applied to the NagiosXI Host Configuration.
We have around 14000 devices in our System and the Plugin ist looking out for specific Hosts and trys if they answer to Ping.
That takes a while and Nagios breaks the Check normally after 60s.
Actually i have increased the timeout globally to 240s which i do not want it to wait in all executions of Plugins and checks...
HOMO SUM HUMANI NIHIL A ME ALIENUM PUTO
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Service Check timeout increase on single check

Post by npolovenko »

@gomatze, Looks like the only option, in this case, would be to define a timeout value inside the plugin. I recommend to take a look at some plugins on nagios exchnage or in /usr/local/nagios/libexec/ and try to implement the same timeout mechanism.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
gomatze
Posts: 64
Joined: Mon Jan 09, 2017 12:33 am
Location: Duesseldorf, Germany

Re: Service Check timeout increase on single check

Post by gomatze »

I seperatet the Functions of the Plugin into a Plugin and a Cronjob that provides a list for the Plugin to use.
Therefore i reduced the global timeout Value to normal and all is running smooth. Thanks a lot
HOMO SUM HUMANI NIHIL A ME ALIENUM PUTO
kyang

Re: Service Check timeout increase on single check

Post by kyang »

Sounds good!

Did you have any more questions or are we okay to close this thread?
User avatar
gomatze
Posts: 64
Joined: Mon Jan 09, 2017 12:33 am
Location: Duesseldorf, Germany

Re: Service Check timeout increase on single check

Post by gomatze »

Threat can be closed! Thanks a lot!
HOMO SUM HUMANI NIHIL A ME ALIENUM PUTO
Locked