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

Code example – Take alarm ownership

Solved3.41K views22nd March 2023alarms Ownership
5
Jens Vandewalle [SLC] [DevOps Enabler]9.44K 22nd March 2023 0 Comments

Hi Dojo,

Does someone has example code for taking ownership of an alarm?

Tom Waterbley [SLC] [DevOps Catalyst] Answered question 22nd March 2023

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
5
Jorge Dias [SLC] [DevOps Enabler]4.79K Posted 22nd March 2023 0 Comments

Hi Jens,

I have the following code on a connector:

public static void TakeAlarmOwnership(this SLProtocol protocol, int dmaId, int alarmId, string message)
{
if (protocol == null)
{
throw new ArgumentNullException(“protocol”);
}

var setAlarmStateMessage = new SetAlarmStateMessage(dmaId, alarmId, 2 /*Take Owner*/, message);
protocol.SLNet.SendMessage(setAlarmStateMessage);
}

public static void ReleaseAlarmOwnership(this SLProtocol protocol, int dmaId, int alarmId)
{
if (protocol == null)
{
throw new ArgumentNullException(“protocol”);
}

var setAlarmStateMessage = new SetAlarmStateMessage(dmaId, alarmId, 3 /*Release Owner*/, string.Empty);
protocol.SLNet.SendMessage(setAlarmStateMessage);
}

Jens Vandewalle [SLC] [DevOps Enabler] Selected answer as best 22nd March 2023
6
Tom Waterbley [SLC] [DevOps Catalyst]8.89K Posted 22nd March 2023 0 Comments

Hi Jens, the following method can be used to acknowledge the alarm. If a user launches the script manually or attaches to it interactively, that user will become the owner of the alarm. If the script runs in the background, the alarm owner will become ‘Administrator’.

engine.AcknowledgeAlarm(dataMinerID, alarmID, comment);

Tom Waterbley [SLC] [DevOps Catalyst] Edited answer 22nd March 2023
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