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

Class Library Monitors Implementation

Solved1.37K views23rd September 2021class library protocol QActions
1
Thijs Vanovenacker [SLC] [DevOps Advocate]2.21K 23rd September 2021 0 Comments

Hi Dojo,

I’m working on an application that will manage some remote elements.
In order to fetch the changes on Element Name and Element Alarm Level (Severity), I’m using the Class Library Monitors.

My question is if I should define what elements I need to track/monitor? And adjust this list when I add/remove managed elements?

Currently I just Start the monitors after startup:

IDms dms = protocol.GetDms();
dms.StartElementNameMonitor(protocol, OnElementNameChange);
dms.StartElementAlarmLevelMonitor(protocol, OnAlarmLevelChange);

In the methods OnElementNameChange & OnAlarmLevelChange, I believe I’m receiving all the name & severity changes from the system, while I’m only interested in the subset I was managing.

So far it seems to work just fine, but I want to be sure this is the correct way of using it.

Thanks in advance!

Thijs Vanovenacker [SLC] [DevOps Advocate] Selected answer as best 23rd September 2021

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
1
Pedro Debevere [SLC] [DevOps Enabler]1.80K Posted 23rd September 2021 3 Comments

There are also extension methods defined on IDmsElement to monitor e.g; name changes and alarm level changes see ElementMonitorExtenions.

var element = myDms.GetElement(“myElement”);
element.StartNameMonitor(protocol, OnElementNameChange);
element.StartAlarmLevelMonitor(protocol, OnAlarmLevelChange);

Thijs Vanovenacker [SLC] [DevOps Advocate] Selected answer as best 23rd September 2021
Thijs Vanovenacker [SLC] [DevOps Advocate] commented 23rd September 2021

Thanks Pedro, Though it’s not fully clear if and how I should be managing the re-initiation of Monitors after they restart.

The documentation is not clear about this:
https://help.dataminer.services/development/#t=DataMinerDevelopmentLibrary_Customerpart1PDGPDGAdvancedFunctionalityCleanup_rules.htmXREF_97683_6_12_3_Cleanup&rhsearch=Monitors&rhsyns=

“This means that all monitors must be manually restarted when the element is restarted.”

Should I be in charge to keep track of what monitored elements are getting a restart or Stop/start? Or is this only intended to make sure that after restart of the managing application, we need to do a fresh Monitor request after our start up? Thanks.

Jan Staelens [SLC] [DevOps Advocate] commented 23rd September 2021

When you stop the element that starts monitors. All the started monitors will stop & clean up.

So when you then start that element again, you need to make sure your element restarts all the monitors you need.

This means you need to keep track in a saved table (for example) what elements you’re monitoring. After an element restart you then parse that table and restart the monitors.

Thijs Vanovenacker [SLC] [DevOps Advocate] commented 23rd September 2021

Great! I can do that. Thanks guys!

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