Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to send alarm notification emails on Rel 5.5 2

Status
Not open for further replies.

Jephph

Technical User
Nov 9, 2004
244
US
Have TM 3.2 and have hit the books to figure out how to collect SNMP alarms from both a 4.5 CS-1000 and a 5.5 CS-1000e. Per the instructions, in the devices.txt file, I configured the 4.5 pbx to reflect a type of "CALL_SERVER" and I configured the 5.5 pbx to reflect a type of "COMMON_MIB_DEVICE".
I then made some modifications and un-rem'd the appropriate line items in the scripts.txt file so that I am now able to receive email alerts on critical errors on the 4.5 PBX.
Unfortunately, I can't get the critical errors on the 5.5 PBX to trigger the email alert (although they show up fine on the console). I believe that it has something to do with the fact that it has the COMMON_MIB_DEVICE type in the devices.txt file.
Has anyone else run into this and if so, how have you gotten around this problem?
Any help appreciated. Thanks.
 
We had a similar problem. Make sure the COMMON_MIB_DEVICE entry is activated for the sending of the email for this type of device. Now we get CALL_SERVER, Meridian1, and COMMON_MIB_DEVICE emails.

if ($CurrentTrapDevice = "COMMON_MIB_DEVICE") {
send(first,
sNotice, " - ", // Alarm introduction text
$CurrentPCTime, " - ", // Time that PC received the alarm
$commonMIBErrCode," - " , // Alarm error code
$commonMIBComponentID," - " , // Source of an alarm
$commonMIBDateAndTime," - " , // Timestamp of the device
$commonMIBProbableCause," - ", // Probable cause of an alarm
$commonMIBAlarmData // More text with error message
 
Mdsikes ---

Thanks so much for your reply -- it's good to hear that others are running into this as well (I'm not going crazy).
I tried to plug in the code that you sent me -- I only had to change the email profile from "first" to "my_email".
However, I got syntax errors when it attempted to compile. Below, I've copied in all of the code (my email address is xxxx'd out)that I thought belonged.
Is this what you have? If not, what did I do wrong?

I really do appreciate your time in helping us.

Jeff



// ============================================================================
notification email my_email
{
from:="OTM_AlarmNotification@qwest.com";
address:="jxxxx.lxxxx@qxxx.com";
server:="151.117.69.27";
}

script SampleEMail
{
function forward_email()
{
if ($CurrentTrapDevice = "COMMON_MIB_DEVICE") {
send(my_email,
sNotice, " - ", // Alarm introduction text
$CurrentPCTime, " - ", // Time that PC received the alarm
$commonMIBErrCode," - " , // Alarm error code
$commonMIBComponentID," - " , // Source of an alarm
$commonMIBDateAndTime," - " , // Timestamp of the device
$commonMIBProbableCause," - ", // Probable cause of an alarm
$commonMIBAlarmData // More text with error message)
}
}
rule forward_email_critical
{
if ($NormalizedSeverity = Critical )
{
forward_email();
}
}
}
// ****************************************************************************
 
Perhaps you missed the ); at the end of the 7-line sequence. I have: (addresses are fictitious)

// ****************************************************************************
// E Mail
// ****************************************************************************
// ============================================================================
// This is a sample definition for sending E.Mail Notification.
// To use, the address should be change to E.Mail address where the mail
// should be sent and the server should be changed to SMTP server IP
// address and the notification (as well as the references to it) should
// be uncommented.
// ============================================================================

notification email first
{
from:="tmserver@isi-info.com";
address:="tmserver@isi-info.com";
server:="10.10.10.10";
}



script SampleEMail
{

function forward_email()
{
if ($CurrentTrapDevice = "CALL_SERVER" or $CurrentTrapDevice = "Meridian1") {
// send email messages
send(first,
$DeviceTime,": Device ",$CurrentTrapSource,
" generated a ",$CurrentTrapMajor,".",$CurrentTrapMinor,
" trap with critical severity "," ErrorCode: ", $ErrorCode,
", OperatorData: ",$OperatorData, ".");

}
if ($CurrentTrapDevice = "COMMON_MIB_DEVICE") {
send(first,
sNotice, " - ", // Alarm introduction text
$CurrentPCTime, " - ", // Time that PC received the alarm
$commonMIBErrCode," - " , // Alarm error code
$commonMIBComponentID," - " , // Source of an alarm
$commonMIBDateAndTime," - " , // Timestamp of the device
$commonMIBProbableCause," - ", // Probable cause of an alarm
$commonMIBAlarmData // More text with error message
);

}

} /* end of function forward_email() */
rule forward_email_critical {
if ( $NormalizedSeverity = Critical ) {
forward_email();
}
}
rule forward_email_warning {
if ( ($NormalizedSeverity = Warning) and ($CurrentTrapDevice = "COMMON_MIB_DEVICE") and ($commonMIBErrCode = "ITS4011") )

{
forward_email();
}
}

}
 
You're the best, MDSIKES! That almost fixed it -- when I pasted this into my scripts file (and changed the addresses to fit my scenario), I still got a compile syntax error regarding the "sNotice" line. I removed that line altogether and it worked fine. We're happy campers once again.
You're a lifesaver -- THANK YOU. Do you have any idea why the "sNotice" line works for you and not me? What does the "sNotice" line accomplish? Just thinking out loud. You have a great day.

Jeff
 
(Make sure the COMMON_MIB_DEVICE entry is activated for the sending of the email for this type of device.) How do you make it active?
 
By using the "if ($CurrentTrapDevice = "COMMON_MIB_DEVICE") {" line as above. The default script includes only a reference to CALL_SERVER which will not detect 5.0 and 5.5 systems.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top