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

Group by a tag on a process group

Fluffydoom
Visitor

I have some services that together make up different CloudFoundry apps. 

I'd like to aggregate different statistics like cpu usage and memory at the application level on a single dashboard. I have a query that mostly works but I'm manually grabbing the different apps. is there a way to group BY dt.entity.process_group tags? I'd also like to have the detected name instead of the process_Group ID

timeseries { Request_Count = sum(dt.service.request.count), Failures = sum(dt.service.request.failure_count), `%CPU_Usage` = avg(dt.process.cpu.usage), `%Memory_Usage`=avg(dt.process.memory.usage), Latency = median(dt.service.request.response_time) }, by: { dt.entity.process_group },
filter: { matchesValue(entityAttr(dt.entity.process_group, "tags"), "CFApp1")
OR matchesValue(entityAttr(dt.entity.process_group, "tags"), "CFApp2")
OR matchesValue(entityAttr(dt.entity.process_group, "tags"), "CFApp3")
OR matchesValue(entityAttr(dt.entity.process_group, "tags"), "CFApp4") }
| fields dt.entity.process_group, Request_Count, Failures, `%CPU_Usage`, `%Memory_Usage`, Latency

1 REPLY 1

DanielS
DynaMight Guru
DynaMight Guru

Hi @Fluffydoom, maybe you can try the following:

timeseries { Request_Count = sum(dt.service.request.count), Failures = sum(dt.service.request.failure_count), `%CPU_Usage` = avg(dt.process.cpu.usage), `%Memory_Usage`=avg(dt.process.memory.usage), Latency = median(dt.service.request.response_time) }, by: { dt.entity.process_group },
filter: { matchesPhrase(entityAttr(dt.entity.process_group, "tags"), "CFApp") }
| fields dt.entity.process_group, Request_Count, Failures, `%CPU_Usage`, `%Memory_Usage`, Latency
Dynatrace Certified Professional @ www.dosbyte.com

Featured Posts