Hello, I am trying to migrate to elastalert2, and had one of my rules (which worked fine in elastalert) produce the following error:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/elastalert/loaders.py", line 321, in load_options
rule['run_every'] = datetime.timedelta(**rule['run_every'])
TypeError: type object argument after ** must be a mapping, not str
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/elastalert-test-rule", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/elastalert/test_rule.py", line 518, in main
test_instance.run_rule_test()
File "/usr/local/lib/python3.6/site-packages/elastalert/test_rule.py", line 465, in run_rule_test
conf['rules_loader'].load_options(rule_yaml, conf, self.args.file)
File "/usr/local/lib/python3.6/site-packages/elastalert/loaders.py", line 335, in load_options
raise EAException('Invalid time format used: %s' % e)
elastalert.util.EAException: Invalid time format used: type object argument after ** must be a mapping, not str
Investigating the problem, I found that the old rule was had this section:
run_every:
hours:24
I changed this to hours: 24 (added a space), and the modified rule worked fine in both elastalerts. However, I haven't found anything about this in the release notes, so this may be a breaking change someone missed.
Hello, I am trying to migrate to elastalert2, and had one of my rules (which worked fine in elastalert) produce the following error:
Investigating the problem, I found that the old rule was had this section:
I changed this to
hours: 24
(added a space), and the modified rule worked fine in both elastalerts. However, I haven't found anything about this in the release notes, so this may be a breaking change someone missed.