ELK与elastalert 集成测试时报错,望大佬们来瞧一瞧看一看

不知道这20错在哪,空格也不多。[root@ELK example_rules]# elastalert-test-rule my_rule.yaml
Traceback (most recent call last):
  File "/usr/bin/elastalert-test-rule", line 11, in <module>
    load_entry_point('elastalert==0.1.32', 'console_scripts', 'elastalert-test-rule')()
  File "/usr/lib/python2.7/site-packages/elastalert-0.1.32-py2.7.egg/elastalert/test_rule.py", line 381, in main
    test_instance.run_rule_test()
  File "/usr/lib/python2.7/site-packages/elastalert-0.1.32-py2.7.egg/elastalert/test_rule.py", line 360, in run_rule_test
    rule_yaml = load_rule_yaml(args.file)
  File "/usr/lib/python2.7/site-packages/elastalert-0.1.32-py2.7.egg/elastalert/config.py", line 130, in load_rule_yaml
    loaded = yaml_loader(filename)
  File "build/bdist.linux-x86_64/egg/staticconf/loader.py", line 168, in yaml_loader
  File "build/bdist.linux-x86_64/egg/yaml/__init__.py", line 71, in load
  File "build/bdist.linux-x86_64/egg/yaml/constructor.py", line 37, in get_single_data
  File "build/bdist.linux-x86_64/egg/yaml/composer.py", line 39, in get_single_node
  File "build/bdist.linux-x86_64/egg/yaml/parser.py", line 98, in check_event
  File "build/bdist.linux-x86_64/egg/yaml/parser.py", line 174, in parse_document_start
yaml.parser.ParserError: expected '<document start>', but found '<block mapping start>'
  in "my_rule.yaml", line 20, column 1
#####################################分界线########################
 9  es_port: 9200
 10
 11 # (OptionaL) Connect with SSL to Elasticsearch
 12 #use_ssl: True
 13
 14 # (Optional) basic-auth username and password for Elasticsearch
 15 #es_username: elastic
 16 #es_password: pRT3BFBt9JBeD91H9PcM
 17
 18 # (Required)
 19 # Rule name, must be unique
 20 name: elastalert_status
 
已邀请:

要回复问题请先登录注册