Hi Community,
I would like to retrieve in a script based on view id/name or service id/name the highest severity and the number of alarms according to this highest severity (For 3 critical alarms for view A, and 2 major alarm for view B).
Do you have a script example/template for this?
Thanks
Hello Yvan,
I don't have a template but using variations of the below call should work:
var activeAlarms = engine.SendSLNetSingleResponseMessage(new GetActiveAlarmsMessage([dataminer_id])) as AlarmEventMessage;
From here you can either request the alarms from a particular service, after you find it with call engine.FindService([service_name]") and then use the serviceId as elementId in the GetActiveAlarmsMessage constructor.
For view filtering you can get all the Active Alarms and then filter by the ViewImpactInfo object where it mentions the views that this alarm is part of.
Hope it helps! 🙂