Xymon Mailing List Archive search

variables in hobbit-alerts.cfg

3 messages in this thread

list Rob McBroom · Mon, 20 Sep 2010 16:09:59 -0400 ·
So I have a fancy new mail filter script that allows me to send mail to user-b958269c9b6b@xymon.invalid in order to reach the people responsible for servername.

I'd like to use this in hobbit-alerts, but I can't seem to find a way. It seems I can match on hostname (HOST=xyz) to decide where alerts should go, and I can get the hostname (BBHOSTNAME) inside of a custom SCRIPT, but I can't use it in the hobbit-alerts directly.

For instance, this

    MAIL admins+$user-bcd058156a9b@xymon.invalid

tries to sent the message to admins+$user-bcd058156a9b@xymon.invalid.

Yes, I can do an external script, but I'd really rather not recreate the messages Xymon is sending out anyway just to change the recipient. Is there a variable that represents the hostname in the alerts file?

Thanks.

-- 
Rob McBroom
<http://www.skurfer.com/>;
list David Baldwin · Tue, 21 Sep 2010 17:25:33 +1000 ·
Rob,
quoted from Rob McBroom
So I have a fancy new mail filter script that allows me to send mail to user-b958269c9b6b@xymon.invalid in order to reach the people responsible for servername.

I'd like to use this in hobbit-alerts, but I can't seem to find a way. It seems I can match on hostname (HOST=xyz) to decide where alerts should go, and I can get the hostname (BBHOSTNAME) inside of a custom SCRIPT, but I can't use it in the hobbit-alerts directly.

For instance, this

    MAIL admins+$user-bcd058156a9b@xymon.invalid

tries to sent the message to admins+$user-bcd058156a9b@xymon.invalid.

Yes, I can do an external script, but I'd really rather not recreate the messages Xymon is sending out anyway just to change the recipient. Is there a variable that represents the hostname in the alerts file?
  
Not a lot of work to do an external script. The message is either in an
ENV variable when you call the script, so no need to recreate the
message. Hostname is in a variable and can be substituted to your
heart's content.
http://xymon.sourceforge.net/docs/hobbit-alerts.html

If you want to do HTML e-mails then a script is required (see xymonton).
http://xymonton.trantor.org/doku.php/alerts

David.

-- 
David Baldwin - IT Unit
Australian Sports Commission          www.ausport.gov.au
Tel 02 62147830 Fax 02 62141830       PO Box 176 Belconnen ACT 2616
user-cbbf693f2c89@xymon.invalid          Leverrier Street Bruce ACT 2617


Keep up to date with what's happening in Australian sport visit http://www.ausport.gov.au

This message is intended for the addressee named and may contain confidential and privileged information. If you are not the intended recipient please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you receive this message in error, please delete it and notify the sender.
list Henrik Størner · Thu, 23 Sep 2010 12:03:21 +0000 (UTC) ·
In <user-6f368ab284e4@xymon.invalid> Rob McBroom <user-371ba9bb5b75@xymon.invalid> writes:
It seems I can match on hostname (HOST=3Dxyz) to decide where alerts =
quoted from David Baldwin
should go, and I can get the hostname (BBHOSTNAME) inside of a custom =
SCRIPT, but I can't use it in the hobbit-alerts directly.
For instance, this
   MAIL admins+$user-bcd058156a9b@xymon.invalid
tries to sent the message to admins+$user-bcd058156a9b@xymon.invalid.

Nice idea. Not possible currently, sorry.


Regards,
Henrik