cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Getting Events for last minute?

AntonioSousa
DynaMight Guru
DynaMight Guru

When using the v2 Events API, if I want to get the list of events of say the last minute, it will give me the list of the events of the last minute, but also the events that are opened and started eventually way before. If I do this every minute, I will have to check the startTime to see if they really happened in the last minute.

To filter this, there seems to be the entitySelector firstSeenTms, but this has to be used with at least a definition of one of the following:

  • Entity type
  • Dynatrace entity ID

As I want to get them all, which might be the most efficient way of doing it?

Antonio Sousa
3 REPLIES 3

Julius_Loman
DynaMight Legend
DynaMight Legend

Hi,
firstSeenMs applies to entities (first time seen). but you want to check events happening from the specified startTime, right? Looks, like you need to iterate the output from the API since specifying from as the input value, just includes events started before, but still being opened.

The API's eventSelector does not allow specifying startTime or endTime to filter the events precisely. Looks like another product idea is required here. 

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

AntonioSousa
DynaMight Guru
DynaMight Guru

@Julius_Loman,

Thanks for the firstSeenMs, was not associating it to entities ...

Effectively I'm iterating and checking each of the Events. Since I have some Events that don't disappear, it's effectively a waste of resources...

Going to put in the Product Idea.

Antonio Sousa

Featured Posts