Hi Team.
I am writing to regarding an facing issue which we are facing after
configuring xymon
XYMON is working fine and alerts are getting displayed , but the same are
being sent in email but subject, body is blank as given in end of email
I have given alerts.cfg as below.
• *
*HOST=* SERVICE=ssh,disk,msg,sap_r3,oratns COLOR=red DURATION>2m*
*SCRIPT /home/sapxymon/server/etc/custom_alert.sh REPEAT=1m*
.
Wheres the custom_alerts.sh give below syntax error.
#-----------------------------------------------------
#!/bin/sh
BBALPHAMSG=`echo "$BBALPHAMSG" |
/home/sapxymon/server/ext/custom_grep.pl`;export
BBALPHAMSG
if [ $RECOVERED -eq 1 ]
then
RECOVERED="recovered"
else
RECOVERED=""
fi
#echo "${BBALPHAMSG:0:9999}" > /tmp/manalerts.txt
echo "${BBALPHAMSG:0:9999}" | mail -s "$BBHOSTNAME $BBSVCNAME -
$BBCOLORLEVEL $ACKCODE $RECOVERED $DOWNSECSMSG"user-40212399ff4e@xymon.invalid
#-----------------------------------------------------
#!/usr/bin/perl
# searching for lines which has "&red"
while (<>) {
@matches=/&red .*\s/ig;
foreach $_ (@matches) {
s/<.*?>//ig; # removing all the html tags
print "$_ ";
}
}
#-----------------------------------------------------
Could you please suggest what could be the issue?
*---------- Forwarded message ----------
From: SAP-XY-MON <user-7f5e03420dc1@xymon.invalid>
Date: Mon, Feb 20, 2012 at 7:00 PM
Subject: -
To: user-40212399ff4e@xymon.invalid
• --
Thanks & Regards
Sonal kumar N C