1

我正在尝试将 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)

我的弹性.yaml

init_config: null
instances:
-   url: http://localhost:9200
    pshard_stats: true
    tags:
      - 'role:elasticsearch'
4

1 回答 1

2

“ReadTimeout: HTTPConnectionPool”错误可以通过在 elasticsearch.yaml 中的实例下添加超时参数来纠正

 timeout: 8
于 2017-07-16T03:03:15.037 回答