check_http error


#1

am newbie to nagios, I have configured nagios to monitor local host sewrvice.
I have installed nagios 3.0b7 thru Fedora quickstart guide & followed the instruction .
The plugin version is nagios-plugins 1.4.7
But I am facing problem with http . when I run following command
#./check_http -H localhost -v
I get the follwing error
GET / HTTP/1.0
User-Agent: check_http/1.101 (nagios-plugins 1.4.7)
Host: localhost

localhost:80/ is 574 characters
STATUS: HTTP/1.1 403 Forbidden
**** HEADER ****
Date: Thu, 20 Dec 2007 09:32:35 GMT
Server: Apache/2.2.3 (CentOS)
Content-Length: 395
Connection: close
Content-Type: text/html; charset=iso-8859-1
**** CONTENT ****

403 Forbidden

Forbidden

You don't have permission to access / on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


Apache/2.2.3 (CentOS) Server at localhost Port 80

HTTP WARNING: HTTP/1.1 403 Forbidden

After googling for the problem I found This may be happening due to permission isue
so I amde apache a nagios grup member
#usermod -G nagios apache
Hereis the directory permission of
drwxrwsr-x 2 nagios nagios 4096 Dec 20 14:57 /usr/local/nagios/var/rw
prw-rw---- 1 nagios nagios 0 Dec 20 15:01 nagios.cmd
Please help me.
Thanks
Vinod


#2

Do you need the -v? This gives the verbose response. If you just want to check that http is up you shouldn’t need the -v

I also added a blank default site on my nagios box for port 80 localhost