Rule not triggering alerts but does with elastalert-test-rule --alert #1363
-
Hi there. I have the following rule that triggers when run against elastalert-test-rule --alert but doesn't otherwise:
The logs show 0 hits and 0 seen:
But elastalert-test-rule shows the correct result of 13 and with '--alert' passed to it, it sends the alerts to my slack channel as you'd expect.
I'm just not sure why it's working properly with elastalert-test-rule but not otherwise. Does anyone have any ideas? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 12 replies
-
Hello! The two logs are showing different time ranges: The |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
The queries look identical, and assuming you are redacting the identical Elastic hostname, using the same ElastAlert 2 config (Elast user/pass), and using the same ElastAlert 2 code (both modes are running from the same server, using the same ElastAlert 2 version) then it doesn't seem possible for one query by
host.hostname
to work, but the other not to work.I think my next step would be to start narrowing down if I can get any hits via a hostname query. Ex:
host.hostname: ip*
,host.hostname: *
,_exists_: host.hostname
, etc.