[Nagiosplug-help] check_http status reports OK when a 404 error occurs

nagios at vsi.net nagios at vsi.net
Mon Jun 13 16:24:58 CEST 2005


Currently, we have nagios v 2.0b2 with nagios-plugins v 1.4 installed. The check_http command does not return a WARNING/CRITICAL status when a page 404's or has any other error(i.e 500,302, etc). I've ran other versions of nagios on other systems and remember a WARNING/CRITICAL status being returned when anything other than a 200 OK was returned. When ran from the command line HTTP WARNING is returned but when looking at the web interface the status is still OK and under status information I see the same output that i get when ran from the command line, HTTP WARNING. I'm not a programmer but from looking at the source of the check_http command it seems that i should get an HTTP WARNING and the status should change from OK to WARNING. This is not the case in my situation. Maybe I'm missing something here and have this misconfigured so I will post the relevant parts of my configuration here. Can anyone see what i'm doing wrong? Has anyone had similar issues with the check_http plugin and there resolutions?

>From the command line:

./check_http -H xxx.xxx.xxx -I 1.2.3.4 -u /folder/index.html 

HTTP OK HTTP/1.1 200 OK - 232 bytes in 0.009 seconds |time=0.009245s;;;0.000000 size=232B;;;0

./check_http -H xxx.xxx.xxx -I 1.2.3.4 -u /folder/index.htmll
 
HTTP WARNING: HTTP/1.1 404 Not Found


>From the checkcommands.cfg :

# 'check_http' command definition
define command{
	command_name	check_http
	command_line	$USER1$/check_http -H $HOSTADDRESS$
	}

# 'check_http_custom' command definition
define command{
	command_name	check_http_custom
	command_line	$USER1$/check_http -H $HOSTADDRESS$ -I 111.222.333.444 -u /folder/index.html
	}

>From the hosts.cfg :

define host{
	host_name		xxx.xxx.xxx
	alias			Client Website
	address			xxx.xxx.xxx
	parents			parent
	max_check_attempts	10
	notification_interval	120
	notification_period	24x7
	notification_options	d,u,r
	contact_groups		admins
	}
	
define host{
	host_name		yyy.yyy.yyy
	alias			Client2 Website
	address			yyy.yyy.yyy
	parents			parent
	max_check_attempts	10
	notification_interval	120
	notification_period	24x7
	notification_options	d,u,r
	contact_groups		admins
	}
	
>From the hostgroup.cfg :

define hostgroup{
	hostgroup_name	www_group
	alias		Websites
	members		xxx.xxx.xxx,yyy.yyy.yyy
	}


>From the service.cfg :


define service{
	use				generic-service		; Name of service template to use

	hostgroup_name			www_group
	service_description		HTTP_Custom
	is_volatile			0
	check_period			24x7
	max_check_attempts		3
	normal_check_interval		3
	retry_check_interval		1
	contact_groups			admins
	notification_interval		120
	notification_period		24x7
	notification_options		w,u,c,r
	check_command			check_http_custom
	}






More information about the Help mailing list