How can i add units like in GB/MB or % to your Grafana Email Alerts

Here is the email screenshot

image

Same here. Thanks in advance.

Hi, I faced the same problem, the alert mail said “Values
Space is=2.766958592e+09”, I solved it as follows:

Alert rule → Edit rule → at point 2 the query from:

“node_filesystem_avail_bytes{device=”/dev/sdb1",fstype=“ext4”,instance=“1.2.3.4:9100”,job=“AL”,mountpoint=“/data”}"

to:

label_replace(node_filesystem_avail_bytes{device=“/dev/sdb1”,fstype=“ext4”,instance=“1.2.3.4:9100”,job=“AL”,mountpoint=“/data”} / 1024 / 1024 / 1024, “space”, “GB”, “”, “”)

This is what it looks like in the alert mail:
old


new

You define the labels of the alert mail with the last two entries from the query (“space”, “GB”,). If necessary, adjust the entries so that it works better for you.

I hope that helps.

btw. does anyone else have any ideas on how to reduce the decimal places? From 79.44927597045898 to 79.44?