monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monit± Protocol test on high port returns 404 even if website is pr


From: Martin Pala
Subject: Re: [Monit± Protocol test on high port returns 404 even if website is present
Date: Wed, 31 May 2017 16:06:21 +0200

The server jabber.systemli.org rejects HEAD method requests for the given URL 
with 404 (monit uses HEAD by default to reduce traffic).

The following configuration works fine (switching method to GET):

check host jabber-register-website with address jabber.systemli.org
   if failed
      port 5281
      protocol https
      method GET
      request "/register_web"
      for 2 times within 3 cycles
   then alert

Best regards,
martin


> On 31 May 2017, at 15:32, shadow <address@hidden> wrote:
> 
> Hello Martin,
> 
> I'm running on
> 
>> monit -V
>> This is Monit version 5.22.0
> As far as I know, the hostname matches the virtual server name.
> 
> It is possible to curl it such as:
> 
>> curl https://jabber.systemli.org:5281/register_web
> 
> cheers shadow
> 
> On 31.05.2017 15:13, Martin Pala wrote:
>> Hello,
>> 
>> which Monit version it is? (CLI: monit -V)
>> 
>> If you use hostname-based virtual server with SSL, Monit >= 5.13.0 is 
>> required for SSL SNI support.
>> 
>> The host in the "address" show match the name of the virtual server - you 
>> can also override it by adding the "host" option explicitly to the test:
>> 
>>   if failed
>>      port 5281
>>      protocol https
>>      host "website.com"   # <---- sets the host header
>>      request "/register_web"
>>      for 2 times within 3 cycles
>>   then alert
>> 
>> Best regards,
>> Martin
>> 
>> 
>>> On 31 May 2017, at 15:00, shadow <address@hidden> wrote:
>>> 
>>> Hello Monit community,
>>> 
>>> I ran into a monit error, which I can't solve by documentation or bymyself.
>>> 
>>> I try to monitor a website on a high port with monit. The site is up and
>>> running, but monit says it's not reachable.
>>> 
>>> Monit Config
>>>> check host jabber-register-website with address website.com
>>>>   if failed
>>>>      port 5281
>>>>      protocol https
>>>>      request "/register_web"
>>>>      for 2 times within 3 cycles
>>>>   then alert
>>> 
>>> 
>>> Error Message:
>>>> 'jabber-register-website' failed protocol test [HTTP] at 
>>>> [website.com]:5281/register_web [TCP/IP TLS] -- HTTP error: Server 
>>>> returned status 404
>>> 
>>> 
>>> When I curl the website:
>>> 
>>>> [14:43:45] address@hidden:~ $ curl https://website.com:5281/register_web   
>>>>          
>>>> <!DOCTYPE html>
>>>> <html>
>>>> <head>
>>>>   <meta charset="utf-8">
>>>>   <link 
>>>> href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css";
>>>>  rel="stylesheet" 
>>>> integrity="sha256-7s5uDGW3AHqw6xtJmNNtr+OBRJUlgkNJEo78P4b0yRw= 
>>>> sha512-nNo+yCHEyn0smMxSswnf/OnX6/KwJuZTlNZBjauKhTK0c+zT+q5JOCx0UFhXQ6rJR9jg6Es8gPuD2uZcYDLqSw=="
>>>>  crossorigin="anonymous">
>>>>   <script 
>>>> src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"; 
>>>> integrity="sha256-KXn5puMvxCw+dAYznun+drMdG1IFl3agK0p/pqT9KAo= 
>>>> sha512-2e8qq0ETcfWRI4HJBzQiA3UoyFk6tbNyG+qSaIBZLyW9Xf3sWZHN/lxe9fTh1U45DpPf07yj94KsUHHWe4Yk1A=="
>>>>  crossorigin="anonymous"></script>
>>> 
>>> What am I doing wrong?
>>> 
>>> Thanks for your help?
>>> 
>>> 
>>> -- 
>>> best regards | viele Gruesse, address@hidden
>>> 
>>> receive my key:
>>> gpg --keyserver zimmermann.mayfirst.org --recv-keys 0x5C6B6ED4248C1F32
>>> 
>>> 
>>> --
>>> To unsubscribe:
>>> https://lists.nongnu.org/mailman/listinfo/monit-general
>> 
> 
> -- 
> best regards | viele Gruesse, address@hidden
> 
> receive my key:
> gpg --keyserver zimmermann.mayfirst.org --recv-keys 0x5C6B6ED4248C1F32
> 
> 
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

[Prev in Thread] Current Thread [Next in Thread]