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

Trigger for active alarm severity changes per DMA/DMS

Solved613 views8th July 2024alarm correlation correlated alarms Correlation Correlation rule Correlation rules
1
Felix Wesemeier [DevOps Catalyst]1.84K 17th April 2024 0 Comments

Hi Community,

I’m looking for a way to trigger to the highest active severity level per DMA/DMS.
Scripts should be triggered by correlation rules when, there is a change:

  •  [RED] to critical (from normal/warning/minor/major) when a new critical alarm comes in or an existing one is unmasked
  • [YELLOW] to warning/minor/major (when a new warning/minor/major alarm comes in or an existing one is unmasked and no active/unmasked critical alarm exists or after masking of all critical alarms)
  • [GREEN] to normal when no active warning/minor/major/critical alarm exists / masking all alarms with warning/minor/major/critical

Actually I got this working (grouped by DMA, with 3 scripts/correlation rules) but only when “Trigger on single events. Don’t maintain active tree status.” is active for the YELLOW and the GREEN script.
But as a result the script is triggered by every matching event, e.g.:

  • masking 10 of 10 alarms will trigger the GREEN script 10 times instead of 1
  • masking 9 critical alarms and keep one warning alarm active triggers the YELLOW script 9 times.

How to avoid this and just trigger for general change in the severity of active alarms?

Felix Wesemeier [DevOps Catalyst] Selected answer as best 8th July 2024

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
1
Tobe Deprez [SLC] [DevOps Advocate]894 Posted 19th April 2024 4 Comments

It might not be possible to achieve what you want directly with correlation rules, but you can trigger an automation script for every alarm update using correlation rules, and then check every time whether your DMA is in the RED, YELLOW or GREEN state.

I think the easiest way to achieve that is to make a separate view for each DMA with the elements it is hosting. Then, you can check the alarm level of the view in the automation script as follows.

public ViewStateEventMessage GetViewState(Engine engine, IDmsView view)
{
   var msg = new GetViewStateMessage()
  {
    ViewID = view.Id,
  };
  var resp = engine.SendSLNetSingleResponseMessage(msg);
  if (resp is GetViewStateResponse stateResponse)
    return stateResponse.States.FirstOrDefault();

  return null;
}

/// <summary>
/// The Script entry point.
/// </summary>
/// <param name=”engine”>Link with SLAutomation process.</param>
public void Run(Engine engine)
{
  var dms = engine.GetDms();
  var view = dms.GetView(“YOUR_DMA_VIEW”);
  var viewState = GetViewState(engine, view);
  if (viewState != null)
  {
    if (viewState.Level == Skyline.DataMiner.Net.Messages.AlarmLevel.Critical)
    {
      //Red
    }
    else if (viewState.Level == Skyline.DataMiner.Net.Messages.AlarmLevel.Major || viewState.Level == Skyline.DataMiner.Net.Messages.AlarmLevel.Minor ||
                viewState.Level == Skyline.DataMiner.Net.Messages.AlarmLevel.Warning)
    {
      //Yellow
    }
    else if (viewState.Level == Skyline.DataMiner.Net.Messages.AlarmLevel.Normal || viewState.Level == Skyline.DataMiner.Net.Messages.AlarmLevel.Masked)
    {
      //Green
    }
  }
}

As you can see, I use an SLNet message to fetch the alarm state of the view, as it is not yet available as an automation call as far as I know.

Felix Wesemeier [DevOps Catalyst] Selected answer as best 8th July 2024
Felix Wesemeier [DevOps Catalyst] commented 19th April 2024

Hi Tobe,
thanks!
This works for me.
But how should the correlation rule look like to act only in case of a general severity change?
Currently it triggers the script whenever a new alarm comes in or if I mask/unmask existing alarms even if the overall status remains the same.
It will produce a lot of load in case of an alarm strom.
My rule:
Filter: Severity equal to Wa, Mi, Ma Cr and Extra Status not equal to masked
Group by DataMiner
Execute on clear
Execute on base alarm updates

Have a nice weekend,
Felix

Tobe Deprez [SLC] [DevOps Advocate] commented 22nd April 2024

I am not an expert on this, but I did a few tests with the severity critical and it seems to work for me if I disable ‘Trigger on single events’ and I filter on the view in question (which corresponds to the DataMiner agent). I did not turn on any grouping, nor do I execute on clear or base alarm updates.

Felix Wesemeier [DevOps Catalyst] commented 22nd April 2024

Hi Tobe,
how did your rule detect a severity change (e.g. for warning to critical)?
I tried what you have described (just a filter for the view), but it just acts on the severity on the first incoming alarm. When a second alarm with a higher sevity pops up or if I mask/unmask alarms nothing happens. Also when an alarm is no longer existing.

Tobe Deprez [SLC] [DevOps Advocate] commented 22nd April 2024

OK, unlike what I said above, it seems you will need ‘Execute on clear’. Furthermore, in the alarm filters, I specified both the severity (critical in my case, but it should also work with any other severity) and the view. Then, the script should trigger always whenever a new/updated alarm is the first alarm on that severity, or whenever the last alarm on a certain severity clears or changes severity.

Note that I did not test anything with masking, but I suppose you can achieve this by adding a filter on ‘Extra status’ equal to ‘not masked’.

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