Could you please tell me the script to display IP addresses of the network devices in the notification console (in one of the user defined field) .I am quite new to scripting and with the ASL I am trying to display the IP addresses , I am just getting the IPs of the routers and switches going down and not for any interface down or memory high utilization for those routers or switches. I have put the following ASL , please tell me what changes do I require to do?
I have the AM and PM server (AM-PM) on same host. However sometime back I changed the script for location and IP address in user defined fields. But I am getting the location but not IP address.Please see the script below:
****************************************
default NotificationName = "";
default MessageType = "";
START {
{ .. eol }
do {
eventObj = self->object(NotificationName); // Locate the notification object
faultedName = eventObj->OccurredOn->Name; // Locate the failed object
}
UDF1
}
/* In UserDefined field1 we will place the customer
name from the underlying domain manager
The data is obtained from the underlying server's system
obj location attribute*/
UDF1 {
do {
customer = "None";
faultedObj = object(faultedName);
deviceObj = faultedObj->getSystem()?IGNORE;
if (!deviceObj->isNull()) {
customer = deviceObj->Location?IGNORE;
}
eventObj->UserDefined1 = customer;
}
}
/* In UserDefined field2 we will place the customer
name from the underlying domain manager
The data is obtained from the underlying server's system
obj SNMP Agent (IP Address) attribute*/
UDF2 {
do {
customer = "None";
faultedObj = object(faultedName);
deviceObj = faultedObj->getSystem()?IGNORE;
if (!deviceObj->isNull()) {
customer = deviceObj->SNMPAddress?IGNORE;
}
eventObj->UserDefined2 = customer;
}
}
******************************************
Do we need to restart the domain manager every time we modify the script?
it seems you are not calling UDF2 function in your code.
Regarding the restart of the server, you don't have to. If your script is a DXA, you only have to reconfigure the SAM (change a value of the domain type associated to your domain before) so the DXA script are reread again.
HTH,
--Fred
== APG5 ReportPack4Event for Smarts can report on millions of notifications in seconds == Frederic Meunier Solutions Watch4Net Inc APG & Smarts InCharge integration http://www.watch4net.com
eventObj = self->object(NotificationName); // Locate the notification object
faultedName = eventObj->OccurredOn->Name; // Locate the failed object
}
UDF1
}
you should do that :
START {
{ .. eol }
do {
eventObj = self->object(NotificationName); // Locate the notification object
faultedName = eventObj->OccurredOn->Name; // Locate the failed object
}
UDF1
UDF2
}
--Fred
== APG5 ReportPack4Event for Smarts can report on millions of notifications in seconds == Frederic Meunier Solutions Watch4Net Inc APG & Smarts InCharge integration http://www.watch4net.com
did you reconfigure the SAM in order to apply the new ASL script ? Also, you can test the ASL without the SAM (unsing sm_adapter) by sending the right variables to it.
--Fred
== APG5 ReportPack4Event for Smarts can report on millions of notifications in seconds == Frederic Meunier Solutions Watch4Net Inc APG & Smarts InCharge integration http://www.watch4net.com
popeye2
18 Posts
1049
0
Posted August 24th, 2010 18:00
Hello Surabhi,
Do you have separate IP AM and IP PM servers? If so, have you associated the hookscript for notifications coming from both servers?
The reason why I ask is because your script currently seems to be working for availability notificaiton but not for performance notifications.
Kind Regards,
Louie Cavaliere
EMC Global Support