Thanks for the patch, i've made a simple monitor to check for http content
and produces shor and concise messages designed for pagers or cellphones,
it's a very lame bash script that uses lynx and grep, but strangely it
uses far less processor than lwp-http.monitor, (it hogged the k6-2/500
where mon is running)
Should i post it, anyone interested ??
-----Original Message-----
From: Jim Trocki <[EMAIL PROTECTED]>
To: El Farto <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Date: Wed, 12 Feb 2003 09:07:07 -0800 (PST)
Subject: Re: MON_DESCRIPTION not avail to monitors ?
> On Tue, 11 Feb 2003, El Farto wrote:
>
> > using bash and lynx, since lwp-http.monitor hogged my CPU, i need to
> pass
> > to this script of mine the description of the service being
> monitored,
> > the problem is that the man page says that MON_DESCRIPTION is
> available
> > to monitors, but that doesn�t seem to be the case, i even did a env
> dump
> > in my monitor script and i have found no reference to that variable,
> > although other MON variables were present.
> > So, this is a bug that should be reported, or i�m missing something ?
>
> yep, it's an omission. MON_DESCRIPTION is set for alerts but not
> monitors.
>
> apply this patch:
>
> diff -ruN mon-0.99.2/mon mon-0.99.2-new/mon
> --- mon-0.99.2/mon Sat Sep 8 09:42:05 2001
> +++ mon-0.99.2-new/mon Wed Feb 12 12:03:58 2003
> @@ -3057,6 +3057,7 @@
> $ENV{"MON_FIRST_FAILURE"} = $sref->{"_first_failure"};
> $ENV{"MON_DEPEND_STATUS"} = $sref->{"_depend_status"};
> $ENV{"MON_LAST_SUCCESS"} = $sref->{"_last_success"};
> + $ENV{"MON_DESCRIPTION"} = $sref->{"description"};
> $ENV{"MON_STATEDIR"} = $CF{"STATEDIR"};
> $ENV{"MON_LOGDIR"} = $CF{"LOGDIR"};
> exec @args or syslog ('err', "could not exec '@args': $!")
_______________________________________________
mon mailing list
[EMAIL PROTECTED]
http://linux.kernel.org/mailman/listinfo/mon