OpenManage + Alerts

Steve Tempest Steve.Tempest at gts.apn.com.au
Thu Sep 30 00:25:35 CDT 2010


Hi,

I've setup the alerts on my server to execute an application when an
error occurs but it's not working.

Basically I've done the following:

Configured the Alert....

omconfig system alertaction event=powersupply execappath="
/opt/asx_scripts/send_alert.pl"
omconfig system alertaction event=powersupplywarn execappath="
/opt/asx_scripts/send_alert.pl"
omconfig system alertaction event=tempwarn execappath="
/opt/asx_scripts/send_alert.pl"
omconfig system alertaction event=tempfail execappath="
/opt/asx_scripts/send_alert.pl"
omconfig system alertaction event=fanwarn execappath="
/opt/asx_scripts/send_alert.pl"

I added the space in front of the script name as I found that the system
would not accept it without and read on a forum thread that it's
required.

I can run the script from console as root and it sends the alert as I
expect it to. As this is not working I'm wondering if some environment
path is missing. Does anyone know how the alert is executed and which
account executes it?

If i go into the OM webpage after running above config I can see a tick
next to all of the items in the "Execute Application" column.

Here is the contents of the script that is executed


#!/usr/bin/perl
$desc=`omreport system alertlog 2>/dev/null | grep "Description" | head
-1 | cut -f2-9 -d: | sed 's/ //'`;
chomp($desc);
$date=`omreport system alertlog 2>/dev/null | grep "Date and Time" |
head -1 | cut -f2-9 -d: | sed 's/ //g' | sed 's/://g'`;
chomp($date);
$host=`omreport system summary 2>/dev/null | grep "Host Name" | head -1
| cut -f2-9 -d: | sed 's/ //'`;
chomp($host);
$tag=`omreport system summary 2>/dev/null | grep "Chassis Service Tag" |
head -1 | cut -f2-9 -d: | sed 's/ //'`;
chomp($tag);
$attach="/tmp/$date.log";
`omreport system alertlog > "$attach"`;
$send=`/opt/asx_scripts/sendEmail -f "$host\@domain.com" -t
"support\@domain.com" -u "System Error: $host SvcTag: $tag Time: $date"
-m "$host SvcTag: $tag Error: $desc Time: $date" -a "$attach" -s
"mailgateway.domain.com"`;
exit;


Any suggestions on how to debug this would be appreciated.

I'm running the latest version of OMSA on Centos 5.5 x64 (fully
patched).



Regards


Steve Tempest


Notice

 

This email and any attachments are strictly confidential and subject to copyright.  They may
contain privileged information.  If you are not the intended recipient please delete the message 
and notify the sender. You should not read, copy, use, change, alter or disclose this email or 
its attachments without authorisation.  The company and any related or associated companies do 
not accept any liability in connection with this email and any attachments including in connection 
with computer viruses, data corruption, delay, interruption, unauthorised access or unauthorised 
amendment. Any views expressed in this email and any attachments do not necessarily reflect the 
views of the company or the views of any of our related or associated companies.





More information about the Linux-PowerEdge mailing list