elastalert
elastalert copied to clipboard
ElastAlert Not starting with latest version v0.1.29
@Qmando @Dmitry1987
I downloaded the latest version v0.1.29 and tried to start the elastalert but it gives me the below error. Can someone assist me on this?
[root@machine elastalert]# python elastalert/elastalert.py --start NOW --verbose --rule Rule_folder/myrule.yaml
Traceback (most recent call last):
File "elastalert/elastalert.py", line 1856, in <module>
sys.exit(main(sys.argv[1:]))
File "elastalert/elastalert.py", line 1850, in main
client = ElastAlerter(args)
File "elastalert/elastalert.py", line 130, in __init__
self.conf = load_rules(self.args)
File "/tmp/elastalert/elastalert/config.py", line 473, in load_rules
rule = load_configuration(rule_file, conf, args)
File "/tmp/elastalert/elastalert/config.py", line 114, in load_configuration
rule = load_rule_yaml(filename)
File "/tmp/elastalert/elastalert/config.py", line 140, in load_rule_yaml
if os.path.isabs(rule['import']):
File "/usr/lib64/python2.7/posixpath.py", line 61, in isabs
return s.startswith('/')
AttributeError: 'list' object has no attribute 'startswith'
[root@machine elastalert]# python -m elastalert.elastalert --start NOW --verbose --rule Rule_folder/myrule.yaml
Traceback (most recent call last):
File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/tmp/elastalert/elastalert/elastalert.py", line 1856, in <module>
sys.exit(main(sys.argv[1:]))
File "/tmp/elastalert/elastalert/elastalert.py", line 1850, in main
client = ElastAlerter(args)
File "/tmp/elastalert/elastalert/elastalert.py", line 130, in __init__
self.conf = load_rules(self.args)
File "elastalert/config.py", line 473, in load_rules
rule = load_configuration(rule_file, conf, args)
File "elastalert/config.py", line 114, in load_configuration
rule = load_rule_yaml(filename)
File "elastalert/config.py", line 140, in load_rule_yaml
if os.path.isabs(rule['import']):
File "/usr/lib64/python2.7/posixpath.py", line 61, in isabs
return s.startswith('/')
AttributeError: 'list' object has no attribute 'startswith'
http://elastalert.readthedocs.io/en/latest/ruletypes.html?highlight=import
"You can only have one import per rule"