Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

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

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

8 Posts

December 20th, 2009 17:00

You could create a server tool that invokes a clear on the ICS_Notification instance.  Then you can just highlight all the notification and say "Clear Notification"
No Events found!

Top