At 09:14 AM 10/12/01 -0400, [EMAIL PROTECTED] wrote:
>1) What is the behavior of upalerts with respect to the "exit=value"
>parameter?
Success is defined as a 0 exit status, so I believe upalerts are only sent
when exit=0. However it looks like the alert code still reads the exit=
parameter, which would imply that if you use the syntax 'upalert
exit={value != 0}', you will never get an upalert.
But someone else should confirm my reading of the code. If this is true, we
should probably modify the config file checking to notice these kinds of
definitions and warn/error out on them.
>2) Is it possible to call an alert script without mon registering it as an
>alert?
No.
>I know this sounds like a bizarre idea, but I am trying to use the
>"exit=" parameter to the alert script to limit when an email alert is sent
>out, while still logging all failures.
Yes, I hear you. What I did is standardize all my alert scripts to use
0=success, 1="real failure", and >2 to mean "some sort of warning condition
not meriting an alert". I really didn't care about logging SNMP timeout
failures, etc. I only wanted to log real, verified failures.
The real solution it seems, is for mon to allow us to utilize $STAT_WARN,
which I didn't even realize existed until recently but AFAICT is never
used, except in one part of the trap handling code.
The 'yellow' state in mon.cgi is really just a hack, and mon should IMHO
have a legitimate WARN status.
andrew