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

How to find the actual Element IDs for Services that are used in the MySQL Trend Table names

Solved1.06K views11th July 2023dataminer.services MySQL
1
Jeff Douglass860 22nd November 2022 0 Comments

In DM you can list all the services to see what their IDs are, but these IDs are NOT the IDs that are actually used in the names of the actual MySQL trend tables for the services. Inspecting the actual .xml files for the services and service elements it appears that the actual ID is the Service ID + 1.

Questions:

  1. Is there a way in DM to get a list of all the actual Service Element IDs as described above?
  2. Are the Service Element IDs as described above guaranteed to always be the Service ID + 1

Thanks

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 11th July 2023

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
2
Bert Buysschaert [SLC] [DevOps Advocate]4.87K Posted 23rd November 2022 1 Comment

Hi Jeff,

Services with a protocol internally consist of the actual service and a hidden element with the same name as the service. If you assign the protocol during service creation the ID of the element will typically be the ServiceID + 1 but there is no guarantee due to race conditions, and if you assign a protocol later then the ID will very likely be higher if other elements/services have been created in the mean time.

The code snippet below can be put in an automation script to generate a list of all enhanced services.

using System;
using System.IO;
using System.Linq;
using System.Text;
using Skyline.DataMiner.Automation;
using Skyline.DataMiner.Net;
using Skyline.DataMiner.Net.Messages;
public class Script
{
public void Run(Engine engine)
{
var elements = engine.SendSLNetMessage(
new GetLiteElementInfo() {
IncludeServiceElements = true,
ServiceElementsOnly = true });
var sb = new StringBuilder();
foreach (var e in elements.OfType<LiteServiceElementInfoEvent>().OrderBy(x => x.Name))
sb.AppendLine($”{e.Name},{e.LinkedServiceDmaID}/{e.LinkedServiceID},{e.DataMinerID}/{e.ElementID}”);
File.WriteAllText(@”C:\temp\services.txt”, sb.ToString());
}
}

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 11th July 2023
Jeff Douglass commented 23rd November 2022

Burt,
Thank you for your response and info. I will give your code a try next week after the US holidays.
Cheers

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