elastalert icon indicating copy to clipboard operation
elastalert copied to clipboard

Alerts occuring every minute in a single mail

Open namratapanchal opened this issue 8 years ago • 3 comments

Hello , I am new to elastalert. I am trying to set up alerts where i want all the alerts generated in the duration of one minute should be compiled and sent in a single mail. I want this to repeat every minute. Is it possible? Can you help me with this. Thank you in advance.

namratapanchal avatar Feb 26 '18 00:02 namratapanchal

This code works perfectly fine, but doesn't give the output the way I want. Currently I am getting different mails for the failed requests. For eg: If two requests with "Name"- abc and one with "Name"- xyz is failing in the duration of one minute, I am getting one mail for abc and one for xyz. But i want an alert that mentions both abc and 'xyz' failed requests for the duration of one minute in a single email.

Here I am sharing my code:

type: "frequency" filter:

  • query: query_string: query: "result:FAILURE"

num_events: 1 timeframe: seconds: 30

alert_text: "{0} failed, reason {1}" alert_text_type: exclude_fields alert_text_args:

  • Name
  • Message alert_subject: "Failure message" alert:
  • "email" email:
  • "[email protected]" aggregation: minutes: 1 aggregation_key: "Name" realert: minutes: 0

namratapanchal avatar Feb 26 '18 01:02 namratapanchal

Solved it myself

namratapanchal avatar Feb 26 '18 07:02 namratapanchal

how you solved it sir ?

ayush1396 avatar May 10 '18 11:05 ayush1396