Hello Team
On dataminer for a specific element, I have a setup where an alarm triggers a correlation rule based on defined filters, which in turn executes an Automation script to send emails based on some business logic.
My requirement is to suppress that specific alarm from appearing in the Alarm Console for 24 hours after it is first handled. If the same alarm condition still persists after 24 hours, it should trigger the workflow again (i.e., generate a new email) and then be suppressed again for another 24 hours.
However, I’m facing the following challenges:
- I cannot acknowledge the alarm, as it is polling-based and reappears on every poll cycle.
- I cannot apply parameter maintenance, since the alarm is on a table column (row-level).
Given these constraints, what would be the recommended approach to suppress or “mask” this specific alarm for a fixed duration (24 hours) while still allowing it to re-trigger the workflow after that period?
I am unable to find an option to mask an alarm via automation script or via correlation rule.
Hi Ramesh,
I probably need a bit more detail on why masking the alarm or parameter for 24hrs would not work. You mention 'polling-based' and table column parameter, but what does that mean exactly? Does one polling cycle create a new row each time in your table? In case you need to mask, do you want to mask all rows in that table? or a subset?
Hi Ramesh,
For masking parameters in automation scripts, I'm typically using this class (simplified working version):
public static class Masking
{
private static DMAObjectRefTreeHelper _helper;
public static void InitMasking(Engine engine){
_helper= new DMAObjectRefTreeHelper();
_helper.SetupHelper(engine.SendSLNetSingleResponseMessage);
}
public static void SetMaskedStateForParameter(bool mask, int dmaID, int elementID, int parameterID, int seconds)
{
_helper.ChangeMaskInfo(
new DMAObjectRefTree(new ParamID(dmaID, elementID, parameterID)),
new MaskInfo()
{
DoMask = mask,
MaskType = MaskType.UntilTimeElapsedOrUnmask,
Reason = "masking test",
Time = seconds
},
new CPECrawlerConfiguration());
}
}
From the script I then call
Masking.InitMasking(engine);
Masking.SetMaskedStateForParameter(true,_dmaID, _elementID, _parameterID, _timeInSec);
I have these usings in my script btw
using Skyline.DataMiner.Automation;
using System;
using Skyline.DataMiner.Net.DataMinerObjectReferences;
using Skyline.DataMiner.Net.Apps.Sections.SectionDefinitions;
using Skyline.DataMiner.Net;
using Skyline.DataMiner.Net.Masking;
using Skyline.DataMiner.Net.Messages;
Hope this helps you moving forward.
Thanks Pieter
//DateTime maskUntil = DateTime.UtcNow.AddSeconds(300);
SetAlarmStateMessage msg = new SetAlarmStateMessage
{
AlarmId = alarmdata.AlarmID,
DataMinerID = alarmdata.DmaID,
ElementID = alarmdata.ElementID,
State = 8, // Mask
};
msg.Info = new SA(new string[]
{
"300", // 5min
});
engine.SendSLNetMessage(msg);
On previous code I was passing date time instead of seconds. This piece of code worked.
ok, wonderful. This means your problem has been resolved?
Hi Ramesh,
Before jumping to masking, is it not an option to use alarm scheduler (see Scheduling an alarm template)?
Please let us know if this cover your use case.
Hope it helps.
Hello Miguel,
That approach wouldn’t work for our use case, as the alarm timings are not predictable. Our requirement is event-driven—we need to trigger an email and suppress only a specific set of alarms for a defined duration (e.g., 24 hours) starting from when the alarm occurs, rather than based on predefined time schedules.
Hi Ramesh,
Another option could be assigning a different alarm template to an element via automation script. There is an method to set an alarm template to an element: https://docs.dataminer.services/develop/api/types/Skyline.DataMiner.Automation.Element.SetAlarmTemplate.html#Skyline_DataMiner_Automation_Element_SetAlarmTemplate_System_String_
Please could you let us know if this solve the use case?
But this is a column parameter in a table, and we do not want to suppress alarming for the entire column. Our requirement is to suppress only a specific alarm instance for 24 hours when certain criteria are met. There is a logic on correlation to find this alarm instance based on other column data on the table.
Using an alarm template condition would not work in this case because , suppressing via alarm template will reflect on the entire column. We still need the alarm to be generated so that it can be captured by the Correlation Rule. The Correlation Rule then triggers an Automation script, which sends an email based on some business logic.
Only after the email is sent we want to suppress that specific alarm for 24 hours. After the 24-hour period, if the alarm condition still persists on the next poll, it should again trigger the email workflow and then be suppressed for the next 24 hours. This cycle should continue until the alarm is cleared at the source.
Hi Pieter
DateTime maskUntil = DateTime.UtcNow.AddMinutes(5);
SetAlarmStateMessage msg = new SetAlarmStateMessage
{
AlarmId = alarmdata.AlarmID,
DataMinerID = alarmdata.DmaID,
ElementID = alarmdata.ElementID,
State = 8, // Mask
};
msg.Info = new SA(new string[]
{
maskUntil.ToString("yyyy-MM-dd HH:mm:ss"),
});
engine.SendSLNetMessage(msg);
I am able to mask it. But I want to mask it via automation script only for a time period (Ex:5min) Then it should auto unmask.