On 21.06.17 03:42, Umar Draz wrote:
Hello

Please don't use html to post on public lists. It can get really ugly... Use text mode only.

I want to monitor my website which is basically running with only https

I have tried this

object Host "mysite.com <http://mysite.com>" {
     address = "mysite.com <http://mysite.com>"
     check_command = "http"
     vars.http_vhosts["www.mysite.com <http://www.mysite.com>"] = {
     http_uri = "/"
     }
     vars.http_ssl="1"
}

Always verify the runtime object generated from your config.

# icinga2 object list -n 'mysite.com!www.mysite.com'

will show you the service object generated from the above config. Then you'll see that the service does not have the http_ssl.

Your "vars.http_ssl" is part of the host object. It does not have any meaning there. The host object does not use that variable. So put the http_ssl into the http_vhosts object. Each http_vhosts generates a separate service, i.e. you can also check https and http like this:

object Host "mysite.com" {
    address = "mysite.com"
    check_command = "http"
    vars.http_vhosts["www.mysite.com:443"] = {
        http_uri = "/"
        http_ssl = "1"
    }
    vars.http_vhosts["www.mysite.com:80"] = {
        http_uri = "/"
    }
}

Here is the service warning message

HTTP WARNING: HTTP/1.1 404 Not Found - 5825 bytes in 0.012 second response time

That's what

# curl -v http://www.mysite.com/

would show, if you place the http_ssl in the wrong place.

-Gerald

If I switch my site to http instead of https then it is working fine.

Would you please help me how I can monitor https url

Regards


_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users


_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to