我正在尝试将datadog集成到elasticsearch,但datadog收集器显示错误。我无法解决这个问题。请帮忙
2017-07-14 13:49:28 UTC | ERROR | dd.collector | checks.elastic(__init__.py:812) | Check 'elastic' instance #0 failed
Traceback (most recent call last):
File "/opt/datadog-agent/agent/checks/__init__.py", line 795, in run
self.check(copy.deepcopy(instance))
File "/opt/datadog-agent/agent/checks.d/elastic.py", line 418, in check
pshard_stats_data = self._get_data(pshard_stats_url, config)
File "/opt/datadog-agent/agent/checks.d/elastic.py", line 578, in _get_data
cert=cert
File "/opt/datadog-agent/embedded/lib/python2.7/site-packages/requests/api.py", line 70, in get
return request('get', url, params=params, **kwargs)
File "/opt/datadog-agent/embedded/lib/python2.7/site-packages/requests/api.py", line 56, in request
return session.request(method=method, url=url, **kwargs)
File "/opt/datadog-agent/embedded/lib/python2.7/site-packages/requests/sessions.py", line 475, in request
resp = self.send(prep, **send_kwargs)
File "/opt/datadog-agent/embedded/lib/python2.7/site-packages/requests/sessions.py", line 596, in send
r = adapter.send(request, **kwargs)
File "/opt/datadog-agent/embedded/lib/python2.7/site-packages/requests/adapters.py", line 499, in send
raise ReadTimeout(e, request=request)
ReadTimeout: HTTPConnectionPool(host='localhost', port=9200): Read timed out. (read timeout=5)
我的elastic.yaml
init_config: null
instances:
- url: http://localhost:9200
pshard_stats: true
tags:
- 'role:elasticsearch'
答案 0 :(得分:2)
" ReadTimeout:HTTPConnectionPool"可以通过在elasticsearch.yaml
中的实例下添加timeout参数来更正错误 timeout: 8