You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To reproduce, in rule.yml add the following parameters:
alert_text_type: alert_text_jinjaalert_text: "Test"alert:
- slack:
alert_text_type: alert_text_jinjaalert_text: | An abnormal number ({{spike_count}}) of events occurred.
This is done as described in the documentation
You will then notice that your alert on Slack will not use the relevant Jinja template when using the FileRulesLoader.
The text was updated successfully, but these errors were encountered:
thib12
changed the title
Jira template is not updated when using an alert-specific alert_text
Jinja template is not updated when using an alert-specific alert_textJan 11, 2022
It looks like you could take lines 469-474 and and re-use them after line 522, preferably in a re-usable load_template() function. Feel free to submit a PR if you're interested in seeing this behavior changed for the next release.
To reproduce, in rule.yml add the following parameters:
This is done as described in the documentation
You will then notice that your alert on Slack will not use the relevant Jinja template when using the
FileRulesLoader
.The most likely cause is that the Jinja template is not recompiled as in https://github.com/jertel/elastalert2/blob/master/elastalert/loaders.py#L469, and therefore a wrong template (the one using the alert_text at the root of the config) is used.
The text was updated successfully, but these errors were encountered: