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

Metric expressions

Lucybellonikeyl
Newcomer_

Hello expert,

I'm trying to do a calculation between 2 metrics, but without success.

 

the following is the expression without a calculation:

core.daemon.user.authentication.count:filter(and(or(eq(step,finish),eq(step,start)))):splitBy(step):sum:sort(value(sum,descending)):limit(20)

I need to calculate step:start- step:finish

Is it possible to dio that?

Thanks,

Luciana

 

 

3 REPLIES 3

dannemca
DynaMight Guru
DynaMight Guru

Hi, @Lucybellonikeyl 

try this:

core.daemon.user.authentication.count:filter(and(or(eq(step,start)))):splitBy():sum:sort(value(sum,descending)):limit(20) - core.daemon.user.authentication.count:filter(and(or(eq(step,finish)))):splitBy():sum:sort(value(sum,descending)):limit(20)

Site Reliability Engineer @ Kyndryl

Cameron-Leong
Dynatrace Helper
Dynatrace Helper

Hello,

You should be able to do so with a simple subtraction expression. Try something like...

core.daemon.user.authentication.count:filter(and(or(eq(step,start)))):splitBy(step)
+
core.daemon.user.authentication.count:filter(and(or(eq(step,finish)))):splitBy(step)

 Here's a link to the docs.

The problem here is the splitBy(step). Since the dimensions values are different the calculation will not works. You will need to make it splitBy(), empty, or use other dimension that match on both results.

Site Reliability Engineer @ Kyndryl

Featured Posts