[hobbit] alerting macros

Henrik Stoerner henrik at hswn.dk
Tue Feb 1 07:49:32 CET 2005


On Mon, Jan 31, 2005 at 01:06:00PM -0800, Bruce Lysik wrote:
> 
> > >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

OK, I see. You can't define multi-line macros, but as your example
shows it would be useful. I'll see what I can do.

> A related question: If I don't define COLOR anywhere in the rule, it
>  should by default alert on 'red', correct?

To be exact, it will alert on the colors defined with the
"--alert-colors" option, but the default for that is to alert on red,
yellow and purple.


Henrik



More information about the Xymon mailing list