Nagios service latency

Andreas Ericsson ae at op5.se
Sun Nov 4 18:55:25 CET 2007


Thomas Guyot-Sionnest wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 04/11/07 11:48 AM, Andreas Ericsson wrote:
>> Thomas Guyot-Sionnest wrote:
>>> This gives the same result for up hosts, but takes 20 times longer on
>>> unreachable hosts:
>>>
>>> $ time ./check_icmp -H 1.1.1.1 -w 300.00,80% -c 500.00,100% -p 1 -t 1
>>> CRITICAL - 1.1.1.1: rta nan, lost 100%|rta=0.000ms;300.000;500.000;0;
>>> pl=100%;80;100;;
>>>
>>> real    0m0.506s
>>> user    0m0.000s
>>> sys     0m0.004s
>>> $ time ./check_host -H 1.1.1.1
>>> CRITICAL - 1.1.1.1: rta nan, lost 100%|rta=0.000ms;1000.000;1000.000;0;
>>> pl=100%;100;100;;
>>>
>>> real    0m10.006s
>>> user    0m0.000s
>>> sys     0m0.000s
>>>
>>> So it's definitely not an option. I could further reduce the timeout by
>>> using lower thresholds but I wanted to stay on the safe side...
>>>
>> You have check_attempts set to 1 for your hosts? Doesn't that generate an
>> awful amount of false positives?
> 
> Max check attempts is set to three. According to Nagios documentation
> it's much more performant to have a faster host check and more check
> attempts than one check attempt that takes longer (i.e. sending multiple
> packets).
> 
> The performance problem people usually get is not related to server
> performance (i.e. number of forks, cou used, etc) but the time Nagios
> spend waiting for host check results (as it's doing nothing else during
> that time).
> 

That's not strictly true. Each check run by Nagios needs three fork()'s
and two exec()'s. For your case, you can achieve exactly the same thing,
but with 6 fork()'s and 4 exec()'s less by using

check_host -H $HOSTADDRESS$ -w <warn> -c <crit> -n 3

except that check_host will be a lot faster for the cases where the host
has turned unreachable due to routing problems.

OTOH, it'll be less work for you *not* to change it, so so long as that
works.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list