08 Oct 2024 09:40 AM
Hi All,
I have the below dql query for a dashboard and I need to group the average milliseconds by watchlist per 30 seconds. I'm not sure where I am going wrong, any help is appreciated.
timeseries aml=avg(log.application),by: {elapsedmilliseconds, event.original}, interval:1m, filter: matchesPhrase(application, "Screen")
| parse event.original, """LD '@mt":' LD:mt ',' """
| parse event.original, """LD 'watchlist":' LD:Watchlist ',' """
| filter isNotNull(elapsedmilliseconds)
| fieldsAdd CountofRecords=arraymovingAvg(elapsedmilliseconds, 30)
13 Oct 2024 10:46 PM
Hi @Gib80 , I think you need to adjust the interval here.
timeseries aml=avg(log.application),by: {elapsedmilliseconds, event.original}, interval:30, filter: matchesPhrase(application, "Screen")
14 Oct 2024 12:04 AM
Hey Gib,
If I understand what you're looking for correctly I don't believe this would currently be possible with a timeseries as they have a minimum interval of 1m as mentioned here https://docs.dynatrace.com/docs/shortlink/metrics-limits#upgrading-to-grail. You can change the interval to be smaller but I don't believe that it would make a difference as they are stored with the 1m granularity.
If you were to query logs directly and then used the maketimeseries command you would be able to achieve smaller intervals as seen below.