0
我想將datadog集成到elasticsearch,但datadog收集器顯示一個錯誤。我無法解決這個問題。請幫助datadog elasticsearch檢查與ReadTimeout失敗
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'
嗯予以糾正,聽起來像你正在運行dd-agent的服務器上不存在'http:// localhost:9200/_stats'端點。也許值得證實,通過捲曲它? (也許也可以用'dd-agent'用戶捲曲) 或者你可能需要添加一些額外的[configs for authentication](https://github.com/DataDog/integrations-core/blob/master/elastic/ conf.yaml.example#L33-L34)? – stephenlechner
我改變了網址到正確的一個,我也添加了cluster_stats:true,但我仍然得到這個錯誤。 – Swat
hmm,以及使用'/ _stats'端點將這個新網址蜷縮的運氣?可能值得在這個時候點擊「support @ datadoghq.com」 - 他們會很快回復並給予一些幫助。他們很可能會問一個[flare](https://help.datadoghq.com/hc/en-us/articles/204991415-Send-logs-and-configs-to-Datadog-via-flare-command) – stephenlechner