Dashboarding
Dynatrace dashboards, notebooks, and data explorer explained.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to display 100% degradation in SLO?

vvasudev
Frequent Guest

Hi,

I'm new to Dynatrace and I'm currently working on setting up monitoring in non production environment that will eventually move to production. Currently, I'm trying to create a SLO for a span that we intentionally ran to have a failure rate of 100%. However, the SLO is not able to evaluate it.

DQL that I'm using:

fetch spans
| filter matchesValue(endpoint.name, "<endpoint_name>") AND matchesValue(entityAttr(dt.entity.process_group, "tags"), "*APISECCluster*") 
| fields start_time, end_time, Tier, span.name, duration, span.status_code, endpoint.name
| makeTimeseries {
    EPM = countIf(span.status_code == "error", default: 0),
    CPM = count(default: 0)
  }, by: { API=endpoint.name }
| fieldsAdd sli=(((CPM[]-EPM[])/CPM[])*(100))
| fieldsAdd API

 Since its a 100% failure rate - sli=(((CPM[]-EPM[])/CPM[])*(100)) will be 0%, which is not being displayed correctly and not being reported in the 'Problems' app in DT. Is there a way to handle this scenario where 100% degradation (which resoluts in 0% sli) will be recognized by DT? Thanks in advance!

2 REPLIES 2

Michal_Gebacki
Community Team
Community Team

Hi, @vvasudev!

 

Is this documentation page helping to resolve challenge you've described above: add a service-level objective (SLO) tile to a dashboard?

 

Please let us know, thank you in advance!

t_pawlak
Champion

Hi,
You’re running into two things at once: DQL behavior and SLO evaluation rules.
Try this DQL so the SLI is always a valid number (no division-by-zero edge cases):

fetch spans
| filter matchesValue(endpoint.name, "<endpoint_name>")
| makeTimeseries {
    EPM = countIf(span.status_code == "error"),
    CPM = count()
  }, by: { API = endpoint.name }
| fieldsAdd sli = if(CPM[] > 0,
                     then: ((CPM[] - EPM[]) / CPM[] * 100),
                     else: 0)

In the SLO configuration, enable the option that allows evaluation when SLI = 0% (wording like “evaluate SLO even if SLI equals 0%” / “don’t suppress zero-value SLI”).

Once that’s set, a 100% failure rate → SLI = 0% will be treated as a valid SLO breach and will show up in Problems.



Featured Posts