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

Add webhook alerter and docs #3042

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

lastbulletbender
Copy link

The webhook alerter uses jinja templating engine which allows creating user customizable endpoints and body.

The webhook alerter uses jinja templating engine which allows creating user customizable endpoints and body.
@nsano-rururu
Copy link
Contributor

nsano-rururu commented Nov 18, 2020

@lastbulletbender

Maybe I need to add Jinja2 installation to requirements.txt and setup.py?
https://pypi.org/project/Jinja2/

@lastbulletbender
Copy link
Author

@nsano-rururu Ah yes! Forgot to add it to the commit. I will do it now.

@lastbulletbender
Copy link
Author

I don't usually write in python. So any and all feedback is appreciated!

@lastbulletbender lastbulletbender mentioned this pull request Nov 18, 2020
@nsano-rururu
Copy link
Contributor

Isn't it better to add example_rules as well?
https://github.com/Yelp/elastalert/tree/master/example_rules

Since there is a description about the alert type in README.md, shouldn't it be better to add "webhook" as well?
https://github.com/Yelp/elastalert/blob/master/README.md

Currently, we have built-in support for the following alert types:

Email
JIRA
OpsGenie
Commands
HipChat
MS Teams
Slack
Telegram
GoogleChat
AWS SNS
VictorOps
PagerDuty
PagerTree
Exotel
Twilio
Gitter
Line Notify
Zabbix

@nsano-rururu
Copy link
Contributor

The test code seems to be written in the following file. It seems that travis-ci is running and the test code written in pytest is running when the pull request is made.
I don't have any knowledge about pytest because I haven't written Python.
https://github.com/Yelp/elastalert/blob/master/tests/alerts_test.py

@lastbulletbender
Copy link
Author

I completely missed the example_rules and Readme. I'll add those. Thanks @nsano-rururu

I am currently in middle of writing tests for these as I haven't used pytest before this.

@nsano-rururu
Copy link
Contributor

If you describe the parameter and data type in schema.yaml, an error will appear on the console when the rule runs with a value different from the specified data type, for example, specifying the integer value and specifying the string value. Because the data type of the parameter specified in the rule is different
https://github.com/Yelp/elastalert/blob/master/elastalert/schema.yaml

@nsano-rururu
Copy link
Contributor

nsano-rururu commented Apr 23, 2021

@lastbulletbender

Any way you could push this PR to https://github.com/jertel/elastalert2 ?

@lastbulletbender
Copy link
Author

Hey @nsano-rururu ! Sure. Let me write up the tests which I had skipped earlier and add create a PR. I'll do it by end of next week.

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

Successfully merging this pull request may close these issues.

2 participants