On Mon, May 11, 2020, at 11:47, Justin W wrote:
> Hi all,
>
> I'm trying to compare the calculated filesystem used to either a static
> threshold, or a custom threshold if a certain metric is present. What I have
> so far is:
>
> ((avg(node_filesystem_used_bytes{mountpoint=~".*foo.*"}) by
> (site)/avg(node_filesystem_size_bytes{mountpoint=~".*foo.*"}) by (site)) >
> my_custom_threshold) or
> ((avg(node_filesystem_used_bytes{mountpoint=~".*foo.*"}) by
> (site)/avg(node_filesystem_size_bytes{mountpoint=~".*foo.*"}) by (site)) >
> 0.7)
>
> What I want this query to do is "If the my_custom_threshold is present for
> the (site), compare against that, else compare against 70%".
I wrote a long and incoherent article about this:
https://www.haraldkoch.ca/blog/index.php/2020/03/14/prometheus-alerting-rules-and-metadata/
Suggestions welcome!!
--
Harald
--
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/a210390c-d853-4e9f-86fd-d431a54cd848%40www.fastmail.com.