This post is more than 5 years old
3 Posts
0
831
November 17th, 2009 09:00
How do is remove WAS_ACTIVE events?
We had an unexpected reboot of our SAM and IP servers and afterwards there are some events that are in a "WAS_ACTIVE" Event state. Removing these noitfications individually has become combersome. I'd like to be able to remove everything in a "WAS_ACTIVE" "Event State" with one command.
Cory Jackson
BCBSA
No Events found!
raghvendra1
9 Posts
0
December 21st, 2009 19:00
Over a time period many of these events will notify again and turn ACTIVE.But if you want to do this here is the snippet
/*--------------------------------------------------------------------------------------------*/
count = 0;
notifFactory = object(getInstances("ICS_NotificationFactory")[0]);
START do {
foreach event ( getInstances("ICS_Notification") ) {
eventObj = object(event);
if (eventObj->EventState == "WAS_ACTIVE" ) {
notifFactory->archiveNotification(eventObj,"SYSTEM","Archiving as not active anymore" );
count = count + 1;
}
}
print(" Removed ".count." WAS_ACTIVE notifications");
stop();
}
/*--------------------------------------------------------------------------------------------*/
save this asl file as handleWasActive.asl. And Run as
sm_adapter -s handleWasActive.asl
kelvinn1
8 Posts
1
December 20th, 2009 17:00