Page 1 of 1

Check https but not http

Posted: Thu Sep 08, 2011 11:36 am
by theillien
I've disabled http on our Nagios server so the only way to access the interface is via https. I've used the instructions found online (http://communitygrids.blogspot.com/2010 ... oring.html) to create a check for https. The service shows up under the host, but it indicates a warning because of the 403 Forbidden code returned due to shutting down http.

I'm certain it is failing on http and not https due to the status message: HTTP WARNING: HTTP/1.1 403 Forbidden - 4183 bytes in 0.009 second response time

I don't even have http defined as a service in the localhost.cfg file anymore since moving it to https.

How can I disable checks on http and only check https?

Re: Check https but not http

Posted: Thu Sep 08, 2011 12:06 pm
by theillien
The entry in command.cfg:

Code: Select all

# 'check_https' command definition
define command{
        command_name    check_https
        command_line      $USER1$/check_http -I $ARG1$ -S
#       command_line     $USER1$/check_http -I $HOSTADDRESS$ -p $ARG1$ -S
}
and the server in localhost.cfg:

Code: Select all

define service{
        use                              local-service          ; Name of service template to use
        host_name                   tcecapmgr5ng01
        service_description      HTTPS
        check_command          check_https!10.153.106.250
        notifications_enabled   0
}