|
From: | Jan-Henrik Haukeland |
Subject: | Re: URL content checking [Vote] |
Date: | Tue, 25 Jan 2005 05:59:39 +0100 |
The new URL statement and content checking is finally added to monit. I'm swamped down in work so this has unfortunately taken more time than I hoped. Anyway, the statement can be used as follows:
check host FOO with address www.foo.bar if failed URL http://www.foo.bar:8080/?query#ref and content == "my regular.*expression$" and with timeout 15 seconds then ..The original plan to introduce a new "check URL" statement is dropped for now. I think the above should suffice? The new code is in the CVS and you can follow the instructions here http://savannah.nongnu.org/cvs/?group=monit to checkout monit using anonymous access. See also documentation in monit.pod.
I hope you will find this new code useful. Please let me know if this works for you.
Ps. When testing the content, monit will download up to max 1Mb from the http server or what's specified in the content-length header. This should be more than enough. Probably to much really.
On Dec 3, 2004, at 2:30, alex black wrote:
if I offer a bounty could it happen a liiiitle faster ? :)check URL http://blabla/foobar [add header "Set-Cookie: Customer=WILE_E_COYOTE; Path=/acme"] if failed content {contains|notcontains|equals|notequal}"^regex$" [with checksum 8f7f419955cefa0b33a2ba316cba3659] then alertvery cool.There will be changes during the implementation, but this is the start- plan. Another thing, there must be content size limitations, if regex isused, because regex need to compare the content in a buffer i.e. in memory.A couple hundred k seems reasonable? Or do you mean to suggest an adjustable buffer size?_very_ exciting :) _aOn Thu, 2004-12-02 at 09:59 -0800, Rory Toma wrote:+1 for me. <quote who="Jan-Henrik Haukeland">This is a nice feature and I propose that we try to implement this inmonit. We need to vote, if we should add this feature in monit. So please cast your votes! Here is mine +1 The proposal is as follows: ------------------------------------Add content monitoring to monit so the following requirements are meet:Check if a URL is up (responding) Check if a URL does or does not contain a stringThe only protocol supported for URL testing is HTTP(S). We suggest thefollowing syntax in monit's control file for this new functionality: On Dec 2, 2004, at 9:06 AM, Martin Pala wrote: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} "^myregular*expression$"] [with checksum 8f7f419955cefa0b33a2ba316cba3659] then alertIn addition I would like to suggest a short-form (not quite sure aboutthe syntax, only that a short-form would be nice): check URL myURLCollection if failed urls [ http://user:address@hidden/foobar?querystring http://user:address@hidden/foobar http://blabla3.com/foobar?querystring http://labla4.com/foobar?querystring http://user:address@hidden/foobar ....] # Space or newline separate url-entries then <action> The rationale for this varian is that if one should want to monitor several hundreds of URLs it is less to write and you can group URLs into collections. The URL-test should be conducted as follows, - Test all URLs in the list in one poll-session- If one or more URL failed, only send one and only one alert reportlisting those URLs that failed._______________________________________________ monit-dev mailing list address@hidden http://lists.nongnu.org/mailman/listinfo/monit-dev-- alex black founder the turing studio, inc. 2600 10th street, suite 635 berkeley, ca 94710 mail: address@hidden url : http://www.turingstudio.com tel : 510.666.0074 fax : 510.666.0093 _______________________________________________ monit-dev mailing list address@hidden http://lists.nongnu.org/mailman/listinfo/monit-dev
-- Jan-Henrik Haukeland Mobil +47 97141255
[Prev in Thread] | Current Thread | [Next in Thread] |