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 you 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

Masking future alarms for a specified EPM object from an Automation script

155 views23rd September 2025#EPM #Masking #Alarms #API
3
Alexandre Lievens [DevOps Member]283 10th September 2025 0 Comments

Hi everyone,

i'am looling to mask an EPM object from a c# automation script similar to the UI option that masks the object so that all related alarms (including new ones from the object itself and the children) are masked. The idea is to provide the EPM object by its System Type and System Name, a duration and the masking option.

Can you help me with that ?

Thanks a lot!

Pieter Van Compernolle [SLC] [DevOps Enabler] Answered question 23rd September 2025

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
0
Pieter Van Compernolle [SLC] [DevOps Enabler]3.58K Posted 23rd September 2025 0 Comments

Hi Alexandre,

Here's an automation script that should more or less do the job for you, hope this helps

using Skyline.DataMiner.Automation;
using System;
using Skyline.DataMiner.Net;
using Skyline.DataMiner.Net.Masking;
using Skyline.DataMiner.Net.Messages;
using Skyline.DataMiner.Net.CPE;

internal class Script
{
private Engine _engine;
private const string SCRIPT_NAME = "Mask EPM";
private String _systemType;
private String _systemName;
private bool _mask = true;

public void Run(Engine engine)
{
_engine = engine;

try
{
_systemType = _engine.GetScriptParam("System Type").Value;
_systemName = _engine.GetScriptParam("System Name").Value;

if (!bool.TryParse(_engine.GetScriptParam("Mask").Value, out _mask)
){
_engine.GenerateInformation($"'{SCRIPT_NAME}' - Could not parse mask bool from Parameters");
}

Masking.InitMasking(engine);
Masking.SetMaskedStateForEPM(engine.UserDisplayName, _mask,_systemType, _systemName);
}
catch (Exception e)
{
_engine.GenerateInformation($"'{SCRIPT_NAME}' - " + e.ToString());
}
}

}

public static class Masking
{
private static CPECollectorHelper _helper;

public static void InitMasking(Engine engine){
_helper= new CPECollectorHelper(Engine.SLNetRaw);
}

public static void SetMaskedStateForEPM(String user, bool mask, String systemType, String systemName)
{
_helper.MaskLinkedDMAObjectRefTreesThroughTopology(
new MaskInfo()
{
DoMask = mask,
MaskType = MaskType.UntilUnmask,
Reason = "masking test"
},
systemType,
systemName
);
}
}

Pieter Van Compernolle [SLC] [DevOps Enabler] Answered question 23rd September 2025
You are viewing 1 out of 2 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

© 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