See also: https://prometheus.io/docs/prometheus/latest/configuration/template_reference/#numbers
On Sun, Jan 31, 2021 at 10:07 AM Julius Volz <[email protected]> wrote: > 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 > -- 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/CAObpH5xF%3DR0J%3DavTMKVhExS57N8-Z%2BjwTEwva9cPy1DWo_whGg%40mail.gmail.com.

