How to use template functions in Grafana alert description

Hello all,

Is there a way how to use template functions in Grafana alert description?

I tried to use humanize on value of double type.
However the function and the value aren’t expanded.
The receive alert just contains raw value:

{{ humanize $values.B }}

I tried several combination but I didn’t make it work.
I wonder if this functionality is available or not.

Does anybody have any experiences with it ?

Thx

Hey there! The humanize function is supported for alert message templating, I’m just not sure about the value data type. I’ll check with the Alerting team and follow up. In the meantime, here are the docs for this for easy reference if needed:

@findmyname the template is not correct because $values.B is not a number. You should do

{{ humanize $values.B.Value }}
2 Likes

Oh I see.
Thx a lot for your time @yuriy.tseretyan @Melody.

1 Like