运行规则测试时出现ElastAlert错误错误:%d格式:需要一个数字,而不是NoneType

时间:2016-07-04 03:51:40

标签: elasticsearch elastalert

我正在 example_rules 文件夹下运行示例规则,并始终收到此错误:

load_entry_point('elastalert==0.0.91', 'console_scripts', 'elastalert-test-rule')()
File "/usr/local/lib/python2.7/dist-packages/elastalert-0.0.91-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.91-py2.7.egg/elastalert/test_rule.py", line 275, in run_rule_test
hits = self.test_file(copy.deepcopy(rule_yaml), args)
File "/usr/local/lib/python2.7/dist-packages/elastalert-0.0.91-py2.7.egg/elastalert/test_rule.py", line 54, in test_file
es_client = ElastAlerter.new_elasticsearch(es_config)
File "/usr/local/lib/python2.7/dist-packages/elastalert-0.0.91-py2.7.egg/elastalert/elastalert.py", line 143, in new_elasticsearch
send_get_body_as=es_conn_conf['send_get_body_as'])
File "/usr/local/lib/python2.7/dist-packages/elasticsearch/client/__init__.py", line 150, in __init__
self.transport = transport_class(_normalize_hosts(hosts), **kwargs)
File "/usr/local/lib/python2.7/dist-packages/elasticsearch/transport.py", line 113, in __init__
self.set_connections(hosts)
File "/usr/local/lib/python2.7/dist-packages/elasticsearch/transport.py", line 166, in set_connections
connections = map(_create_connection, hosts)
File "/usr/local/lib/python2.7/dist-packages/elasticsearch/transport.py", line 165, in _create_connection
return self.connection_class(**kwargs)
File "/usr/local/lib/python2.7/dist-  packages/elasticsearch/connection/http_requests.py", line 40, in __init__
  host, port, self.url_prefix
TypeError: %d format: a number is required, not NoneType

Elastalert配置:

es_host:localhost  es_port:9200  use_ssl:错误  名称:“提供商缓慢响应”  类型:秒杀  index:filebeat *  threshold_cur:2  大体时间:    分钟:10  spike_height:1  spike_type:“up”  过滤:    - 查询:       请求参数:         查询:“_ type:nginxlog”   警报:    - “电子邮件”

电子邮件: - me@mail.com

有任何帮助吗?

0 个答案:

没有答案