Web site monitoring question

I want to monitor the up time for a web site that has been giving us problems. I’m using nagios 3.oa3.

I have created a service check called webcheck and included a check_http

My question is how can I check the site in question mysite.com/sitea/siteb ? Is the define service set up like

define service {
use generic-service
host_name myhost
service_description My WWW
check_command check_http!http://www.host.domain/!"My Site"

But how can I setup the check_command for http?

define command {
command_name check_http
command_line $USER1$/check_http -I $HOSTADDRESS$ -u $ARG1$ -s $ARG2$
}

When I set this config up nagios UI reports this warning HTTP WARNING: HTTP/1.1 400 Bad Request

Use the verbose option to the check_http command to see why the web site is giving you a 400 in response to those parameters.

The plugin documentation isn’t very clear on this, but for virtual hosts you may need a “-H” parameter for the host name and a “-u” path relative to the HTTP root, i.e.

…/check_http -I wsanders.net -u wsanders.net -v
./check_http -H wsanders.net -u / -v

give the same result.

Or, you could accept the 400 error as proof the web site is funcitoning properly :frowning: