Nagios service latency

Andreas Ericsson ae at op5.se
Sat Nov 3 10:03:30 CET 2007


Thomas Guyot-Sionnest wrote:
> 
> Something that can help as well is having the host check return as fast
> as possible.

If that's what you're after ...

> On my servers I use check_icmp (faster than check_ping
> since it has native ICMP support), the check sends only one ping and
> timeout after one second (the minimum):
> 
> # 'check_host-alive' command definition
> define command{
>   command_name check-host-alive
>   command_line $USER1$/check_icmp -H $HOSTADDRESS$ -w 300.00,80% -c
> 500.00,100% -p 1 -t 1
> }
> 

Turn this into
# 'check_host-alive' command definition
define command{
	command_name check-host-alive
	command_line $USER1$/check_host -H $HOSTADDRESS$
}

after having done

	ln -s check_icmp check_host

in whatever directory your plugins reside in. Then you can lower the
max_check_attempts and still get the fast behaviour, because check_icmp,
when working in check_host mode, will return immediately upon the first
correctly received icmp response, but try several times, thus saving you
3 fork()/exec() for each attempt while maintaining precision.

-- 
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