Xymon Mailing List Archive search

Is setting high importance on alert emails possible?

list Josh Luthman
Wed, 22 Dec 2010 09:25:21 -0500
Message-Id: <AANLkTiknU2z=o1H592ASgnB=user-63e8b003f007@xymon.invalid>

Thanks for sharing and testing!
On Dec 22, 2010 9:21 AM, "Nordquist, Daniel" <
user-b7c65cb59f49@xymon.invalid> wrote:
Works great! Thanks a lot for putting up with my ignorance... =-)


From: Ralph Mitchell [mailto:user-00a5e44c48c0@xymon.invalid]
Sent: Tuesday, December 21, 2010 3:49 PM
To: xymon at xymon.com
Subject: Re: [xymon] Is setting high importance on alert emails possible?

I haven't tested it, but something like this ought to do it:

#!/bin/bash

case $BBCOLORLEVEL in
red)
STATUS="CRITICAL"
;;
yellow)
STATUS="WARNING"
;;
purple)
STATUS="stopped reporting"
;;
*)
STATUS="unknown status"
;;
esac

MESSAGE="To: $RCPT
Subject: $BBHOSTNAME $STATUS
Content-Type: text/plain
X-Priority: 1 (Highest)
X-MSMail-Priority: High

$BBALPHAMSG"

echo "$MESSAGE" | sendmail -t
exit 0


Ralph Mitchell


On Tue, Dec 21, 2010 at 12:43 PM, Nordquist, Daniel <
user-b7c65cb59f49@xymon.invalid<mailto:user-b7c65cb59f49@xymon.invalid>>
wrote:
Thank you!

I'm a noob at this so I'm not familiar with how to format a script. Can
you point me to a good page where I can see some examples?


From: Ralph Mitchell [mailto:user-00a5e44c48c0@xymon.invalid<mailto:
user-00a5e44c48c0@xymon.invalid>]
Sent: Tuesday, December 21, 2010 11:46 AM
To: xymon at xymon.com<mailto:xymon at xymon.com>
Subject: Re: [xymon] Is setting high importance on alert emails possible?

There's an email header that needs to be inserted. Here's an example:

http://techonthenet.com/unix/high_priority.php

You'll need to change your alert config to use SCRIPT instead of MAIL,
then write a script to pick up the relevant info from the environment
variables listed in the xymon-alerts help page. You don't need to write
everything to a file, just use a big echo statement and pipe it through
sendmail. The blank line between the headers and the message body is
important...

Ralph Mitchell

On Tue, Dec 21, 2010 at 10:15 AM, Josh Luthman <
user-4c45a83f15cb@xymon.invalid<mailto:user-4c45a83f15cb@xymon.invalid>> wrote:
I think if it's available with the command Henrik made it would have
been documented. If not documented, I'd count on it not existing.

What you'll probably need to do is call upon your own script to send
the email and you can change that with whatever mail command you use.

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX


On Tue, Dec 21, 2010 at 10:11 AM, Nordquist, Daniel
<user-b7c65cb59f49@xymon.invalid<mailto:
user-b7c65cb59f49@xymon.invalid>> wrote:
Hey all, I doubt I can do this but maybe someone knows a trick...


I'd like to be able to send email alerts with a high importance flag
based
on the alert color and/or specific server or service that is down.


Is there any way to do this? I've scoured the man pages but can't find
anything.


Thanks,

Dan


This e-mail message and any attached files are confidential and are
intended
solely for the use of the addressee(s) named above. If you are not the
intended recipient, any review, use, or distribution of this e-mail
message
and any attached files is strictly prohibited.

This communication may contain material protected by Federal privacy
regulations, attorney-client work product, or other privileges. If you
have
received this confidential communication in error, please notify the
sender
immediately by reply e-mail message and permanently delete the original
message. To reply to our email administrator directly, send an email to:
user-40803320aaf5@xymon.invalid<mailto:user-40803320aaf5@xymon.invalid> .

If this e-mail message concerns a contract matter, be advised that no
employee or agent is authorized to conclude any binding agreement on
behalf
of Orlando Health by e-mail without express written confirmation by an
officer of the corporation. Any views or opinions presented in this
e-mail
are solely those of the author and do not necessarily represent those of
Orlando Health.
xymon-unsubscribe at xymon.com<mailto:xymon-unsubscribe at xymon.com>


This e-mail message and any attached files are confidential and are
intended solely for the use of the addressee(s) named above. If you are not
the intended recipient, any review, use, or distribution of this e-mail
message and any attached files is strictly prohibited.

This communication may contain material protected by Federal privacy
regulations, attorney-client work product, or other privileges. If you have
received this confidential communication in error, please notify the sender
immediately by reply e-mail message and permanently delete the original
message. To reply to our email administrator directly, send an email to:
user-40803320aaf5@xymon.invalid<mailto:user-40803320aaf5@xymon.invalid> .
If this e-mail message concerns a contract matter, be advised that no
employee or agent is authorized to conclude any binding agreement on behalf
of Orlando Health by e-mail without express written confirmation by an
officer of the corporation. Any views or opinions presented in this e-mail
are solely those of the author and do not necessarily represent those of
Orlando Health.

This e-mail message and any attached files are confidential and are
intended solely for the use of the addressee(s) named above. If you are not
the intended recipient, any review, use, or distribution of this e-mail
message and any attached files is strictly prohibited.

This communication may contain material protected by Federal privacy
regulations, attorney-client work product, or other privileges. If you have
received this confidential communication in error, please notify the sender
immediately by reply e-mail message and permanently delete the original
message. To reply to our email administrator directly, send an email to:
user-40803320aaf5@xymon.invalid .
If this e-mail message concerns a contract matter, be advised that no
employee or agent is authorized to conclude any binding agreement on behalf
of Orlando Health by e-mail without express written confirmation by an
officer of the corporation. Any views or opinions presented in this e-mail
are solely those of the author and do not necessarily represent those of
Orlando Health.