Hi,

With alerting rules the Prometheus API (and templating language) has access 
to the "Value" of an alert which appears to be the first metric specified 
without the comparator.

I was wondering if this is something that is easily accessible in the 
Prometheus Go packages such that I could give it the expression string and 
it would strip out the comparison part and return just the metric query.

For example passing in:
> sum by (instance) (rate(node_disk_read_bytes_total[2m])) / 1024 / 1024 > 
50
would return
> sum by (instance) (rate(node_disk_read_bytes_total[2m])) / 1024 / 1024

Thanks,
Callum

-- 
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 prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/a5b35b15-ebae-4030-8a9c-f67adb836eacn%40googlegroups.com.

Reply via email to