No Luck,

I think there is something else that is not documented or missing.

Br

On Thu, Jun 22, 2017 at 4:56 PM, <mweinberg...@email.de> wrote:

>
> Please try http_ssl = true instead of "1" and test it again.
>
> BR,
> Marcel
> *Gesendet:* Donnerstag, 22. Juni 2017 um 13:50 Uhr
> *Von:* "Umar Draz" <unix...@gmail.com>
> *An:* "Icinga User's Corner" <icinga-users@lists.icinga.org>
> *Betreff:* Re: [icinga-users] https url monitoring failed
> Hi
>
> I think something bad with Icinga look at that my configuration for https
> monitor
>
> object Host "mysite <http://mysite.com/>" {
>     address = "umardraz.com <http://mysite.com/>"
>     check_command = "http"
>     vars.http_vhosts["wwwumardraz.com:443 <http://www.mysite.com:443/>"]
> = {
>         http_uri = "/"
>         http_ssl = "1"
>     }
>  }
>
> But in host problems I saw this
>
> connect to address umardraz.com and port 80: connection refused.
> HTTP CRITICAL - Unable to open TCP socket
>
> Why icinga still hitting http?
>
> Regards
>
> On Wed, Jun 21, 2017 at 9:43 AM, Gerald Vogt <v...@spamcop.net> wrote:
>>
>> 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
>
> _______________________________________________ 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
>
>
_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to