Xymon Mailing List Archive search

MACROS

5 messages in this thread

list Kevin Hanrahan · Wed, 30 Mar 2005 17:33:45 -0500 ·
Hello all,
 when using macros to define a group of email addresses, is there a
delimiter required to string them together?? Or do I need to enclose them in
quotes?...as in:

$ALERTGROUP=user-490a14721d84@xymon.invalid user-0ea294303ceb@xymon.invalid user-85a97e0c328b@xymon.invalid

 or

$ALERTGROUP="user-490a14721d84@xymon.invalid user-0ea294303ceb@xymon.invalid user-85a97e0c328b@xymon.invalid"

 or maybe 

$ALERTGROUP=%user-490a14721d84@xymon.invalid|user-0ea294303ceb@xymon.invalid|user-85a97e0c328b@xymon.invalid    (pipe
delimited)

Which would be correct?...if any

Thanks


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 · Thu, 31 Mar 2005 05:08:36 +0200 ·
quoted from Kevin Hanrahan
On Wed, Mar 30, 2005 at 05:33:45PM -0500, user-fd47fec4b039@xymon.invalid wrote:
Hello all,
 when using macros to define a group of email addresses, is there a
delimiter required to string them together?? Or do I need to enclose them in
quotes?...as in:
None of that is needed. This one
$ALERTGROUP=user-490a14721d84@xymon.invalid user-0ea294303ceb@xymon.invalid user-85a97e0c328b@xymon.invalid
will work, assuming you use it like

    HOST=*
        MAIL $ALERTGROUP COLOR=red

Comma-delimited also works for some people, but that depends on your
"mail" program. Why? Because a definition like this

  $ALERTGROUP=user-490a14721d84@xymon.invalid,user-0ea294303ceb@xymon.invalid,user-85a97e0c328b@xymon.invalid

ends up being passed as a command-line parameter to the $MAIL
program. So if your mail-program understands a list of recipients
separated by commas, it is actually more efficient because Hobbit only
needs to run the mail program once with the comma-separated list of
recipients.


Regards,
Henrik
list Adam Goryachev · Thu, 31 Mar 2005 13:25:34 +1000 ·
quoted from Henrik Størner
Comma-delimited also works for some people, but that depends on your
"mail" program. Why? Because a definition like this

  $ALERTGROUP=user-490a14721d84@xymon.invalid,user-0ea294303ceb@xymon.invalid,user-85a97e0c328b@xymon.invalid

ends up being passed as a command-line parameter to the $MAIL
program. So if your mail-program understands a list of recipients
separated by commas, it is actually more efficient because Hobbit only
needs to run the mail program once with the comma-separated list of
recipients.
Does hobbit understand that the comma delimited are actually individual
email addresses for the purpose of deciding who to page? ie, say you had
another rule which said don't page user-0ea294303ceb@xymon.invalid, would it know to
remove user-0ea294303ceb@xymon.invalid from the rule?

I'm assuming it doesn't, as otherwise, I assume it would know they are
individual addresses and pass them individually to mail....

Regards,
Adam

-- 
 -- 
Adam Goryachev
Website Managers
Ph:  +XX X XXXX XXXX                        user-eaec2ffb4cbc@xymon.invalid
Fax: +XX X XXXX XXXX                        www.websitemanagers.com.au
list Asif Iqbal · Thu, 31 Mar 2005 00:07:23 -0500 ·
quoted from Henrik Størner
On Thu, Mar 31, 2005 at 05:08:36AM, Henrik Stoerner wrote:
On Wed, Mar 30, 2005 at 05:33:45PM -0500, user-fd47fec4b039@xymon.invalid wrote:

[...]
None of that is needed. This one
$ALERTGROUP=user-490a14721d84@xymon.invalid user-0ea294303ceb@xymon.invalid user-85a97e0c328b@xymon.invalid
will work, assuming you use it like

    HOST=*
        MAIL $ALERTGROUP COLOR=red

Comma-delimited also works for some people, but that depends on your
"mail" program. Why? Because a definition like this

  $ALERTGROUP=user-490a14721d84@xymon.invalid,user-0ea294303ceb@xymon.invalid,user-85a97e0c328b@xymon.invalid
The only reason I like to use space separated instead of comma separated
is such, space separated email addresses only shows itself in the To:
header and _not_ all the email addresses.

There could be two reasons why I like to have not all emails in the same
To: header.

1. If anyone one wants to reply they won't reply to all. Some MUA are
makes it easier to do that possible mistake.
2. I would not want my oncall email address to be visible to other
groups who requested to get email alerts as well.

My two cents.

-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"..there are two kinds of people: those who work and those who take the credit...try
 to be in the first group;...less competition there."  - Indira Gandhi
list Henrik Størner · Thu, 31 Mar 2005 09:05:30 +0200 ·
quoted from Adam Goryachev
On Thu, Mar 31, 2005 at 01:25:34PM +1000, Adam Goryachev wrote:
Comma-delimited also works for some people, but that depends on your
"mail" program. Why? Because a definition like this

  $ALERTGROUP=user-490a14721d84@xymon.invalid,user-0ea294303ceb@xymon.invalid,user-85a97e0c328b@xymon.invalid

ends up being passed as a command-line parameter to the $MAIL
program. So if your mail-program understands a list of recipients
separated by commas, it is actually more efficient because Hobbit only
needs to run the mail program once with the comma-separated list of
recipients.
Does hobbit understand that the comma delimited are actually individual
email addresses for the purpose of deciding who to page? ie, say you had
another rule which said don't page user-0ea294303ceb@xymon.invalid, would it know to
remove user-0ea294303ceb@xymon.invalid from the rule?
No, Hobbit doesn't do any parsing of the recipient addresses - they
are blindly passed on to the mail- or script-program.


Regards,
Henrik