Hi,
Is it possible to add/remove alarm templates from an alarm template group via C#? I can't seem to find a C# function that could be used for this.
Thanks,
Hi Nigel,
If you are doing it from automation you can do the following:
var element = engine.FindElement("MyElement");
element.SetAlarmTemplate("MyAlarmTemplate");
Hi Nigel,
Did not test it, but you can probably use the following code:
var updateRequest = new UpdateAlarmTemplateMessage()
{
OriginalName = “AlarmTemplateGroupName”,
UpdateType = UpdateAlarmTemplateType.Update,
Definition = new AlarmTemplateEventMessage
{
GroupEntries = new[]
{
new AlarmTemplateGroupEntry
{
IsEnabled = true,
IsScheduled = false,
Name = “AlarmTemplate1”,
},
},
Name = “AlarmTemplateGroupName”,
Protocol = “ProtocolName”,
Version = “Production”,
},
};
engine.SendSLNetMessage(updateRequest);
Might need to add the following using:
using Skyline.DataMiner.Net.Messages;
Hi Michiel,
Yes, trying to do via Automation but not assigning an Alarm Template to an Element, I’m trying to find out how to add or remove an Alarm Template to an Alarm Template Group.
Thanks!