Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

template function "humanizeNoSmallPrefix" is not recognize with promTool 2.7.1 #5357

Closed
Nexucis opened this Issue Mar 14, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@Nexucis
Copy link
Contributor

Nexucis commented Mar 14, 2019

Bug Report

What did you do?
I have the following alert rule that use the template function "humanizeNoSmallPrefix"

  - alert: AlertExample
    expr: vector(1) == 1
    for: 1m
    annotations:
      description: '{{ $value | humanizeNoSmallPrefix }} > 0 for last minute'

And the promTool 2.7.1 says it doesn't know the function humanizeNoSmallPrefix. It works using promTool 2.5.0

What did you expect to see?
I expected that promTool was ok with this rule

What did you see instead? Under which circumstances?
Running promTool 2.7.1, it returns the following error:

"AlertExample": msg=template: __alert_AlertExample:1: function "humanizeNoSmallPrefix" not defined

Environment

  • System information:

    Testing on :

    • windows
    • Linux
  • Prometheus version:

    • 2.7.1
@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Mar 14, 2019

That never worked, that's a template (not a function) defined in the console templates library example, which aren't available to rules.

@Nexucis

This comment has been minimized.

Copy link
Contributor Author

Nexucis commented Mar 14, 2019

Indeed, after deep verification, this particular alert was not checked.

sorry for the inconvenience

@Nexucis Nexucis closed this Mar 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.