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
    • 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
    • YouTube Videos
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Agility
      • Learn more about 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)
      • Book your Agile Fundamentals training
      • Book your Kanban workshop
    • >> Go to DataMiner Docs
  • DevOps
    • About the DevOps Program
    • Sign up for the DevOps Program
    • DataMiner DevOps Support
    • Feature Suggestions
  • Downloads
  • Swag Shop
  • PARTNERS
    • Business Partners
    • Technology Partners
  • Contact
    • Sales, Training & Certification
    • DataMiner Support
    • Global Feedback Survey
  • >> Go to dataminer.services

How to retrieve the ID of the Service monitored by an SLA, through the DataMinerSystem Library?

70 views7 hours agoclass library DMSClass Skyline.DataMiner.Core.DataMinerSystem.Common SLA SLDMS
2
Michiel Clepkens [SLC] [DevOps Advocate]1.46K 4 days ago 0 Comments

Hi Dojo

Since the Interop.SLDms namespace is deprecated, I would like to replace the following code with methods from the DataMinerSystem (class) library.

DMSClass dms = new DMSClass();
object x = new object();
dms.GetInfo(8/*DMS_GET_INFO*/, 0, ref x);
object[] retrievedElements = (object[])x;
foreach (object element in retrievedElements)
{
object[] singleElementInfo = (object[])element;
string[] genericElementInfo = (string[])singleElementInfo[0];
if (genericElementInfo[14].Equals("Skyline SLA Definition Basic"))
{
string sDmaEid = genericElementInfo[0] + "/" + genericElementInfo[1];
string sSLAName = genericElementInfo[3];
string[] saDMAEidService = genericElementInfo[24].Split('/');
}
}

where
genericElementInfo[0] = 772
genericElementInfo[1] = 111
genericElementInfo[3] = "My SLA"
genericElementInfo[14] = "Skyline SLA Definition Basic"
genericElementInfo[24] = "772/110"

Using the DataMinerSystem (class) library code below, I can retrieve a collection of IDmsElement objects representing the SLA (Service Level Agreement) elements available in the DMS.

IDms dms = protocol.GetDms();
IDmsElement[] retrievedElements = dms.GetElements().Where(element => element.Protocol.Name.Equals("Skyline SLA Definition Basic") && element.Protocol.Version.Equals("Production")).ToArray();
foreach (IDmsElement element in retrievedElements)
{
string sDmaEid = element.AgentId + "/" + element.Id;
string sSLAName = element.Name;
string[] saDMAEidService = ... .Split('/');
}

where
element.AgentId = 772
element.Id = 111
element.Name = "My SLA"
element.Protocol.Name = "Skyline SLA Definition Basic"
element. ... = "772/110"

The genericElementInfo[24] field contains the DataMiner element ID of the Service monitored by the SLA. I'm having trouble finding this DataMiner element ID in the IDmsElement objects retrieved through the DataMinerSystem (class) library.

The following code appears to explain the contents of the genericElementInfo array. However, I'm not sure whether this information is entirely correct, as I found it in an outdated document.

string[] genericElementInfo = (string[])singleElementInfo[0];
DMAElementConnection connection = new DMAElementConnection();
connection.parity = genericElementInfo[20];
connection.databits = genericElementInfo[21];
connection.stopbits = genericElementInfo[22];
connection.flowctrl = genericElementInfo[23];
connection.busaddress = genericElementInfo[24];
connection.retries = genericElementInfo[25];
connection.slowpoll = genericElementInfo[26];
connection.slowpollbase = genericElementInfo[27];
connection.timeouttime = genericElementInfo[28];
connection.pollingip = genericElementInfo[29];
connection.pollingport = genericElementInfo[30];

This would suggest that the DataMiner element ID of the service monitored by the SLA is stored in the SLA element's bus address field. If this is indeed the case, how can I retrieve this ID through the DataMinerSystem (class) library?

Serializing the element.Connections property of an SLA element returns {
"Id": 0,
"Timeout": "00:00:00",
"Retries": 0,
"ElementTimeout": null
}

For comparison, serializing the element.Connections property of a regular serial element returns {
"Connection": {
"RemoteHost": "127.0.0.2",
"NetworkInterfaceCard": 0,
"LocalPort": 0,
"RemotePort": 12312,
"IsSslTlsEnabled": false,
"IsDedicated": false
},
"BusAddress": "",
"Timeout": "00:25:00",
"Retries": 3,
"ElementTimeout": "08:20:00",
"Id": 0
}

Thank you in advance!

Kind regards

Pedro Debevere [SLC] [DevOps Enabler] Answered question 7 hours ago

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
0
Pedro Debevere [SLC] [DevOps Enabler]3.18K Posted 7 hours ago 0 Comments

Hi Michiel,

The DataMinerSystem library currently only provides support for obtaining information about the following connection types: virtual, snmp (v1.v2c,v3), HTTP and serial. This is why the serialization of the connection of an SLA element does not return much info.

We are currently busy adding support for additional connection types (including SLA) to the DataMinerSystem library, so I expect in one of the upcoming versions this information will be available.

For now, if you want to avoid using the deprecated Interop.SLDms, you could execute a raw SLNet call. E.g., execute a GetElementByIdMessage. The resulting ElementInfoEventMessage will then provide the ID of the monitored service element under the MainPort/BusAddress property.

Pedro Debevere [SLC] [DevOps Enabler] Answered question 7 hours ago
You are viewing 1 out of 1 answers, click here to view all answers.
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

© 2026 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin