Issue with check_http

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Issue with check_http

Post 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.
Former Nagios employee
User avatar
t3dus
Posts: 161
Joined: Thu Feb 04, 2016 3:46 pm
Location: IA
Contact:

Re: Issue with check_http

Post 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:
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Issue with check_http

Post 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?
Locked