monit-general
[Top][All Lists]
Advanced

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

Re: Trying to use both hostheader and checksum


From: Lukasz Piwowarek
Subject: Re: Trying to use both hostheader and checksum
Date: Wed, 14 Mar 2012 15:00:37 -0600

Callum,

What version of Monit are you running? Im sitting here on 5.0.3 and hostheader is not supported I think.

I also saw a thread that in version 5.1.0 the support for this function was broken and had to be patched - consider compiling latest release from source and give that a try.

Lukasz

On Wed, Mar 14, 2012 at 1:23 PM, Callum Macdonald <address@hidden> wrote:
Thanks for the reply Lukasz.

with is a noise keyword AFAIK:

You can use noise keywords like 'if', `and', `with(in)', `has', `using',
'use', 'on(ly)', `usage' and `program(s)' anywhere in an entry to make
it resemble English. They're ignored, but can make entries much easier
to read at a glance. The punctuation characters ';' ',' and '=' are also
ignored. Keywords are case insensitive.

Unless I'm missing something, your suggested syntax is therefore the
same as what I have tried. Or did I misunderstand?

Cheers - Callum.

On Wed, 2012-03-14 at 13:19 -0600, Lukasz Piwowarek wrote:
> I think the correct syntax should be:
>
> with
>     hostheader 'example.tld'
>     checksum 'derpderp'
> for
>     2 cycles
> then
>     restart
>
> The tabbing is not needed but I use it like this.
>
> Cheers
>
> Lukasz
>
> On Wed, Mar 14, 2012 at 11:07 AM, Callum Macdonald
> <address@hidden> wrote:
>         I have this within my /etc/monit/conf.d/apache.mon file:
>
>         check process apache with pidfile /var/run/apache2.pid
>         if failed host 10.0.0.1 port 80 protocol http
>                and request '/path/to/file.html'
>                with hostheader 'example.tld'
>                with checksum aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaf
>                for 2 cycles
>                then restart
>
>         Then `sudo monit -t` produces:
>         /etc/monit/conf.d/apache.mon:5: Error: syntax error 'checksum'
>
>         With either hostheader OR checksum, tI get syntax ok. But with
>         both, I
>         always get an error on one or the other.
>
>         I'm struggling to figure out what the issue is. I've been over
>         the docs
>         for this section again and again. The manual says:
>
>         PROTO(COL) HTTP [REQUEST {"/path"} [with HOSTHEADER "string"]
>         [with
>         CHECKSUM checksum]
>
>         if failed host 192.168.1.100 port 8080 protocol http
>             and request '/testing' hostheader 'example.com'
>             with timeout 20 seconds for 2 cycles
>          then alert
>
>         What am I missing? How do I use both hostheader and checksum?
>
>         Cheers - Callum.
>
>         ==
>         Callum Macdonald
>
>         Morocco mobile: +212 652 060 089
>         UK mobile: +44 7968 378 810
>         Desk: +44 845 126 0875
>         www.callum-macdonald.com
>
>
>
>
>         --
>         To unsubscribe:
>         https://lists.nongnu.org/mailman/listinfo/monit-general
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general



--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


reply via email to

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