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

Dataminer Alarm Root Time via correlation

109 views3 hours ago
6
Ramesh Rajasekaran [DevOps Advocate]899 5 days ago 1 Comment

I have created a logic to read the alarm data triggered via correlation.

https://docs.dataminer.services/dataminer/Functions/Automation_module/FAQ/How_do_I_parse_Correlation_Alarm_Info_data.html?q=alarm%20correlation

But I need a way to get the root time of the alarm. I can only see the rootalarmid param on the above document. Is there a way to get the root time of the alarm on an automation script

Miguel Obregon [SLC] [DevOps Catalyst] Answered question 3 hours ago
Alberto De Luca [DevOps Enabler] commented 2 days ago

Do you use the AlarmTreeID?

Far from a full answer, but if you specifically want the Alarm Console’s Root time column behavior, querying the root alarm and reading its "Time" might work in your scenario.

Subscribing to get more suggestions from the community

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
0
Miguel Obregon [SLC] [DevOps Catalyst]22.86K Posted 3 hours ago 0 Comments

Hi Ramesh,

I could not find in the documentation a way to get the root time from the alarm that triggered the correlation rule. Find below a snippet that should allow you to retrieve the root time:

using System;
using System.Collections.Generic;
using System.Linq;
using Skyline.DataMiner.Automation;
using Skyline.DataMiner.Net;
using Skyline.DataMiner.Net.Filters;
using Skyline.DataMiner.Net.Helper;
using Skyline.DataMiner.Net.Messages;

public class Script
{
public static void Run(IEngine engine)
{
try
{
RunSafe(engine);
}
catch (ScriptAbortException)
{
// Catch normal abort exceptions (engine.ExitFail or engine.ExitSuccess)
throw; // Comment if it should be treated as a normal exit of the script.
}
catch (ScriptForceAbortException)
{
// Catch forced abort exceptions, caused via external maintenance messages.
throw;
}
catch (ScriptTimeoutException)
{
// Catch timeout exceptions for when a script has been running for too long.
throw;
}
catch (InteractiveUserDetachedException)
{
// Catch a user detaching from the interactive script by closing the window.
// Only applicable for interactive scripts, can be removed for non-interactive scripts.
throw;
}
catch (Exception e)
{
engine.ExitFail("Run|Something went wrong: " + e);
}
}

private static void RunSafe(IEngine engine)
{
ScriptParam paramCorrelationAlarmInfo = engine.GetScriptParam(65006);
string alarmInfo = paramCorrelationAlarmInfo.Value;
string[] parts = alarmInfo.Split('|');
int alarmID = Tools.ToInt32(parts[0]);
int dmaID = Tools.ToInt32(parts[1]);
int elementID = Tools.ToInt32(parts[2]);
int rootAlarmID = Tools.ToInt32(parts[5]);

DateTime rootTime = GetRootTimeFromAlarm(engine, dmaID, elementID, rootAlarmID);

engine.GenerateInformation($"[INFO]|Run|RootTime:{rootTime}");
}

public static DateTime GetRootTimeFromAlarm(IEngine engine, int dataminerId, int elementId, int rootAlarmId)
{
// Get the alarm tree ID for the given root alarm ID
AlarmTreeID alarmTreeID = new AlarmTreeID(dataminerId, elementId, rootAlarmId);

// Preparing the message
GetAlarmTreeDetailsMessage getAlarmTreeDetailsMessage = new GetAlarmTreeDetailsMessage(alarmTreeID);

// Send the message and get the response
AlarmEventMessage response = (AlarmEventMessage)engine.SendSLNetSingleResponseMessage(getAlarmTreeDetailsMessage);

return response.RootTime;
}

Hope it helps.

Miguel Obregon [SLC] [DevOps Catalyst] Answered question 3 hours ago
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