# Elasticsearch

### Supported Platforms

| Platform | Metrics | Logs | Traces |
| -------- | ------- | ---- | ------ |
| Linux    | ✓       | ✓    |        |
| Windows  | ✓       | ✓    |        |
| macOS    | ✓       | ✓    |        |

### Prerequisites

This receiver supports Elasticsearch versions 7.9+.

If Elasticsearch security features are enabled, you must have either the `monitor` or `manage` cluster privilege. See the [Elasticsearch docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/authorization.html) for more information on authorization and [Security privileges](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-privileges.html).

### Configuration Table

<table><thead><tr><th width="159.49609375">Parameter</th><th width="187.0625">Type</th><th width="285.11328125">Default</th><th width="347.9375">Description</th></tr></thead><tbody><tr><td>telemetry_types</td><td><code>telemetrySelector</code></td><td><code>["Logs", "Metrics"]</code></td><td>Choose Telemetry Type.</td></tr><tr><td>hostname*</td><td><code>string</code></td><td>"localhost"</td><td>The hostname or IP address of the Elasticsearch API.</td></tr><tr><td>port</td><td><code>int</code></td><td>9200</td><td>The TCP port of the Elasticsearch API.</td></tr><tr><td>username</td><td><code>string</code></td><td></td><td>Username used to authenticate.</td></tr><tr><td>password</td><td><code>string</code></td><td></td><td>Password used to authenticate.</td></tr><tr><td>collection_interval</td><td><code>int</code></td><td>60</td><td>Sets how often (seconds) to scrape for metrics.</td></tr><tr><td>nodes</td><td><code>strings</code></td><td>_node</td><td>Filters that define which nodes are scraped for node-level metrics. It should be set to '_node' if the collector is installed on all nodes. '_all' if a single collector is scraping the entire cluster. <code>https://www.elastic.co/guide/en/elasticsearch/reference/7.9/cluster.html#cluster-nodes</code>.</td></tr><tr><td>skip_cluster_metrics</td><td><code>bool</code></td><td>false</td><td>Enable to disable the collection of cluster-level metrics.</td></tr><tr><td>json_log_paths</td><td><code>strings</code></td><td><code>- \"/var/log/elasticsearch/__server.json\"</code> <code>- \"/var/log/elasticsearch/__deprecation.json\"</code> <code>- \"/var/log/elasticsearch/__index_search_slowlog.json\"</code> <code>- \"/var/log/elasticsearch/__index_indexing_slowlog.json\"</code> <code>- \"/var/log/elasticsearch/*_audit.json\"</code></td><td>File paths for the JSON formatted logs.</td></tr><tr><td>gc_log_paths</td><td><code>strings</code></td><td><code>- \"/var/log/elasticsearch/gc.log*\"</code></td><td>File paths for the garbage collection logs.</td></tr><tr><td>start_at</td><td><code>enum</code></td><td>end</td><td>Start reading the file from the 'beginning' or 'end'.</td></tr></tbody></table>

<mark style="color:red;">\*</mark>*<mark style="color:red;">required field</mark>*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bindplane.com/integrations/sources/elasticsearch.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
