variables in hobbit-alerts.cfg
So I have a fancy new mail filter script that allows me to send mail to admins+servername at mail.blah.com 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+$BBHOSTNAME at mail.blah.com
tries to sent the message to admins+$BBHOSTNAME at mail.blah.com.
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/>
Rob,
So I have a fancy new mail filter script that allows me to send mail to admins+servername at mail.blah.com 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+$BBHOSTNAME at mail.blah.comtries to sent the message to admins+$BBHOSTNAME at mail.blah.com.
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 david.baldwin at ausport.gov.au 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.
In <45698937-63B0-4D11-AD06-26206293EEFE at skurfer.com> Rob McBroom <mailinglist0 at skurfer.com> writes:
It seems I can match on hostname (HOST=3Dxyz) 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+$BBHOSTNAME at mail.blah.com
tries to sent the message to admins+$BBHOSTNAME at mail.blah.com.
Nice idea. Not possible currently, sorry.
Regards, Henrik
participants (3)
-
david.baldwin@ausport.gov.au
-
henrik@hswn.dk
-
mailinglist0@skurfer.com