[hobbit] http response time

Ralph Mitchell ralphmitchell at gmail.com
Thu May 8 17:11:48 CEST 2008


On Thu, May 8, 2008 at 1:01 AM, Rolf Schrittenlocher <
schritte at hebis.uni-frankfurt.de> wrote:

> Hi Ralph,
>
> I don't think there is something like that in hobbit. But you might want
> to create a custom script including something like (perl)
>
> # Aktuelles Datum
> $t0          = time;
> $ZEITSTEMPEL = localtime($t0);
>
> ##################################################################
> # Check Website
> ##################################################################
> #
> system("wget -o /dev/null -O /tmp/ \"$REQUEST\" 2>/dev/null");
>
> # Bestimmung des Ergebnissstatuses aus der Antwortzeit.
> $elapsed = time - $t0;
> if ( $elapsed <= 6 ){
>  $STATUS = $OPTIMAL;
> }
> elsif ( $elapsed <= 12 ){
>  $STATUS = $WARNUNG;
> }
> else {
>  $STATUS = $FEHLER;
> }


Thanks for that.  If I have to I'll do something similar in bash with curl,
as I'm more familiar with that:

   elapsed=`curl -s -S -L -w '%{time_total}' http://server.domain.com`

which gives me time in seconds, with millisecond resolution.

I'd like to get the graphs as well, without having to fiddle with the
message format.

Ralph Mitchell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20080508/66e0a682/attachment.html>


More information about the Xymon mailing list