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

Alert rule validation does not accept valid templates #5137

Closed
kfindeisen opened this issue Apr 1, 2019 · 0 comments
Closed

Alert rule validation does not accept valid templates #5137

kfindeisen opened this issue Apr 1, 2019 · 0 comments
Assignees
Milestone

Comments

@kfindeisen
Copy link

OS: Ubuntu 64-bit 18.04 LTS
Chronograf version: 1.7.9
Installation method: built from source
Related issues: #5090

The alert rule GUI rejects the message template

CI ID = {{ with (index .Tags "ci_id") }}#{{ . }}{{ else }}Unknown{{ end }}

as invalid (specifically, it objects to the ., not the with block itself). I've confirmed by editing the corresponding TICKscript that this template does get properly evaluated.

It also rejects any call to len that does not appear inside an if or with statement, such as

# of Tags = {{ len .Tags }}

I've confirmed that len does work inside a condition, so this function doesn't seem to be specifically blocked.

I assume other built-in functions might also cause problems, but have not tested them exhaustively, or as part of complex expressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants