Skip to content

Possible issue with is_enabled and elastalert-test-rule command #1228

Locked Answered by jertel
invisibleninja06 asked this question in Q&A
Discussion options

You must be logged in to vote

The is_enabled flag is used by ElastAlert 2's initialization stage to separate rules into an enabled list, and a disabled list. Rules in the disabled list do not get fully initialized. Later during the scheduling loop, the enabled list of rules get run on each scheduled cycle.

elastalert-test-rule uses that same initialization logic, which detects that the rule is disabled. However, since you are telling the script "RUN THIS RULE!" via the command line arguments, it bypasses the scheduling logic and immediately runs the specified rule. Yet the rule was not properly initialized because it's marked as a disabled rule.

So you have an awkward scenario here, where your telling a helper tool to…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@invisibleninja06
Comment options

@jertel
Comment options

Answer selected by invisibleninja06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants