DQL
Questions about Dynatrace Query Language
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Count Running and Stopped Services Using DQL Queries (Dynatrace 3rd gen)

donaannie1
Newcomer

I need the count of running services and stopped services against each management zones in dynatrace dashboard(gen3). Below dql is not working

fetch dt.entity.os_service, dt.entity.host
| lookup dt.entity.host, from: runsOn, sourceField: id
| fieldsAdd mz = entityAttr(dt.entity.host, "managementZones")
| filter isNotNull(mz)
| expand dt.osservice.availability
| summarize running_services = countIf(value == 1), stopped_services = countIf(value == 0), total_services = count() by: entity.name, mz
| sort mz asc

1 REPLY 1

IzabelaRokita
Community Team
Community Team

Hey @donaannie1 ,
I just wanted to check in and see if you still need help with this. If so, I’d be happy to look into it for you! 😊
Please let me know what works best for you.

Featured Posts