Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

1010

November 27th, 2012 09:00

Acknowledge alarms with an input file

Hello Paul,

A small query if we want to run this acknowledge script for list of device as an input file which all parameter we need to change?

I tried doing below way but not working although it is printing the input device names....

./sm_adapter -s SAM --file=/tmp/devices.txt   multipleAck.asl

START {

a:word

} 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) && glob("*.a*",objRef->InstanceName)) {

print("Notif-Name ==> " . objRef->Name);

print("Notif-Name ==> " . objRef->EventState);

objRef->acknowledge("admin","Acknowledge Notification");

objRef->changed();

print("Notification Object acknowledged");

}

}

}

}

Thanks

Arbas

No Responses!
No Events found!

Top