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

Adding hostname in the metric event description

Hi,

I'm trying to monitor CPU usage of a specific process group using metric event (Query definition type as metric key). What can be done to avail host name in the event template description? At present, problem generated shows "Process group" and "severity" but expecting affected host to be part of this description.

Looking for thoughts since I presume it's not a straightforward one!

Rgds.

5 REPLIES 5

PacoPorro
Dynatrace Champion
Dynatrace Champion

Please try using this metric selector:

builtin:tech.generic.cpu.usage:filter(in("dt.entity.process_group_instance", entitySelector("type(~"PROCESS_GROUP_INSTANCE~"),entityName.equals(~"YOUR PROCESS~")"))):splitBy("dt.entity.process_group_instance"):parents

 

Thanks @PacoPorro. If I understand correctly, we can't have "hostname" in the event template description if I intend to use metric key rather than metric selector?

As you can see in the metric explorer the only available dimension is the process group instance, so you want be able  to get it directly.

PacoPorro_0-1711531750012.png

You can also create a tag "host" with the host detected name, and add the "tags placeholder" to the event.

I'm using below one now,

builtin:tech.generic.cpu.usage:filter(and(or(in("dt.entity.process_group_instance",entitySelector("type(process_group_instance),fromRelationship.isInstanceOf(type(PROCESS_GROUP),tag(~"XXXXXX~"))"))),or(in("dt.entity.process_group_instance",entitySelector("type(process_group_instance),fromRelationship.isProcessOf(type(HOST),osType(~"LINUX~"))"))))):splitBy("dt.entity.process_group_instance"):parents

 

Like you said it does give hostname, process group and cpu usage in %. Only thing I worry is, dimension limits. We have a large server set ~10K Linux hosts.

This time with usage of above metric explorer, I can get options to populate hostname in the event template description, but as expected trouble is with dimension limits.

SrikanthSamraj_1-1711532441212.png

 

Featured Posts