SLO for custom metrics

Hi all!

I’ve a use case on ingested custom metrics. I need to do a SLO depending on the value of that ingested custom metric.

My case: 
I have multiple hosts with a custom metric
with value range of 0 to 3 (0- OFF, 1- ON,…)

i have three questions:

  1. Can i create a SLO with that custom metric?
  2. Is it possible to create a filter for the values of a custom metric(ex: metricvalue ==1, metricvalue == 2,…)?
  3. And if it is can i have a example?

Thanks all,
RM

You are trying to monitor states with your metric.

Metrics in Dynatrace are timeseries and therefore suited for capturing measurements, and not states. This is something I cannot recommend, for monitoring states “Business Analytics in Dynatrace”
powered by Grail would be the better choice: Business Observability — Dynatrace Docs

However, to answer your original questions:

  1. Yes, you can use any metric in an SLO.
  2. Yes, that’s possible with the series condition of the filter: Metrics API - Metric selector — Dynatrace Docs
    Or the partition transformation: Metrics API - Metric selector — Dynatrace Docs 
    Depends on what behavior you want to have.