[hobbit] Alert macro syntax

Henrik Stoerner henrik at hswn.dk
Tue Feb 22 17:35:52 CET 2005


On Tue, Feb 22, 2005 at 11:13:30AM -0500, Kevin.Hanrahan at novainfo.com wrote:

>  I could use some help with the syntax for alert using macros. I tried
> defining servers as such:
> 
> $GROUP1=server1 server2 server3
> $SYSADMIN=kevin at domain.com
> HOST=$GROUP1
>         MAIL $SYSADMIN COLOR=red REPEAT=15m RECOVERED

This is wrong.

When you use macros, you must remember that it's purely a text
substitution.

If you did not use macros, you'd write the rule as

   HOST=%server1|server2|server3

So to do that with a macro, the macro must be defined exactly like
that. Thus:

 $GROUP1=%server1|server2|server3
 $SYSADMIN=kevin at domain.com
 HOST=$GROUP1
         MAIL $SYSADMIN COLOR=red REPEAT=15m RECOVERED


Henrik



More information about the Xymon mailing list