Thanks Brian, this solved my problem On Tuesday, July 14, 2020 at 1:23:29 PM UTC+4:30, Brian Candler wrote: > > Since the labels are the same, this is straightforward: > > expr: ipmi_temperature_celsius and (ipmi_temperature_state == 2) > > The $value of the alert is now ipmi_temperature_celsius - but the value > will only be passed through if there is a matching RHS timeseries (with any > value, but in this case it's filtered so that the RHS timeseries is > filtered out unless the value is 2). > > PromQL expressions with comparison operators are like filters. For > example: > > expr: ipmi_temperature_celsius > 40 > > is not a true/false, but rather it passes through timeseries where the > value is > 40, and excludes timeseries where the value is <= 40. > > See: > > https://prometheus.io/docs/prometheus/latest/querying/operators/#comparison-binary-operators > > https://prometheus.io/docs/prometheus/latest/querying/operators/#logical-set-binary-operators > > >
-- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/d5a40913-5f2a-43bb-b85c-1f84c0319710o%40googlegroups.com.

