I'm sorry for reposting this; I was looking for the patches in the list archive (because I temporarily lost them) and noticed that the original post seems to have gotten mangled in the archive.
----- Forwarded by Dan Urist/SYS/Boston/LoomisSayles on 01/09/02 01:48 PM
-----
Dan Urist
To: [EMAIL PROTECTED]
11/07/01 02:34 cc:
PM Subject: patches for alert severity
levels
Here are some patches for mon, Client.pm and mon.cgi that add support for
severity levels for alerts. The basic idea is to be able to map the exit
value of a monitor, or a range of exit values, to an arbitrary severity
level which can then be used by clients such as mon.cgi. The default
severity value for a failure is 1, which is the highest level. In mon.cgi,
I've defined severity levels 1, 2 and 3 for failures of decreasing
severity, and 9 for protocol or monitor failures that don't indicate a
service failure.
So now you can do something like this, for monitors that give back an exit
range (e.g. my hacked version of netsnmp-freespace.monitor):
alert exit=70-80 severity=3
# Do nothing, but this will show up as yellow in mon.cgi
alert exit=80-90 severity=2 mail.alert _APP_ADMIN_ # This shows
up as amber in mon.cgi
alert exit=90-100 severity=1 qpage.alert _ON_CALL_ # This shows up
as red in mon.cgi
alert exit=2 severity=9 mail.alert _MON_ADMIN_ # This
shows up as purple in mon.cgi
Or, for monitors that give exit code 1 for a legitimate service failure and
2 for a monitor/protocol error:
alert exit=1 severity=1 mail.alert _DBA_ADMIN_ # DBAs get alerts for
real errors
alert exit=2 severity=9 mail.alert _MON_ADMIN_ # Mon administrator gets
email for a monitor or protocol error
You can also prioritize failures using severity levels; for example,
production failures can be severity 1 and development failures can be
severity 2 (or 3), and now in mon.cgi these will show up as different
colors regardless of whether alerts have been sent.
(See attached file: Client.pm.diff)(See attached file: mon.cgi.diff)(See
attached file: mon.diff)
Client.pm.diff
Description: Binary data
mon.cgi.diff
Description: Binary data
mon.diff
Description: Binary data
