elastalert icon indicating copy to clipboard operation
elastalert copied to clipboard

Is it possible to add additional field of alert_info into ElastAlert Metadata Index ?

Open perceptron01 opened this issue 6 years ago • 1 comments

When using Slack alerter, Metadata Index of elastalert will contain these two fields about alert_info.

  • alert_info.slack_username_override
  • alert_info.type

What I want to do is to add new filed alert_info.slack_channel_override into elastalert Metadata Index.

Is there any way to realize that?

perceptron01 avatar Jul 14 '20 11:07 perceptron01

I guess the implementation is here. https://github.com/Yelp/elastalert/blob/f4bad06f35e44d664072f9a7a80580650c62fbef/elastalert/alerts.py#L1223-L1225

So the only way to add new fields into metadata index is creating a new Alerter that inherits from SlackAlerter and that has a method get_info returning new fields?

Any other way easier?

perceptron01 avatar Jul 14 '20 11:07 perceptron01