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

Total time for a dimension regarding the timeseries

Sullivan
Observer

 

Hello everyone,

I want to retrieve the total time of a time series for each service in order to produce a monthly report on the total degradation time per service.

Basic DQL query:

timeseries interval : 1h, health = avg(office365.tenant.service.health, filter : { status == ‘ serviceDegradation ’ }), by : { service }

Do you have any ideas on how to do this please?

Regards,

2 REPLIES 2

yanezza
Dynatrace Mentor
Dynatrace Mentor

Are you meaning like this?

timeseries by:{service}, filter:status == "serviceDegradation", interval:1h, timeframe:timeframe(from:now() - 30d, to:now()), health = avg(office365.tenant.service.health)
| fieldsAdd total_degradation_time = arraySum(health)

you can remove the timeframe if you will set it in the notebook section.

Yanez Diego Parolin

Sullivan
Observer

Hi Yanezza, thanks for your suggestion, I made the DQL query after my post finally, I forgot to close, thanks for your suggestion I created this query : 

timeseries by:{service}, filter:status == $Statut, health = avg(office365.tenant.service.health)
| fieldsAdd health = arrayRemoveNulls(health)
| fieldsAdd total_time = toDuration(timeframe)
| filter isNotNull(total_time)
| fieldsAdd arraySize(health)
| fieldsAdd TempsduStatut=(`arraySize(health)`*interval)


Featured Posts