31 Jan
2005
31 Jan
'05
9:06 p.m.
I'd like to be able to define a macro which replaces several recipient lines. So for example, if many host groups always have a set of four SCRIPT recipients, it would be nice to be able to just define $STANDARDSCRIPTS at the top, and use that macro later.
Why not simply have one script that calls the other four ?
Well, it's probably easier if I show you:
SCRIPT /opt/bb/server/ext/email onduty SERVICE=procs RECOVERED
SCRIPT /opt/bb/server/ext/email ops SERVICE=procs RECOVERED
SCRIPT /opt/bb/server/ext/email onduty SERVICE=http,ping DURATION>6 RECOVERED
SCRIPT /opt/bb/server/ext/email ops SERVICE=http,ping DURATION>6 RECOVERED
SCRIPT /opt/bb/server/ext/email ops EXSERVICE=procs,http,ping RECOVERED
This set of recipient lines shows up often in my hobbit-alerts.cfg. I could trim it a bit if I modified the 'email' script to accept multiple addresses (5 lines to 3).
A related question: If I don't define COLOR anywhere in the rule, it should by default alert on 'red', correct?
-- Bruce Z. Lysik <blysik at shutterfly.com> Operations Engineer