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
    • YouTube Videos
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Agility
      • Book your Agile Fundamentals training
      • Book you Kanban workshop
      • 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)
    • >> Go to DataMiner Docs
  • DevOps
    • About the DevOps Program
    • Sign up for the DevOps Pogram
    • 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

GetActiveAlarms filtering on a custom property

204 views31st July 2025automation scripts filtering get Alarms SLNet
4
Benjamin Hodžić [SLC] [DevOps Advocate]1.27K 28th July 2025 0 Comments

Hello,

I tried to use the GetActiveAlarmsMessage to fetch all alarms and filter them by a custom property. I found how to implement filtering by various fields through other dojo questions, but I'm struggling getting the filter to work for my custom property.

Here's how it looks:

var alarmFilterItem = new AlarmFilterItemString(AlarmFilterField.PropertyValue, "Alarm.CMDB System", AlarmFilterCompareType.Equality, new[] { "SNOW", "Automatic" });
var message = new GetActiveAlarmsMessage(-1)
{
Filter = new AlarmFilter(alarmFilterItem),
};

I read in the answers of this question that I need a prefix before the property name to specify it's source. I'm not sure if the prefix for custom properties is different, or it's not possible at all as I get a result with 0 alarms with the displayed request.

Any help is appreciated!

Xander Warszawski [SLC] [DevOps Advocate] Answered question 31st July 2025

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
2
Xander Warszawski [SLC] [DevOps Advocate]236 Posted 31st July 2025 1 Comment

Hi Benjamin,

I tried doing this using your code and this seems to work fine on my system.
What database are you using? This could be a clue as to why it isn't working for you.

Kind regards,

Xander

Benjamin Hodžić [SLC] [DevOps Advocate] Posted new comment 1st August 2025
Benjamin Hodžić [SLC] [DevOps Advocate] commented 1st August 2025

Hello Xander, thanks for replying.

I figured it out in the meanwhile, explained in the other comment.

Best regards!

2
Miguel Obregon [SLC] [DevOps Catalyst]20.13K Posted 31st July 2025 1 Comment

Hi Benjamin,

I performed a small test using a modified version of this ad-hoc data source SLC-GQIDS-ActiveAlarmsUsingFilter, and I was able to successfully retrieve an active alarm that matches the specified filter criteria. Below is a snippet of the modified version for your reference:

string propertyName = "Alarm.ClassAlarm";
string propertyValue = "Gold";

var alarmFilterByProperty = new AlarmFilterItemString(AlarmFilterField.PropertyValue, propertyName, AlarmFilterCompareType.Equality, new[] {propertyValue} );

var filter = new AlarmFilter(filterItems: new AlarmFilterItem[] { alarmFilterByProperty });
var msg = new GetActiveAlarmsMessage() { Filter = filter };

var alarmsResponse = engine.SendSLNetSingleResponseMessage(msg) as ActiveAlarmsResponseMessage;
if (alarmsResponse != null)
{
return alarmsResponse.ActiveAlarms.WhereNotNull().ToList();
}

The alarm that I am using for my test:

And the result:

Hope it helps.

Benjamin Hodžić [SLC] [DevOps Advocate] Posted new comment 1st August 2025
Benjamin Hodžić [SLC] [DevOps Advocate] commented 1st August 2025

Hi Miguel, thanks for taking the time to test this.

By displaying my property in the alarm console, just like you did, I found out that the alarm inherited it from the service, which means that my filter should have started with the prefix "Service.". That way it works.

Thank you!

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