Here it comes...

D'oh!

I read that section before, but the lightbulb over my head never turned on until just now...

Thanks for the pointer.  Still, maybe the man page should be changed to be more specific regarding the contents of MON_LAST_OUTPUT and MON_LAST_SUMMARY...you know, for stupid people...not me :)



David Nolan <[EMAIL PROTECTED]>

03/09/2005 02:13 PM

To
[EMAIL PROTECTED], mon@linux.kernel.org
cc
Subject
Re: Bug fixed?







--On Wednesday, March 09, 2005 2:01 PM -0600 [EMAIL PROTECTED] wrote:

> With "...the last time it exited" being directly before the alert was
> called.  I guess I don't see how it would be useful to have the results
> from two runs ago.  How is the alert script supposed to send any sort of
> relevent information unless it gets the output from the most recent run?
> Alternatively, is there another variable which would tell me the output
> from the most recent monitor run?

The output from the most recent run comes on STDIN.

>From the man page:
"The first line from standard input must be used as a brief summary of the
problem, normally supplied as the subject line of an email, or text sent to
an alphanumeric pager. Interpretation of all subsequent lines read from
stdin is left up to the alerting program."

And the reason to get both is so the alert about the end of the failure can
optionally include information about the failure.  Going back to my earlier
example, with output messages of 'Failure of XYZ' and 'Status OK', when
processing the upalert for the second pass, you might want your message
contents to look something like:
Current Status:
Status OK
Previous Status:
Failure of XYZ


-David Nolan
Network Software Designer
Computing Services
Carnegie Mellon University


_______________________________________________
mon mailing list
mon@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon

Reply via email to