I would like to know
- Number of DataMiner Errors
- What DataMiner Errors (e.g. Database is down, RTE in a process ...)
I need this in an Automation Script (user defined API) to check the status across the entire cluster before continuing with the action of the API Path itself.
I currently already check if all agents in the cluster are running, but this remains in the running state when there are Errors. So an additional check is required to prevent the API of doing things when the System is not capable to do so and return a proper error to the requester.
This info is already available via System Center > Agents
I found the following. please confirm if this is safe to use:
var alarmFilter = new Skyline.DataMiner.Net.Filters.AlarmFilter();
var alarmFilterItemelement = new Skyline.DataMiner.Net.Filters.AlarmFilterItemInt(Skyline.DataMiner.Net.Filters.AlarmFilterField.SeverityID, Skyline.DataMiner.Net.Filters.AlarmFilterCompareType.Equality,new[] { 24 });
alarmFilter.FilterItems = new[] { alarmFilterItemelement };Skyline.DataMiner.Net.Messages.GetActiveAlarmsMessage gpm = new Skyline.DataMiner.Net.Messages.GetActiveAlarmsMessage
{
DataMinerID = dataMinerId,
Filter = alarmFilter,
ElementID = -1,
ParameterID = -1,
};Skyline.DataMiner.Net.Messages.ActiveAlarmsResponseMessage responses = (Skyline.DataMiner.Net.Messages.ActiveAlarmsResponseMessage)engine.SendSLNetSingleResponseMessage(gpm);
if (responses.ActiveAlarms.Any())
{
// there are errors.
}
As an update, I’ve been using this for a while already and on high scale and it has been running perfectly.