elastalert icon indicating copy to clipboard operation
elastalert copied to clipboard

Alert for time range

Open kernelpanicfbsd opened this issue 9 years ago • 8 comments

Hello, I need to receive alerts only between a certain time range (not date) so if I want to only recieve alerts between 6 in the morning and 6 in the evening would it look something like this?

filter:
- range:
    @timestamp:
      from: 06.00.00
      to: 18.00.00

kernelpanicfbsd avatar Aug 04 '17 13:08 kernelpanicfbsd

This feature doesn't exist yet but will be ready very soon. I have a branch that supports this almost ready for review.

Qmando avatar Aug 04 '17 16:08 Qmando

OK thankyou.

kernelpanicfbsd avatar Aug 10 '17 09:08 kernelpanicfbsd

@Qmando did you add this yet?

tomdoherty avatar Mar 05 '18 00:03 tomdoherty

Bit of a coincidence, I was wondering about this yesterday :) I've read the current docs and can't seem to find any info on this feature

kernelpanicfbsd avatar Mar 05 '18 00:03 kernelpanicfbsd

I would also need this feature :)

admlko avatar Sep 27 '18 05:09 admlko

For our case I didn't want to receive alerts between 18:00 - 07:00, so I got round it by just adding cron commands to remove the .yaml extension of the rule at 18:00 the re-add the extension at 07:00

kernelpanicfbsd avatar Sep 28 '18 12:09 kernelpanicfbsd

I found a solution by making an Enhancement for those who are still interested: https://github.com/0x-29A/elastalert_hour_range

0xSeb avatar Aug 27 '19 21:08 0xSeb

Nice, but not for my use-case. I don't want to drop any alerts, just want to spool them until the morning. Anyway, nice job!

EDIT: I think the feature was implemented some time ago, it's called aggregation. Cool!

admlko avatar Aug 28 '19 05:08 admlko