Monitoring a specific web page with Nagios

Posted: 14th May 2012 by Seth Killey in Apps, Linux

Recently I was in need of using the check_http plugin in Nagios to monitor a web app that wasn’t the root web page in IIS.  I’ve used check_http before but never knew how to check sub pages until recently so I figured I’d jot down some notes because it wasn’t overly intuitive to me.

First up, I defined a custom command in my commands cfg file (iwp because this was for instant web publishing in FileMaker)

define command{
command_name    check_iwp
command_line    $USER1$/check_http -H $ARG1$ -u $ARG2$
}

On my server that hosts IWP I defined the following service.  Obviously replace the FQDN with your server name, but notice how you just fill in the remaining part of the URL for the 2nd parameter.

define service{
use                             onsite-service
host_name                       FileMaker
service_description             HTTP
check_command                   check_iwp!server.domain.org!/fmi/iwp/res/iwp_auth.html
}