monit-dev
[Top][All Lists]
Advanced

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

Re: url content checking / monitoring


From: Jan-Henrik Haukeland
Subject: Re: url content checking / monitoring
Date: Fri, 03 Dec 2004 01:02:21 +0100

On Thu, 2004-12-02 at 11:12 -0800, alex black wrote:

> This syntax proposed by martin:
> 
>   check host myhost with address 192.168.1.1
>      if failed url http://user:address@hidden:8080/index.php
>        [and content {contains|notcontains|equals|notequal} "^my 
> regular*expression$"]
>        [with checksum 8f7f419955cefa0b33a2ba316cba3659]
>        then alert
> 
> Assumptions:
> 
>       -this could be made to work without an IP address specification (so as 
> to check that DNS is functioning as well :) (very minor and ignorable)

Yep, this is already taken care of in the existing check-host test. I.e.
you can use an ip-address as in the example given by Martin or a host
name which will be looked up, see the example below.

>       -this would work with apache virtualhosts which rely on the hostname 
> in the request to determine what content to serve (client would be curl 
> or similar?)

This will work as expected. The client is monit and it sends the Host-
header required for server name virtual hosts in http/1.1.

>       -checksum would be of the return payload from the HTTP transaction (an 
> MD5sum of a curl download? - this would be AWESOME 

No need to use future tense, monit does this now in the current version.
For example (NB I haven't computed the checksum in this example so it's
wrong)

        check host www.gnu.org with address www.gnu.org
              if failed port 80 protocol http
                 and request "/index.html"
                     with checksum 8f7f419955cefa0b33a2ba316cba3659
              then alert 

This is mentioned in the monit man page and in the flash presentation.

> would need to clearly state the process used to generate the checksum 
> (I've had problems with varying md5 implementations before :P)

We use GNU MD5 code, same as the one used in md5sum(1). But md5 is md5,
if you had problems, you had a buggy implementation. Thanks to Christian
we also support SHA1 checksum as well.











reply via email to

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