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

This product reached the end of support date on March 31, 2021.

How to fill / to use "Custom Metric (1)" to "Custom Metric (5)" ?

Hi Community,

There are 5 "Custom Metric (x)" each of them with 3 options : (sum), (cnt) and (avg) when creating DMI.

I have tried to use them in few reports but corresponding column is / are always empty.

I do not understand how to use them ?

How are they filled in and with what ?

In fact, for one of my HTTP SWS, i have configured "Operation Attributes (1)" and "... (2)" to retrieve a special code coming from the response body of the stream. It works fine, and i did reports showing these data.

OA1 corresponds to operations containing "KO", OA2 to operations containing "OK" expression = text.

BUT NOW i want

1°) the SUM of OA1 and AO2 = total of OK + KO operations

2°) the percentage of each of them =

a) OA1/(AO1 + OA2)

b) OA2/(AO1 + OA2)

I know how to build "Custom Metrics" using .Properties file, but i was wondering if i could use those 5 OTB metrics called "Custom Metric (x)" and use their (sum), (cnt) and (avg) options ?

Thanks in advanced for your assistance.




Dynatrace Pro
Dynatrace Pro

Hi Philippe,

Please see this link.

Let me know if this helps or if you have any additional questions.



Hi Harshal,

First, many thanks for your advice and your interest in my question.

I followed the link you gave me but i didn't learn more details that i already knew.

As i wrote, i have already configured Operation Attribute 1, 2, 3 to extract details i was looking for from the response body, using Text Phrase Search and regex.

So i have already :

- number of OK operations ... in Operation Attribute 1

- number of KO operations ... in Operation Attribute 2

- the expression of the response body when KO ... in Operation Attribute 3, because it contains an error message i want to display in my reports ... SO I AM JUST I LITTLE PROUD OF THIS JOB !


now i want, i need, the total = [AE1] + [AE2]

and the percentage of each ==>

Percentage of OK ... should be [AE1]/([AE1]+[AE2])

and Percentage of KO ... should be [AE2]/([AE1]+[AE2])

I believed that i could get them easily but in fact not.

I wanted to avoid to build a file for defining these 3 metrics using Custom metrics features, but it is not possible, i think ... so i am going to create this file and let you know if i succeed this way.

If you have any suggestions, it would be great to read them.



Hi Philippe,

It took me a little while but I have found some additional documentation. It is for an older version but I hope it still holds true. I have not yet tried using operation attributes to create custom metrics but I would assume it still works. @Sebastian K thoughts?



Yes, it should still work. We would like to lift that feature up to the DMI UI but currently we couldn't squeeze that into the dev cycle.

Dynatrace Pro
Dynatrace Pro

Hi Philippe,

Have you looked into creating a compound metric? When defining an alert in the RUM console, you can build a compound metric based on the custom metrics you have defined.

Please let me know if that works.