Hi
Is there any possibility / way to mask and unmask alarms automatically by scheduler or any other automation script available ?
Would anybody please suggest any idea to achieve through Dataminer.
I have a functionality to develop in our project that in a specific time some of the systems going to power off in a site and again at some other time same systems going to power on. In this situation we don't want to monitor those alarms in Dataminer. By the way there is a dataminer documentation available to mask and unmask alarms manually, but in the documentation they haven't mentioned any automatic way.
Thanks,
Mohan RV
Hi Mohan,
As Ben mentioned, scheduling the alarm template would be the cleanest solution. Of course, this approach means that no alarms would even be triggered, so I understand that this might not be the behavior you need.
I’m considering a customized solution that leverages both Correlation and Automation:
a) Create a correlation rule that is triggered only for the alarms you want, by configuring the appropriate alarm filter.
b) Configure it to run an automation script that masks (or unmasks) the alarm as required.
To give you an idea of an automation script that will mask the alarm, see below. Please keep in mind that the example uses some methods that have been deprecated recently, but it should still work.
using System;
using Skyline.DataMiner.Automation;
using Skyline.DataMiner.Net.Messages;public class Script
{public void Run(Engine engine)
{//get correlation base alarm details message
ScriptParam paramCorrelationAlarmInfo = engine.GetScriptParam(65006);string alarmInfo = paramCorrelationAlarmInfo.Value;
string[] parts = alarmInfo.Split('|');int alarmID = Convert.ToInt32(parts[0]);
int dmaID = Convert.ToInt32(parts[1]);
int severity = Convert.ToInt32(parts[7]);engine.GenerateInformation("### correlated alarm to mask: " + dmaID + "/" + alarmID + " severity: " + severity);
int state = 8; // 8=mask, 9=unmask
SetAlarmStateMessage sam = new SetAlarmStateMessage(dmaID, alarmID, state, "" );
//sam.Info = new SA(new string[2] { "6", "" }); // 6 secondsEngine.SLNet.SendMessage(sam);
engine.GenerateInformation("### correlated alarm masked");
}
}