Occasional display of Critical threshold must be float or float triplet! & Event-handlers

Jasmine Chua jasmine.chua at securecirt.com
Wed Oct 30 19:00:59 CET 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The distributed server actually could use check_nrpe to read the load average 
results of the remote server properly, but when it passed the results via 
send_nsca to the central monitoring server. 
Sometimes, it displays: Critical threshold must be float or float triplet! 
But other times, it is Ok. 
I have also checked to make sure that not more than one version of Nagios is 
running. 

Why it displays that load service Ok and not Ok sometimes?
Could someone explain please?

Also, I wanted nagios to restart a program automatically if the load average 
is found to be in critical or hard state.
I have created a script 'restart_program' in the 
/usr/local/nagios/libexec/event-handlers directory
and enabled the $USER2$ macro in the resource.cfg file and also I have 
specified the definition of restart_program in the checkcommands.cfg file.

# 'restart_program' command definition
define command{
        command_name    restart_program
        command_line    $USER2$/restart_program $SERVICESTATE$ $STATETYPE$ 
$SERVICEATTEMPT$
}

Is that the way you specify event_handlers? Just want to know if what I did 
will actually work when the load average turns critical or hard.. because the 
load average is so far always OK and I couldnt test it out if Nagios could 
restart the program automatically if the load is not right. The 
restart_program script is already working. 


define service{
	use							passive-service
	host_name					abc
	service_description			Load
	check_command				check-load-runaway!0.90,0.90,0.90!1.00,1.00,1.00
	max_check_attempts			3
	event_handler				restart_program
	normal_check_interval		5
	retry_check_interval			1
	check_period				24x7
	notification_interval			0
	notification_period			24x7
	notifcation_options			w,u,c,r
	contact_groups				admin
	}


In the nrpe.cfg of the remote server:

command[check-load-runaway]=/usr/local/nagios/libexec/check_load -w 
0.90,0.90,0.90 -c 1.00,1.00,1.00




- -- 
Jasmine Chua
Security Engineer, SecureCiRT (A SBU of Z-Vance Pte Ltd)
http://www.securecirt.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9wB5eNgvTa7Hj2AURAhMhAKCLkC/6K5VZkbctHj0Abyv0I3k9OQCfbSM+
tj3ImppRI9SAB7IVjyINHRE=
=yfUp
-----END PGP SIGNATURE-----



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf




More information about the Users mailing list