Alert macro syntax
list Kevin Hanrahan
Hi all,
I could use some help with the syntax for alert using macros. I tried
defining servers as such:
$GROUP1=server1 server2 server3
$GROUP2=server4
And then defined a pagegroup as such:
$SYSADMIN=user-490a14721d84@xymon.invalid
Then I made some rules:
HOST=$GROUP1
MAIL $SYSADMIN COLOR=red REPEAT=15m RECOVERED
HOST=$GROUP2
MAIL $SYSADMIN COLOR=red REPEAT=15m RECOVERED
The rule for GROUP2 works as it should but the rule for GROUP1 (the one with
multiple servers) does nothing at all! I have tried enclosing the multiple
server names in quotes like this:
$GROUP1="server1 server2 server3"
But that made no difference....still no alerts. Can someone tell me the
proper syntax for defining multiple items in a macro?
Thank you.
Kevin
Note: The information contained in this email and in any attachments is
intended only for the person or entity to which it is addressed and may
contain confidential and/or privileged material. Any review,
retransmission, dissemination or other use of, or taking of any action in
reliance upon, this information by persons or entities other than the
intended recipient is prohibited. The recipient should check this email and
any attachments for the presence of viruses. Sender accepts no liability
for any damages caused by any virus transmitted by this email. If you have
received this email in error, please notify us immediately by replying to
the message and delete the email from your computer. This e-mail is and any
response to it will be unencrypted and, therefore, potentially unsecure.
Thank you. NOVA Information Systems, Inc.
list Henrik Størner
▸
On Tue, Feb 22, 2005 at 11:13:30AM -0500, user-fd47fec4b039@xymon.invalid wrote:
I could use some help with the syntax for alert using macros. I tried defining servers as such: $GROUP1=server1 server2 server3
$SYSADMIN=user-490a14721d84@xymon.invalid
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=user-490a14721d84@xymon.invalid
HOST=$GROUP1
MAIL $SYSADMIN COLOR=red REPEAT=15m RECOVERED
Henrik
list Kevin Hanrahan
Thanks, that worked nicely.
▸
-----Original Message-----
From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid]
Sent: Tuesday, February 22, 2005 11:36 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Alert macro syntax
On Tue, Feb 22, 2005 at 11:13:30AM -0500, user-fd47fec4b039@xymon.invalid wrote:
I could use some help with the syntax for alert using macros. I tried
defining servers as such:
$GROUP1=server1 server2 server3
$SYSADMIN=user-490a14721d84@xymon.invalid
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=user-490a14721d84@xymon.invalid
HOST=$GROUP1
MAIL $SYSADMIN COLOR=red REPEAT=15m RECOVERED
Henrik
Note: The information contained in this email and in any attachments is
intended only for the person or entity to which it is addressed and may
contain confidential and/or privileged material. Any review,
retransmission, dissemination or other use of, or taking of any action in
reliance upon, this information by persons or entities other than the
intended recipient is prohibited. The recipient should check this email and
any attachments for the presence of viruses. Sender accepts no liability
for any damages caused by any virus transmitted by this email. If you have
received this email in error, please notify us immediately by replying to
the message and delete the email from your computer. This e-mail is and any
response to it will be unencrypted and, therefore, potentially unsecure.
Thank you. NOVA Information Systems, Inc.