Open Thermi opened 7 years ago
Okay, that first part of the issue description was crap. I discovered that actually all alerters get their settings directly from the list of settings in the config.yml file. I got it intuitively wrong. I assumed that the settings were in specific dictionaries below the list. Why was that decision made? And can we have better documentation of that, please? I searched the site elastalert.readthedocs.org, but did not find any part about the configuration file syntax yet. Having a working example would be nice. :/
The slack alerter currently gets the webhook URL in the first layer of the document, instead of from the slack section. This should be changed, as the other alerters get all the other options from their own section. The documentation implies that that should already be the case, but it isn't.
Documentation: https://elastalert.readthedocs.io/en/latest/ruletypes.html#slack
Code:
I think
self.slack_webhook_url = self.rule['slack_webhook_url']
should beself.slack_webhook_url = self.rule.get('slack_webhook_url')
.