In your annotation template, instead of "{{ $value }}", you can use "{{
$value | printf "%.2f" }}" to cut the value off after 2 decimal places. Or
you could try "{{ humanize $value }}".

On Sun, Jan 31, 2021 at 9:12 AM Auggie Yang <[email protected]>
wrote:

> guys,
>
> Configuration rules.yml with promethues, and alermanger always got some
> long vlaue;
>
> just like memory usage: 70.25266596686059, disk usage: 65*.*58277282;
>
> is there has some good solutions to format prometheus's value with 70.xx
> or 65.xx, not 70.xxxxxxxx, thanks.
>
> --
> 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/5c1766cc-6870-4a41-9480-15a905427dd6n%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/5c1766cc-6870-4a41-9480-15a905427dd6n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Julius Volz
PromLabs - promlabs.com

-- 
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/CAObpH5ywYe%2BeyzUo6VVtTveLQ%2BbcfzbCPp7kLj6bjTR0sG1qKg%40mail.gmail.com.

Reply via email to