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

repostoryRegistery not returning all information events?

Solved878 views2nd February 2024alarmrepository Automation information events
2
Gerwin van der Kamp [DevOps Enabler]2.91K 14th December 2023 0 Comments

Hi,

Following up this question: automation get information events slow i’ve come up to this to retrieve some information events

ScriptDummy eldum = engine.GetDummy(“VirtualMatrix”);
IDms dms = engine.GetDms();
IDmsElement vm = dms.GetElement(new DmsElementId(eldum.DmaId, eldum.ElementId));
AlarmFilter af = new AlarmFilter();
AlarmFilterItem ci = new AlarmFilterItemString(
AlarmFilterField.ParameterDescription,
AlarmFilterCompareType.WildcardEquality,
new string[] { “Connected Input (Virtual Outputs)*” }
);
AlarmFilterItem afvm = new AlarmFilterItemString(
AlarmFilterField.ElementID,
AlarmFilterCompareType.Equality,
new string[] { vm.DmsElementId.Value }
);
af.FilterItems = new AlarmFilterItem[] { ci, afvm };

DateTime today = DateTime.Today;
DateTime month = new DateTime(today.Year, today.Month, 1);
DateTime first = month.AddYears(-1);//month.AddMonths(-1);
DateTime last = month.AddSeconds(-1);
var repostoryRegistery = SLDataGateway.API.Repositories.Registry.DatabaseRepositoryRegistryBuilder.Default
.WithConnection(Engine.SLNetRaw)
.Build();
var alarmRepository = repostoryRegistery.Get<IInfoRepository>();

var alarmsfromDB = alarmRepository.Read(af, first, last)
.Cast<AlarmEventMessage>()
.Where(a => a.Severity == “Information”)
.ToList();
engine.GenerateInformation($” count {alarmsfromDB.Count()}”);

However i got different result with the information i got from cube: The result of the script:

12/1/2022 12:00:00 AM — 11/30/2023 11:59:59 PM (Script ‘GetInformationEvents’)

count 57689 (Script ‘GetInformationEvents’) (this fluctuate (yesterday it was consistent on: count 57767 ) as well between yesterday and today which should have been the same looking at the datetime/range.)
VS

I end up with:

& matching in de alarm console:

I’m i doing something wrong? Or does the repostoryRegistery doesn’t fetch all information events?

Gerwin van der Kamp [DevOps Enabler] Selected answer as best 2nd February 2024

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
0
Xander Warszawski [SLC] [DevOps Advocate]196 Posted 2nd February 2024 0 Comments

Hi Gerwin,

This seems to be an issue on our side, a task was already made: repostoryRegistery not returning all information event | Collaboration (dataminer.services).
To me it seems like severity filters are done post query, causing first at max 100_000 alarms to be returned from the query and then only the ones with the right severity to remain.

The difference with the alarm console is that there is a limit in the query.

Gerwin van der Kamp [DevOps Enabler] Selected answer as best 2nd February 2024
1
Tom Waterbley [SLC] [DevOps Catalyst]8.89K Posted 14th December 2023 1 Comment

Hi Gerwin,

How long are alarms and information events being stored on your system? By default this is one year and I see that you are trying to retrieve alarms that are older than one year. Could it be that the number of results changes because old alarms are being pruned?

Gerwin van der Kamp [DevOps Enabler] Posted new comment 14th December 2023
Gerwin van der Kamp [DevOps Enabler] commented 14th December 2023

They where at 52 weeks but we increased those. However I ran the script first and used the returned dates in cube so it should return the same or similar results. However the script returns far less then cube

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