# SLO for custom metrics

**URL:** <https://community.dynatrace.com/t/slo-for-custom-metrics/39219>\
**Category:** Automations\
**Tags:** slo\
**Created:** [April 10, 2023, 3:16pm UTC](https://community.dynatrace.com/t/slo-for-custom-metrics/39219 "2023-04-10T15:16:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RM](https://avatars.discourse-cdn.com/v4/letter/r/4bbf92/32.png) [@RM](https://community.dynatrace.com/u/RM)\
**Post date:** [April 10, 2023, 3:16pm UTC](https://community.dynatrace.com/t/slo-for-custom-metrics/39219/1 "2023-04-10T15:16:30Z")

</div>

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:&nbsp;  
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

---

<div class="post-metadata">

**Author:** ![abbachr](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/abbachr/32/28551_2.png) [@abbachr](https://community.dynatrace.com/u/abbachr)\
**Post date:** [April 11, 2023, 5:56am UTC](https://community.dynatrace.com/t/slo-for-custom-metrics/39219/2 "2023-04-11T05:56:44Z")

</div>

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](https://www.dynatrace.com/support/help/platform-modules/business-analytics)

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:&nbsp;[Metrics API - Metric selector — Dynatrace Docs](https://www.dynatrace.com/support/help/dynatrace-api/environment-api/metric-v2/metric-selector#conditions)  
Or the partition transformation:&nbsp;[Metrics API - Metric selector — Dynatrace Docs](https://www.dynatrace.com/support/help/dynatrace-api/environment-api/metric-v2/metric-selector#partition)&nbsp;  
Depends on what behavior you want to have.
