+ exec:
+ commands:
+ - "/usr/local/bin/elasticsearch_check_read_only.sh"
+ interval: "30s"
+ timeout: "15s"
+ data_format: "json"
+{%- endif %}
+
+{%- if client.get('enabled', False) %}
+{# The remote agent gathers only the cluster health metrics #}
+remote_agent:
+ input:
+ elasticsearch:
+ template: elasticsearch/files/telegraf.conf
+ servers:
+ - "{{ client.server.get('scheme', 'http') }}://{{ client.server.host }}:{{ client.server.get('port', 9200) }}"