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

How to remove some correlated alarm information printed in the console

Solved882 views19th July 2023automation scipt correlated alarms correlation engine Correlation rule information event
0
A B M Sidddique [DevOps Advocate]371 12th July 2023 0 Comments

Hello Dojo !

I am using this piece of code to parse a correlation alarm info, The last 3 lines inside the curly brackets prints out all the properties associated with that correlated alarm , some of the properties printed do not have a value and just prints statements. I wanted to remove some of those prints which return no value. Is there any way to block some properties from printing in the information event console ?

For example, I would like to remove the red marked properties if possible. Any help or suggestion will be appreciated.

Kind Regards
A B M

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 19th July 2023

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
3
Miguel Obregon [SLC] [DevOps Catalyst]18.86K Posted 12th July 2023 9 Comments

Hi,

Property values are strings. In this case a possible solution could be printing only the properties where the value is different from empty. For example:

for (int i=0; int < amountProperties; i++) {

string propertyName = parts[21 + i*2];

string propertyValue = parts[21 + i*2 + 1];

if(!string.IsNullOrEmpty(propertyValue)){

engine.GenerateInformation(“Property:” + propertyName + ” == ” + propertyValue);

}

}

Hope it helps.

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 19th July 2023
A B M Sidddique [DevOps Advocate] commented 12th July 2023

Hi could you please elaborate what should I add in the ” // print something ” because if property value is null , I don’t want to print anything ? sorry if I sound confusing

Miguel Obregon [SLC] [DevOps Catalyst] commented 12th July 2023

Hi,
Sorry for the confusion. I updated the answer. Basically you can use the same piece of code that you have in your example to generate the information event.

A B M Sidddique [DevOps Advocate] commented 12th July 2023

Hi tried this piece of code with an alarm simulator , the output seen is a bit weird. The script starts once and keeps on executing a few time to find the property but does not print the properties I need and performs the specific action 5 times for a single alarm (unnecessary)

A B M Sidddique [DevOps Advocate] commented 12th July 2023

I would prefer “IsNotNullOrNotEmpty(propertyValue)” if there is something like this ?

Miguel Obregon [SLC] [DevOps Catalyst] commented 12th July 2023

Hi,
Sorry, I updated the answer. I forgot to include the ‘not’ operator which is the exclamation mark.
it should be if(!string.IsNullOrEmpty(propertyValue))

Show 4 more comments
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