I would like to get all of the alarms that are located under a specific correlated alarm.
How can I do this?
Could I use the slnet call to retrieve alarm details on the TreeId of the correlated alarm?
If so, where in the response are all of the ‘child’ alarms located?
Hi Mieke,
I believe the info you are looking for is in the “CorrelationBaseAlarmReference” field of the correlated alarm.
So to achieve what you are trying to do:
- Get the correlated alarm
- Read out the values in the “CorrelationBaseAlarmReference”
- Use these ID to get the AlarmTrees of these alarms us an GetAlarmDetailsMessage
Getting the correlated alarm in an automation script can either be done by triggering the script from the correlated alarm and read out the alarmID of the correlated alarm using How do I parse Correlation Alarm Info data? | DataMiner Docs. From here you can use the ID in a GetAlarmDetailsMessage.
Alternatively you can use the GetActiveAlarmsMessage with a filter on the sourceId as following
var filter = new AlarmFilterItemInt(AlarmFilterField.SourceID, AlarmFilterCompareType.Equality, new[] { (int)SLEnumValues.CorrelationEngine });
new GetActiveAlarmsMessage(-1) { Filter = new AlarmFilter { FilterItems = new[] { filter } } });