netdata collect elasticsearch timeout

Version: netdata v1.34.1
2022-07-11 17:56:20: python.d ERROR: elasticsearch[local] : Url: Error: HTTPConnectionPool(host=‘’, port=9200): Max retries exceeded with url: /_nodes/_local/stats (Caused by ReadTimeoutError(“HTTPConnectionPool(host=‘’, port=9200): Read timed out. (read timeout=1)”,))

Please do a wget or curl on the same URL. If it doesn’t respond, then the issue is on the ElasticSearch side.
I did a small search and saw only one prerequisite for the various /stats APIs to work. e.g. for the cluster /stats API, it says:

If the Elasticsearch security features are enabled, you must have the monitor or manage cluster privilege to use this API.

@ilyam8 suggested that the timeout could just be because it’s a remote address and the default of 1sec to get a response isn’t enough. You can add timeout: XXX to your data collection job, to increase the timeout:

From go.d/elasticsearch.conf

#  - timeout
#    HTTP response timeout.
#    Syntax:
#      timeout: 1