justanothercoder
justanothercoder

Reputation: 234

Grafana error: function "humanize" not defined

Saving a custom template with humanize function in it, fails with the following error: Error: failed to save and apply Alertmanager configuration: template: mytemplate:2: function "humanize" not defined.

Template contents are:

{{ humanize (0.123456) }}

Grafana version: 9.5+

Upvotes: 1

Views: 211

Answers (1)

Jan Garaj
Jan Garaj

Reputation: 28676

It doesn't look like a correct syntax. Try:

{{ humanize 0.123456 }}

Doc: https://grafana.com/docs/grafana/v9.5/alerting/fundamentals/annotation-label/variables-label-annotation/

Upvotes: -2

Related Questions