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
  • Blog
  • Questions
  • Learning
    • E-learning Courses
    • 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
    • Tutorials
    • 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
    • DataMiner Insights
      • Security
      • Integration Studio
      • System Architecture
      • DataMiner Releases & Updates
      • DataMiner Apps
    • 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
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

How to retrieve child element from service using correlation rule/automation

230 views16th January 2025services
0
Miguel Guevara [DevOps Member]281 16th January 2025 0 Comments

I need to retrieve the ALIAS of the child element in the service that triggered the alarm. For example, in the following image I have one service with 4 inputs, each is a child element of the service:

a correlation rule on the service triggers an automation to run, on this automation I gather the alarm information. But I can't find which child element or device the alarm came from. On the image you can see 2 parameters on Input 3 and 4, the one that triggered the alarm was Input 4 (You can see that is in yellow). I need to get the Alias or Input 4 so that I can create an IDX to gather some information from another element.
Please help, thank you!

Miguel Obregon [SLC] [DevOps Catalyst] Answered question 16th January 2025

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
3
Miguel Obregon [SLC] [DevOps Catalyst]18.56K Posted 16th January 2025 4 Comments

Hi Miguel,

I believe you will need to use a SLNet call to retrieve the alias of the child elements linked to the service. Assuming that you are using this option to get information from the alarm that triggered the correlation rule, you already have information about the impacted services. With this information you can perform the following call:

GetServiceByNameMessage getServiceByNameMessage = new GetServiceByNameMessage();
getServiceByNameMessage.ServiceName = "TEST_SERVICE_01";
DMSMessage dmsMessage = engine.SendSLNetSingleResponseMessage(getServiceByNameMessage);
ServiceInfoEventMessage serviceInfoEventMessage = (ServiceInfoEventMessage)dmsMessage;
ServiceInfoParams[] childElements = serviceInfoEventMessage.ServiceParams;
for (int i = 0; i < childElements.Length; i++)
{
engine.GenerateInformation(childElements[i].Alias);
}

Hope it helps.

Note that this is an internal call and we do not recommend using this, as it is not officially supported and we cannot guarantee that it will still work in the future. As a rule, you should avoid using SLNet calls, as these are subject to change without notice. We recommend to instead always use the correct UI or automation options provided in DataMiner Automation or through our web API.

Miguel Guevara [DevOps Member] Posted new comment 13th February 2025
Jorge Dias [SLC] [DevOps Enabler] commented 16th January 2025

Hi,
You can avoid the use of the SLNet call by using:
var service = engine.FindService("Service Name");
childElement = service.ServiceInfo.ServiceParams;

Then you have the same list as in the reply above

Miguel Guevara [DevOps Member] commented 21st January 2025

Hello both, Miguel and Jorge, you are both correct about getting the service parameters. But the issue is, how do I know which child element was the one that it triggered from. Meaning that if the parameter alarmed came from input 4, how can I tell in the code, that it came from input 4 and not from any other input?

Jorge Dias [SLC] [DevOps Enabler] commented 22nd January 2025

In your code do you have the alarm information?
If so in there you have the Agent/Element ID from where it was triggered, then you can compare that with the ones in the childElements array from the service info.
If not, could you please clarify what information you have in the script and how it was triggered.

Miguel Guevara [DevOps Member] commented 13th February 2025

Hey Jorge, I am able to get the element ID by doing what you suggest. But I can't compare it to the childElement because all of the child elements have the same element ID. In other words, all child elements belong to 1 element, but the parameters inside these child elements are different. For example, childElement-1 has all that belongs to input 1 in the unit, childElement-2 has all that belongs to input 2, etc. So what I need, is to know which input is being triggered on, so that I can run a scrip that will use the number of the input and run some actions. At the moment, I have it where it is reading the parameter description of the alarm that triggered, and taking the input from there. But as this solution grows more, I can't maintain it this way, because there are parameters that don't contain the input number in the description. So it will be up to the alarmed childElement to determine which input is it. At least that's what I'm imaging.

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

Recent questions

DOM Definition relations returned in Definition query 0 Answers | 0 Votes
Alarm Dashboard PDF/CSV Export 1 Answer | 0 Votes
Is the Microsoft SharePoint Connector Still Usable 0 Answers | 0 Votes

Question Tags

adl2099 (115) alarm (62) Alarm Console (82) alarms (100) alarm template (83) Automation (223) automation scipt (111) Automation script (167) backup (71) Cassandra (180) Connector (108) Correlation (68) Cube (150) Dashboard (194) Dashboards (188) database (83) DataMiner Cube (57) DIS (81) DMS (71) DOM (140) driver (65) DVE (55) Elastic (83) Elasticsearch (115) elements (80) Failover (104) GQI (159) HTTP (76) IDP (74) LCA (152) low code app (166) low code apps (93) lowcodeapps (75) MySQL (53) protocol (203) QAction (83) security (88) services (51) SNMP (86) SRM (337) table (54) trending (87) upgrade (62) Visio (539) Visual Overview (345)
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

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