Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Set/Remove alarm templates from a protocol

Solved659 views5th June 2024
1
Paul Lee [DevOps Member]595 20th March 2024 0 Comments

Hi,

Is there a way to Set/Remove alarm templates of a list of elements/services from a protocol? I know it’s possible with Automation script but ideally I would like to achieve this in protocol level.

If not possible, then can someone please advise on how to trigger an automation script with passing parameters from a protocol?

Thanks

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 5th June 2024

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
1
João Severino [SLC] [DevOps Catalyst]13.07K Posted 20th March 2024 5 Comments

Hi Paul,

You should be able to adapt from the answer to this other question How to use the InterApp Class to make bulk alarm template changes – DataMiner Dojo

If you skip the InterApp part, you should be able to use IDmsElement and IDmsProtocol to achieve what you are after either from an automation script or a QAction.

For completeness of your questions, to launch a script from a QAction you can have a loop into the method ExecuteScript | DataMiner Docs and more details on the configurations of the input parameter here Class ExecuteScriptMessage | DataMiner Docs

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 5th June 2024
Paul Lee [DevOps Member] commented 21st March 2024

Hi Joao, thanks for your help. This is really useful. Just one further question from me. In the other thread, you mentioned assign alarm template with below property but I’m wondering if you have an example for this as I find it hard to understand how to use that property. I tried below but it seems I need iAlarmTemplate type rather than a string.

IDms dms = protocol.GetDms();
IDmsElement element = dms.GetElement(new DmsElementId(dmaId, elementId));
element.AlarmTemplate = “”;
https://docs.dataminer.services/develop/api/types/Skyline.DataMiner.Core.DataMinerSystem.Common.IDmsElement.AlarmTemplate.html#Skyline_DataMiner_Core_DataMinerSystem_Common_IDmsElement_AlarmTemplate

João Severino [SLC] [DevOps Catalyst] commented 21st March 2024

Hi Paul,
You could use something like
var dms = protocol.GetDms();
var protocol = dms.GetProtocol(“MyProtocolName”, “1.0.0.1”);
var template = protocol.GetAlarmTemplate(“MyTemplateName”);
var element = dms.GetElement(“MyElementName”);
element.AlarmTemplate = template;
element.Update();

Or as another option

var dms = protocol.GetDms();
var element = dms.GetElement(“MyElementName”);
var template = element.Protocol.GetAlarmTemplate(“MyTemplateName”);
element.AlarmTemplate = template;
element.Update();

João Severino [SLC] [DevOps Catalyst] commented 21st March 2024

To remove the alarm template you should be able to pass null value to the property.

Paul Lee [DevOps Member] commented 21st March 2024

Hi Joao, thanks for your reply which works perfect on elements. However, I am also working on services as well as elements. I have got below but it does not seem to assign or remove the alarm template. Could you please let me know whether this is correct approach? Or is there any other way to do this? I have also tried obtaining the underlying element to assign/remove alarm templates but it doesn’t seem to always work. Thanks for your help, really appreciate it.

IDms dms = protocol.GetDms();
var dmsService = dms.GetService(new DmsServiceId(dmaId, serviceId));
IDmsAlarmTemplate template = dmsService.AdvancedSettings.ServiceElementAlarmTemplate.Protocol.GetAlarmTemplate(strAlarmTemplateName);
dmsService.AdvancedSettings.ServiceElementAlarmTemplate = template;
dmsService.Update();

João Severino [SLC] [DevOps Catalyst] commented 22nd March 2024

Hi Paul,
I am not too familiar with the implementation of services but I would expect it to be similar.
I would wait to see if someone provides some more input, otherwise, I would reach out to your Skyline contact to verify if we are in the presence of an issue or not.

Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs