To create and run an ASL script that will acknowledge multiple notifications, do the following:
Example script
The following example shows an ASL script that will acknowledge all notifications with the word PowerSupply in the InstanceName field.
Please note if you are using hierarchical acknowledge in your SAM domains please change the line in this asl script and run this script against your top level SAM domain so that it will pass down to the lower domains.default debug = FALSE;
manager = object("ICF-TopologyManager");
factory = object("ICIM-ObjectFactory");
timestamp = numeric(time());
START {
.. eol
} do {
x = getInstances("ICS_Notification");
y = getInstances("ICS_NotificationFactory");
foreach notiffactory (y)
{
notifactObj = object(notiffactory);
foreach sys (x)
{
objRef = object();
objRef = object("ICS_Notification", sys);
if (glob("*PowerSupply*",objRef->InstanceName)) {
print("Notif-Name ==> " . objRef->Name);
print("Notif-Name ==> " . objRef->EventState);
objRef->acknowledge("admin","Acknowledge Notification");
objRef->changed();
print("Notification Object acknowledged");
}
}
}
}