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

Multiple metric not working

Vijayt
Helper

we have infrastructure mode and classic dashboard only 

my requirement is to have  display server , crowdstrike cpu % and  Servercpu% .

for server , crowdstrike cpu % i used query https://community.dynatrace.com/t5/Open-Q-A/Show-Host-Name-along-with-Process-Name-in-Dashboard-Tile...  example 

builtin:tech.generic.mem.usage
:filter(and(or(in("dt.entity.process_group_instance",entitySelector("type(process_group_instance),
entityName.startsWith(~"SpringBoot api-gateway-*~")")))))
:parents
:splitBy("dt.entity.process_group_instance","dt.entity.host")
:sort(value(auto,descending))
:limit(100)

for host cpu i added another metric 

builtin:host.cpu.usage:max:filter(in("dt.entity.host", entitySelector("type(host),tag(~"application:sprin~")"))):splitBy("dt.entity.host"):sort(value(max,descending)):limit(10)

 

but output ignore host cpu metric .  

question is if i add multiple metric , 2nd , 3rd  metrics  result will automatically  match based on 1st metric host name 

3 REPLIES 3

Vijayt
Helper

i did  a workaround byt merging

builtin:tech.generic.mem.usage
:filter(and(or(in("dt.entity.process_group_instance",entitySelector("type(process_group_instance),
entityName.startsWith(~"SpringBoot api-gateway-*~")")))))
:parents
:splitBy("dt.entity.process_group_instance","dt.entity.host")
:splitBy("dt.entity.host")

:sort(value(auto,descending))
:limit(100)

 

as per documentation it should have same dimension . so i added 2nd metric cpu usage  

builtin:host.mem.usage:max:filter(in("dt.entity.host", entitySelector("type(host),tag(~"application:sprin~")"))):splitBy("dt.entity.host"):sort(value(max,descending)):limit(10)

 but for some it shows  process memory  with host cpu usage is null .  not matching properly 

 

for example 

servername           processmemory used               hostmemory used 

server1                        10.1%                                          30%

server2                           15.2%                                          -

server3                         12.1%                                        20%

why the no value displayed for server2 . but if run metric individually . all are showing 

@Vijayt Increase the "limit(10)" in your "builtin:host.mem.usage" query(second) , you should see the data after that 

 

Phani Devulapalli

awesome  . it worked . so each metric executed individual and then matched which available . is my understanding right 

Featured Posts