Multiple Rules Won't Run
Has anyone else experienced an issue where multiple Rules that are located in the defined rules folder don't simultaneously run? When I start elastalert, it seems to only choose 1 of the rules in the folder to load and run. If I start elastalert and manually reference specific rule files --rule /opt/elastalert/rules/test.yaml, each rule works great. I can start multiple instances of elastalert, each specifically referencing an individual rule file without any issues. However, it is not ideal longterm to reference individual rule files and to have 30+ running process of elastalert. Any thoughts? I've tried both v0.1.18 and v0.1.20
@yoda-sec
please recheck the below two things
Run elastalert by specifying the config.yaml
python -m elastalert.elastalert --verbose --config /opt/elastalert/config.yaml
AND ensure the rule folder name is correct.
# Any .yaml file will be loaded as a rule
rules_folder: Rule_folder
@sathishdsgithub I manually specify the the config file when I start elastalert. The config file lives in /opt/elastalert. I have set the rules_folder value to both "rules" and "/opt/elastalert/rules". Both will allow elastalert to successfully start and start running 1 of the .yaml files from the folder, just not all of them.
Can you do an ls of /opt/elastalert/rules and show output from running elastalert with --verbose?
Same problem here.
If I run Elastalert with 2 rule files, it will just take the error monitoring one.
I found this problem because I only receive one type of post but there are two types of the log.
Found the problem is because of the Elasticsearch contains too many logs that meet the error condition. Therefore the Elastalert busy alerting the old logs.
After clear Elasticseach storage, it can process two rule files
Is there any way to let ElastAlert do not process the log which is too old? Please check my rule file.
Rule 1
es_host: xxx.xxx.xxx.xxx
es_port: 9200
name: Error Monitoring
type: any
index: logstash-*
realert:
minutes: 0
filter:
- query:
query_string:
query: "level:error OR level:warn OR (NOT level:* AND message: *error*)"
alert: post
http_post_url: "xxx.xxx.xxx.xxx"