我得到以下错误get:
Traceback (most recent call last):
File "/usr/local/bin/elastalert-test-rule", line 9, in <module>
load_entry_point('elastalert==0.0.88', 'console_scripts', 'elastalert-test-rule')()
File "/usr/local/lib/python2.7/dist-packages/elastalert-0.0.88-py2.7.egg/elastalert/test_rule.py", line 287, in main
test_instance.run_rule_test()
File "/usr/local/lib/python2.7/dist-packages/elastalert-0.0.88-py2.7.egg/elastalert/test_rule.py", line 269, in run_rule_test
rule_yaml = yaml.load(fh)
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 "example_rules/example_frequency.yaml", line 20, column 1
example_rules / example_frequency.yaml中的内容为:
es_host: localhost
es_port: 9200
name: Ravi
type: frequency
index: logstash-*
num_events: 50
timeframe:
hours: 4
filter:
- term:
country: "India1"
alert:
- "email"
email:
- "ravi.pandey@paytm.com"