[Top][All Lists]

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

Re: [monit] Question about cpu monitoring and "expect" behaviour

From: Sébastien Wacquiez
Subject: Re: [monit] Question about cpu monitoring and "expect" behaviour
Date: Wed, 11 Mar 2009 20:01:26 +0100
User-agent: Mozilla-Thunderbird (X11/20080724)

Jan-Henrik Haukeland wrote:
> If your server is speaking HTTP proper, the correct way to send a HTTP
> request is to terminate with a blank line. Your regex does not parse
> either. If you want to ensure that each response line is at least 10
> bytes long you can use something like:
> Note that this will trigger on blank lines and a better option may be
> to search for a token returned from the server.
I don't want to check something fixed. I want to know if my stream work,
and for this I have to check that I can download more than 5kB. Do you
think there is a way to do this with monit ?

>> After some debugging, I found that monit
>> seems to stop himself at the first "\0" it found ... Is this the
>> expected beaviour ?
> No, only when reading HTTP headers which are supposed to stop with
> \r\n. Maybe the server did not send anymore data? Older versions of
> Monit _did_ use readline in expect which can stop on \n or \0 so to be
> sure you may want to update to Monit 5.

I'm sure that the server sended some data, his log say so (and a
wireshark too). But I only tryed with monit 4.10, I'll retry with a more
recent one.
> It is well known that Monit can emit XML and I would guess that any
> third-party plugin already use this XML format. The XML is easily
> available by using a format parameter to a Monit request. For
> instance, http://localhost:2812/_status?format=xml

Kewl :)

Sorry about this "stupid" question but this xml format is not mentionned
anywhere in the doc ... :)

Thanks !

reply via email to

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