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
    • Courses
    • Certification
      • DataMiner Operator
      • DataMiner Administrator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
    • Video Library
    • Books We Like
    • Third-party Courses
    • DevOps Enablement Services
    • Quizzes
  • RESOURCES
  • 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)
  • Expert Hubs
    • DataMiner DevOps Professional Program
    • DataMiner
      • DataMiner Releases & Updates
      • System Architecture
      • Integration Studio
      • Visual Overview
      • Security
    • Technologies
      • CI/CD
      • Converged Interconnect Networks
      • DOCSIS 3.1 / DAA
      • Elasticsearch
      • Kubernetes
      • Telemetry / Flow Monitoring
      • PTP
      • SDN / ST2110 / NMOS
    • Business
      • Software Business models
      • Perpetual Use or Usage-based Services
  • Discover
    • Markets
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • Solutions
    • Use Case Library
    • DataMiner Dashboards
    • DataMiner Downloads
    • DataMiner Modules
      • Core features
      • SRM features
    • DataMiner Apps
    • Professional Services
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • Pricing
  • More
    • Feature Suggestions
    • Online DataMiner Systems
    • Leaderboard
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
    • Verify a certificate
  • >> Go to dataminer.services

Automating Dynamic Element(s) Detection and Parameter Retrieval

808 views14th September 2023Automation DIS automation engine automation scipt CSharp element method
2
A B M Sidddique130 13th September 2023 0 Comments

Hello Dojo Community ! ,

I find myself at a juncture where your collective expertise would be immensely valuable. I am currently working on an  automation process that comprises both a correlation rule and an automation script. While I have successfully configured the correlation rule, I am facing a challenge in the latter part of the automation script.

The objective of this automation script is to dynamically identify alarming elements and extract their parameters. Subsequently, it needs to extract specific values from another element referred to as the 'Resource Manager.' These values are crucial for a subsequent calculation, which serves as a critical condition for advancing the automation process.

To help pinpoint where the issue lies, I have implemented 'try' and 'catch' statements. However, these are temporary placeholders and will be removed once the core problem is resolved.


The primary question that I would humbly request your assistance with is whether I am employing the correct method to reference the second element ('Resource Manager') accurately. Moreover, I seek guidance on how to efficiently retrieve parameter values from this second element and carry out the necessary calculations.

If it's possible to extend the initial dynamic search mechanism to encompass the search for parameters from the second element, that would be particularly advantageous.

Your expertise and guidance in this matter would be immensely appreciated. I am eager to learn from the wealth of knowledge within the Dojo Community and resolve this challenge.

Thank you in advance for your support and insights.

Kind Regards,
A B M

Amer Hodzic [DevOps Enabler] Answered question 14th September 2023

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
3
Amer Hodzic [DevOps Enabler]596 Posted 14th September 2023 4 Comments

Hi A B M,

for the dynamic search of the second element if I understood correctly you could get all primary keys and then loop through them to get the value you want.

string[] primaryKeys = rn.GetTablePrimaryKeys(21104);

I don't know how the table is but for the value you have here I think is wrong:
var SapIs = rm.GetParameter(21104, "Display Key [IDX]");
Because the DisplayKey or Primary Key is expected.
See the attached picture for Referance and also the code to get the value:
var SapIs = rm.GetParameter(21104, "_Total:0");

the above code will get the value from column 21104 and row with the value _Total:0

I hope this helps.

Regards
Amer

A B M Sidddique Edited comment 18th September 2023
A B M Sidddique commented 14th September 2023

Hello Amer,

Thank you for your response. If I understand correctly, the code snippet you provided retrieves the cell within a specific row for the entire script. However, my requirement is to keep the column fixed and dynamically find the cell in a specific row based on the first element.

Regards,
A B M

Amer Hodzic [DevOps Enabler] commented 14th September 2023

Hello A B M,

You didn’t understand me correctly the code snippet above the screen shot will get you a value in fixed column 21104 in row _Total:0

The column stays a fixed value and you can dynamically change the row by getting all primary the primary keys and finding the one you want.

I will provide the full code snippet in a few minutes in a new comment

Amer Hodzic [DevOps Enabler] commented 14th September 2023

string[] primaryKeys = rn.GetTablePrimaryKeys(106);
foreach string s in primaryKeys
{
if(s ==”_Total:0″)
{
var SapIs = rn.GetParmeter(21104,s);
var SapR = rn.GetParmeter(21106,s);
if(SapIs is double sapIsValue && SapR is double sapRValue)
{
double GR = sapIsValue – sapRValue;
}
}
}

A B M Sidddique commented 18th September 2023

Hi Amer ,
Thank you for clarifying. At the moment , I have tested out the snippet you have provided and it prints out all the row values from the table columns.

I wanted effectively utilize the first element’s dynamic value, obtained through alarm properties, to retrieve specific cell parameters from a table in the second parent element (which is hardcoded)?

– the code snip that helps to find the alarming element
“// Find the alarming element.
Element element = engine.FindElement(dmaID, elementID);

// Checks if the element has DVEs (parent or child element).
if (element.RawInfo.IsDynamicElement)
{
// Find the Parent element which has all the DVEs components.
Element parentElement = engine.FindElement(element.RawInfo.DveParentDmaId, element.RawInfo.DveParentElementId);”

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 Dojo Points

0 Credits
0 Reputation

Question Tag Cloud

adl2099 (54) Alarm Console (53) alarms (70) alarm template (58) API (35) Automation (144) automation scipt (65) Automation script (95) backup (54) Cassandra (142) cloud (37) Connector (44) Correlation (42) Cube (114) Dashboard (134) Dashboards (136) database (64) DataMiner Cube (37) DIS (53) DMS (48) DOM (68) driver (48) DVE (43) Elastic (73) Elasticsearch (99) elements (49) Failover (90) GQI (51) HTTP (45) IDP (55) low code app (70) low code apps (43) MySQL (50) protocol (145) QAction (58) resources (35) security (71) SNMP (56) SRM (267) SRM resources (39) timeout (35) trending (66) upgrade (44) Visio (373) Visual Overview (290)
Privacy Policy • Terms & Conditions • Contact

© 2023 Skyline Communications. All rights reserved.

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