elastalert icon indicating copy to clipboard operation
elastalert copied to clipboard

Testing rule with ES version 5.2.2 fails

Open ajaybhatnagar opened this issue 9 years ago • 3 comments

I have created rules with ES version 2.4.4 (works fine) and now trying with ES version 5.2.2. With 5.2.2 same rule gives this error below. OS version (Ubuntu 16.04) is same for both ES versions.

root@haproxydbmon:/usr/local/elastalert# elastalert-test-rule es_rules/es_change.yaml Traceback (most recent call last): File "/usr/local/bin/elastalert-test-rule", line 9, in load_entry_point('elastalert==0.1.8', 'console_scripts', 'elastalert-test-rule')() File "/usr/local/lib/python2.7/dist-packages/elastalert-0.1.8-py2.7.egg/elastalert/test_rule.py", line 333, in main test_instance.run_rule_test() File "/usr/local/lib/python2.7/dist-packages/elastalert-0.1.8-py2.7.egg/elastalert/test_rule.py", line 314, in run_rule_test conf = self.load_conf(rule_yaml, args) File "/usr/local/lib/python2.7/dist-packages/elastalert-0.1.8-py2.7.egg/elastalert/test_rule.py", line 294, in load_conf load_options(rules, conf) TypeError: load_options() takes at least 3 arguments (2 given)

With version 2.4.4 same command runs as follows: root@haproxy:/usr/local/elastalert# elastalert-test-rule es_rules/es_change.yaml Successfully loaded es change

INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 10.236.133.196 INFO:elastalert:Note: In debug mode, alerts will be logged to console but NOT actually sent. To send them, use --verbose. INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 10.236.133.196 INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 10.236.133.196

ajaybhatnagar avatar Mar 17 '17 20:03 ajaybhatnagar

Sorry, this is a result of a change pushed live today. I'll fix it right away.

Qmando avatar Mar 17 '17 20:03 Qmando

Thanks. Very fast response!!

ajaybhatnagar avatar Mar 17 '17 20:03 ajaybhatnagar

Fixed in master: https://github.com/Yelp/elastalert/commit/c9fd1959878e57983827555533bb6b924bb02c82

Qmando avatar Mar 17 '17 20:03 Qmando