Hi, I'm looking for a method in automation of getting alarms for Elements. Is there a way of getting a table of alarms over a historical time period from the system? I need this to be in a script rather than a dashboard or LCA because based on the data I'll be carrying out further automation and config of Elements. Correlation is probably an option but I'd rather full control if it's possible. I think I've searched through docs but nothing is standing out to me at the moment. Thanks.
Hi Ross,
To get Historic alarms in an automation script there are 2 ways:
- Using the AlarmRepository, see this example for a GQI DataSource, but it can be used in a very similar way in automation scripts.
- Using the GetAlarmDetailsFromDbMessage:
var message = new GetAlarmDetailsFromDbMessage
{
StartTime = start,
EndTime = end,
Filter = new Skyline.DataMiner.Net.Filters.AlarmFilter(),
AlarmTable = true,
};var responses = engine.SendSLNetMessage(message);
This will return an array of AlarmEventMessages.