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

Automation – Get information events slow

Solved804 views12th December 2023Automation C++ information events
6
Gerwin van der Kamp [DevOps Enabler]2.91K 8th December 2023 0 Comments

I'm trying to create some reports based on information events. However in the dashboards and low-codes apps i can't access those. So i was looking in fetching the through an automation script. I found the following example on dojo: https://community.dataminer.services/question/paging-when-using-getalarmdetailsfromdbmessage-and-sendslnetmessage-calls/ and it takes a long time to retrieve the information events, if i use it to retrieve alarms it is very quick. I'm i using this wrong?

This takes around 40 seconds to retrieve one information events:

AlarmFilter af = new AlarmFilter();
AlarmFilterItem afi = new AlarmFilterItemString(
AlarmFilterField.ParameterDescription,
AlarmFilterCompareType.WildcardEquality,
new string[] { "Connected Input (Virtual Outputs)*" }
);
af.FilterItems = new AlarmFilterItem[] { afi };
DateTime startTime = new DateTime(2023, 12, 07, 00, 00, 00);
DateTime endTime = new DateTime(2023, 12, 08, 23, 59, 59);
var repostoryRegistery = SLDataGateway.API.Repositories.Registry.DatabaseRepositoryRegistryBuilder.Default
.WithConnection(Engine.SLNetRaw)
.Build();
var alarmRepository = repostoryRegistery.Get<IInfoRepository>();

var alarmsfromDB = alarmRepository.Read(af, startTime, endTime)
.Cast<AlarmEventMessage>()
.ToList();
engine.GenerateInformation($" count {alarmsfromDB.Count()}");

foreach( var alarm in alarmsfromDB )
{

engine.GenerateInformation($"Source {alarm.DisplayValue} {alarm.Severity} desti {alarm.ParameterName}");
}

With a few checks most of the time is spend in the

var alarmsfromDB = alarmRepository.Read(af, startTime, endTime)
.Cast<AlarmEventMessage>()
.ToList();

Is there an option to speed this up a bit? (increasing the amount of information messages doesn't seems to influence the timing at all, so if there is no other option i think it would work.

Gerwin van der Kamp [DevOps Enabler] Selected answer as best 12th December 2023

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
1
Davy Degrande [SLC] [DevOps Advocate]1.43K Posted 12th December 2023 2 Comments

Hello Gerwin,

In the filters that you can pass along, filters that will help in pre-filtering and limiting the result of the database are of type ParameterID. Basically limiting the set of information events to either 1 element (by leaving the Parameter ID to -1 and Instance an empty string). 1 parameter (by adding the parameter ID value) of 1 cell (by adding the Instance value).
All the rest is done in post filtering hence the reason why the performance is similar. The reason the alarms might go faster than the information events are probably due to the amount you receive back.

Gerwin van der Kamp [DevOps Enabler] Selected answer as best 12th December 2023
Jason Pitteman [SLC] [DevOps Member] commented 12th December 2023

Hi Davy,
Would you have an example of such a filter?

Davy Degrande [SLC] [DevOps Advocate] commented 12th December 2023

An example to fetch the information events for an element with DMAID 1047 and element ID 7:
var elementFilter = new AlarmFilterItemString(AlarmFilterField.ElementID, AlarmFilterCompareType.Equality, new string[] { “1047/7” });
AlarmFilter AF = new AlarmFilter(elementFilter);

You are viewing 1 out of 1 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