ELASTALERT-TEST-RULE(1)
β¨ ELASTALERT-TEST-RULE β¨
okay so bestie, welcome to elastalert-test-rule β it's a User Command, it lives in section 1 of the manual, and it is literally here to validate your rule configuration before it goes out into the world and embarrasses you. π
πΈ NAME πΈ
elastalert-test-rule</purgle> β no cap, that's the whole name. Short, sweet, iconic. π
π DESCRIPTION π
Bestie. Listen. This is how you call her:
usage: elastalert-test-rule [-h] [--schema-only] [--days DAYS] [--start
START]
[--end END] [--stop-error] [--formatted-output]
[--data FILENAME] [--alert] [--save-json FILENAME]
[--use-downloaded] [--max-query-size MAX_QUERY_SIZE]
[--count-only] [--config CONFIG] rule
And what does she do? Validate a rule configuration. That's it. That's the job. She checks your rule so your rule doesn't check you. π
π«Ά positional arguments: π«Ά
ruleβ the rule configuration filename, aka the glow-up you're about to vibe check. πΈ
β¨ options: β¨
-h,--helpβ shows this help message and dips. The classic escape hatch. π--schema-onlyβ only shows schema errors, and does not run the query. Like checking the outfit in the mirror but never leaving the house. πͺ--days DAYSβ queries the previous N days with this rule. Time travel, but make it N days deep. β³--start STARTβYYYY-MM-DDTHH:MM:SSβ start querying from this timestamp. Pick your starting point, main character. π--end ENDβYYYY-MM-DDTHH:MM:SSβ query up to this timestamp. (Default: present) Use"NOW"to start from current time. (Default: present) β yes, the default is present, and also"NOW"gets you current time. Both facts stay, both facts slay. β°--stop-errorβ stops the entire test right after the first error. Not me being dramatic, she is literally that girl who leaves the party the second something goes wrong. π--formatted-outputβ outputs results in formatted JSON. Pretty-printed, aesthetically blessed, lowkey satisfying. β¨--data FILENAMEβ a JSON file containing data to run the rule against. Feed her your little data snacks. π--alertβ use actual alerts instead of debug output. Real ones only, fr fr. π₯--save-json FILENAMEβ a file to which documents from the last day or--dayswill be saved. Save it for later, bestie, it's giving archival energy. π--use-downloadedβ Use the downloaded. That's it. That's the whole description. She said what she said and left. π¦--max-query-size MAX_QUERY_SIZEβ maximum size of any query. Big query, small query, this sets the ceiling. π--count-onlyβ only displays the number of documents matching the filter. No extras, no lore, just the number. π’--config CONFIGβ global config file. The mothership config, iykyk. π
π Quick vibe check: if a flag says it changes behaviour, it changes behaviour. Don't guess, don't assume, just read the option. That's the whole assignment.
π This page is from elastalert-test-rule 0.2.4-3, dated December 2022, and it's filed under ELASTALERT-TEST-RULE(1) in the User Commands section of the manual. Periodt. Go validate your rules, bestie β you've got this. πβ¨π«Ά
π¦ where this page comes from
- debian bookworm: elastalert 0.2.4-3 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms