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

How to query process_group_instance that belongs to a specific process_group?

albertokirey
Frequent Guest

Hello,
I would like to build a graph with the heap memory used of all process_group_instance that belongs to a specific process_group.
I'm trying this:

timeseries avg(dt.runtime.jvm.memory_pool.used), by:{dt.entity.process_group_instance}
| fieldsAdd process_group = entityAttr(dt.entity.process_group_instance, "instance_of")
| expand process_group
| fieldsAdd process_group_name = entityName(process_group)

but it doesn't work.
Which is the correct form?

Thanks

3 REPLIES 3

Julius_Loman
DynaMight Legend
DynaMight Legend

Why so complicated?

timeseries avg(dt.runtime.jvm.memory_pool.used)
, by:{ dt.entity.process_group_instance}
, filter: { entityName(dt.entity.process_group)=="My Java Process Group Name"}
Dynatrace Ambassador | Alanata a.s., Slovakia, Dynatrace Master Partner

albertokirey
Frequent Guest

Thank you. I didn't realise it was so simple!
But it seems that this solution doesn't work for another metric.
I'm trying this:

timeseries max(dt.runtime.websphere.threadpool.active_threads)
, by:{dt.entity.process_group_instance }
, filter: { entityName(dt.entity.process_group)=="WebSphere AS"}

 And I don't see anything.

@albertokirey If the metric does not include the process group, you can use this approach. Adjust the filtering of Process Group name accordingly.

timeseries avg(dt.runtime.websphere.threadpool.active_threads)
, by: { dt.entity.process_group_instance }
| join [ 
  fetch dt.entity.process_group
  | filter entity.name ~ "WebSphere AS myCell"
  | fieldsAdd dt.entity.process_group_instance = instantiates[dt.entity.process_group_instance]
  | expand dt.entity.process_group_instance
], on:{left[dt.entity.process_group_instance]==right[dt.entity.process_group_instance]}, fields:{ entity.name}

 

Dynatrace Ambassador | Alanata a.s., Slovakia, Dynatrace Master Partner

Featured Posts