# Alerting rules $value

**URL:** <https://community.grafana.com/t/alerting-rules-value/52593>\
**Category:** Grafana\
**Created:** [August 30, 2021, 11:26am UTC](https://community.grafana.com/t/alerting-rules-value/52593 "2021-08-30T11:26:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![smyth](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@smyth](https://community.grafana.com/u/smyth)\
**Post date:** [August 30, 2021, 11:26am UTC](https://community.grafana.com/t/alerting-rules-value/52593/1 "2021-08-30T11:26:00Z")

</div>

Here [Alerting rules | Prometheus](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/)  
I Find this:

```auto
  # Alert for any instance that has a median request latency >1s.
  - alert: APIHighRequestLatency
    expr: api_http_request_latencies_second{quantile="0.5"} > 1
    for: 10m
    annotations:
      summary: "High request latency on {{ $labels.instance }}"
      description: "{{ $labels.instance }} has a median request latency above 1s (current value: {{ $value }}s)"

```

Where does it get $value from? If the expr, then that should be a boolean.

---

<div class="post-metadata">

**Author:** ![anon70503803](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@anon70503803](https://community.grafana.com/u/anon70503803)\
**Post date:** [August 31, 2021, 6:16pm UTC](https://community.grafana.com/t/alerting-rules-value/52593/2 "2021-08-31T18:16:24Z")

</div>

According to that same doc:

> The `$value` variable holds the evaluated value of an alert instance.

In this case, I believe that `$value` is the result of the alert’s query for the given `$instance`. So, it’s a time-value representing the instance’s median latency. No? Am I missing your question? 👍

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/grafana/original/2X/e/ef5308cc58c9e5a13187b5012eb99f406928462f.png) [@system](https://community.grafana.com/u/system)\
**Post date:** [August 30, 2022, 11:26am UTC](https://community.grafana.com/t/alerting-rules-value/52593/3 "2022-08-30T11:26:03Z")

</div>

Closed on August 30, 2022, 11:26am UTC

This topic was automatically closed after 365 days. New replies are no longer allowed.
