Page 3 of 3

Re: Issue with check_http

Posted: Fri Dec 08, 2017 11:50 am
by tmcdonald
t3dus wrote:
tmcdonald wrote:The --ssl should only be needed for HTTP sites.
Ok so I see how -f follow is important in my case. So --ssl for HTTP not HTTPS? All my websites use HTTPS
Bah, sorry - typo on my part now. HTTPS sites should need --ssl.

Re: Issue with check_http

Posted: Mon Feb 05, 2018 12:41 pm
by t3dus
npolovenko wrote:@t3dus, This worked for me. Just create a new configuration file myhost.conf in /usr/local/nagios/etc/objects. And paste the following definitions inside the file. After that import this file in /usr/local/nagios/etc/nagios.cfg and restart nagios with service nagios restart.

Code: Select all

define host {
        host_name                       www.snapgeek.com
        address                         www.snapgeek.com
        max_check_attempts              5
        check_interval                  5
        retry_interval                  1
        check_period                    24x7
        contacts                        nagiosadmin
		check_command                   check_http_test!/meet-matt/!Iowa
        notification_interval           60
        notification_period             24x7
        }



       define command{
        command_name    check_http_test
        command_line    $USER1$/check_http -H $HOSTADDRESS$ -u $ARG1$ -R $ARGS2$ -f follow


define service{
        use                             generic-service         ; Name of service template to use
        host_name                       www.snapgeek.com
        service_description             URL test
        check_command                   check_http_test!/meet-matt/!Iowa
        notifications_enabled           0
        }
       }



PS: You may also delete the service definition as I inserted the same http check in the host definition.
Btw are you still monitoring snapgeek.com with the above info? I see a hit every once in a while from a nagios server that isn't mine. :lol:

Re: Issue with check_http

Posted: Mon Feb 05, 2018 12:46 pm
by dwhitfield
t3dus wrote: Btw are you still monitoring snapgeek.com with the above info? I see a hit every once in a while from a nagios server that isn't mine. :lol:
It could be any of us, but I checked my primary and it's not me.

For clarity, is the issue resolved?