-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add Jinja2 Templating Option to Alert Text Formatting 🌈 #2993
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This enables the user to silence a rule only for a specific query_key value and not only the whole rule. See Issue Yelp#2777
…nto fix-aws_profile-sns
…ps://github.com/nsano-rururu/elastalert into sync-requirements-and-setup
…nto fix-aws_profile-sns
The Stride service was shutdown on February 15th, 2019.
TheHive alerter: Allow severity and tlp to be set by rule
…nto sync-requirements-and-setup
Merge from yelp/elastalert:master to ensure parity
Merge latest from yelp/elastalert into alt branch
@Qmando Any update about this PR ? |
Fix docker test
Fix test_rule.py error
Fix LineNotify & Pagertree
…o-rururu/elastalert into sync-requirements-and-setup
Remove Stride integration
Fix initializing self.thread_data.alerts_sent for running elastalert-…
Sync requirements.txt and setup.py
Update Docs for Zabbix
Fix SnsAlerter
Kibana Discover app link 7.4/7.5/7.6/7.7/7.8/7.9/7.10 support
Fix documents
@sherifabdlnaby Any way you could push this PR to https://github.com/jertel/elastalert ? |
Remove hipchat & Fix loaders.py
Adds --silence_qk_value option to elastalert
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello @Qmando ,
I've been maintaining a fork of ElastAlert that's used internally for many changes, one of the most useful and important change is having Jinja2 Templating Engine in Alert Text.
Motivation
Jinja2 allows alerts to be more concise, informative, clean, and more dynamic, it allows us for example:
Adding Jinja2 improved Slack alerts tremendously, we would send a
@channel
or@here
based on the count ofnum_matches
or based on a certain error type. We would also have a multi-nested for-each loop that prints out data nicely in the alert and trimming possible long messages so the alert still is small and concise. Also, email alerts were much nicer and more cleaner.Example:
Generates an alert like:
Actual Alerts I use internally are much better looking but because I've made edits to fully utilize Slack API. I will try to breakdown one by one and open PRs.
Changes Made
Only a new
alert_text_type
=alert_text_jinja
that will render the jinja template inalert_text
using Jinja2 package.This change is small and backward compatible it doesn't affect any old behavior only add new.
Thank you.