Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

- Dynatrace Community
- Open Q&A
- Using Dynatrace
- Dashboarding
- How to get the absolute value of a metric in a graph?

Options

- Mark Topic as New
- Mark Topic as Read
- Pin this Topic for Current User
- Printer Friendly Page

28 Apr 2022 03:31 AM - last edited on 29 Apr 2022 02:14 AM by Karolina_Linda

We have enabled NTP monitoring on our systems which provides us with the `builtin:tech.ntp.ntp_offset` metric. This value is the time offset from the actual which can be either positive or negative.

Now the problem is that for either alerting or thresholds in graphs I can only define positive offsets. I can't add an alert or threshold for anything below a certain value. So I'd like to transform the graph to convert any negative values into positive. The absolute value in mathematical terms.

I have tried

- Looking for an absolute function, I don't believe there is any?
- Neither are the square root or square/exponent functions which could provide this functionality with a formula.
- Putting a - sign before the metric inverts the values. This allows me to create a normal and inverted graph which works for dashboarding and alerts. But it feels very much like a workaround since everything is duplicated.

Am I missing something here or is this functionality not available (yet)?

(Using Dynatrace Managed version 1.238 if that is relevant)

Solved! Go to Solution.

Reply

2 REPLIES 2

Hi @SkipGroot

Can the follow threshold setting help you?

And for alerting you will need to add 2 rules one for positive (above) and the other for negative (below)

HTH

Yos

dynatrace certificated professional - dynatrace primer partner - Matrix Soft Ware Division - Israel

Reply

I did not realize the threshold definition colors were applied in the specified order, a weird way of doing it but it works perfectly!

And for the alerts I guess I'll just have to duplicate the metric there. Thanks for the help!

Reply