[Xymon] alert e-mail scripts

KING, KEVIN KK1051 at att.com
Thu Sep 27 16:59:12 CEST 2018


Xymoners,

I am running 4.3.28 xymon. I am working on a newer server that I want to use a custom script for the e-mail. I have a couple of old e-mail scripts that I used in the past. They are just simple scripts to test all your variables pass and it sends a mail. I use this to test and build the new script I want. Ok so nothing is working like it should. The sript will run from command line but when I run it from the alert.cfg file, it just puts "no mail" in the log. It is like it is trying to read mail and not send it.

I have not gone back and looked to see if mail scripts work differently. I even searched the archive mail for some sample scripts.
Here is the line from alerts.cfg
CLASS=%MP  COLOR=red
        MAIL ltxxxx at xxx jlxxxx at xxx kkxxxx at xxx REPEAT=1d TIME=*:0730:2100
        SCRIPT /usr/local/xymon/server/ext/mail_generic.ksh kkxxxx at xxx

Here is my script (sample from mail archives):

#!/usr/bin/ksh
RECIPIENT=$1
LOGGROUP=$2
CALL_LEVEL=medium
[ "$BBCOLORLEVEL" = "RED" ] && CALL_LEVEL=high

echo '
Hi $RECIPIENT

Please log a $CALL_LEVEL call to $LOGGROUP, with the subject
\"$BBHOSTNAME - $BBSVCNAME problem - Please Investigate.\"
Please include this link in the service call ticket for more information
$(echo $BBALPHAMSG | grep http)

Thanks
    Monitoring.
' | mailx $RECIPIENT


>From alert.log

Received reload request
Received reload request
No mail.
No mail.
No mail.
No mail.
No mail.
No mail.
No mail.
No mail.
No mail.
No mail.
No mail.
No mail.
No mail.
No mail.
No mail.
No mail.
No mail.
Received reload request
Received reload request
Received reload request
Received reload request

Kevin H. King *
"You can not please everyone everyday, But everyday please everyone you can" -me

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20180927/c2dfcbd0/attachment.html>


More information about the Xymon mailing list