---
title: "Elasticsearch data source | Grafana documentation"
description: "Guide for using Elasticsearch in Grafana"
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# Elasticsearch data source

Elasticsearch is a search and analytics engine used for a variety of use cases. You can create many types of queries to visualize logs or metrics stored in Elasticsearch, and annotate graphs with log events stored in Elasticsearch.

The following resources will help you get started with Elasticsearch and Grafana:

- [What is Elasticsearch?](https://www.elastic.co/guide/en/elasticsearch/reference/current/elasticsearch-intro.html)
- [Configure the Elasticsearch data source](/docs/grafana/v12.4/datasources/elasticsearch/configure/)
- [Elasticsearch query editor](/docs/grafana/v12.4/datasources/elasticsearch/query-editor/)
- [Elasticsearch template variables](/docs/grafana/v12.4/datasources/elasticsearch/template-variables/)
- [Elasticsearch annotations](/docs/grafana/v12.4/datasources/elasticsearch/annotations/)
- [Elasticsearch alerting](/docs/grafana/v12.4/datasources/elasticsearch/alerting/)
- [Troubleshooting issues with the Elasticsearch data source](/docs/grafana/v12.4/datasources/elasticsearch/troubleshooting/)

## Key capabilities

The Elasticsearch data source supports:

- **Metrics queries:** Aggregate and visualize numeric data using bucket and metric aggregations.
- **Log queries:** Search, filter, and explore log data with Lucene query syntax.
- **Annotations:** Overlay Elasticsearch events on your dashboard graphs.
- **Alerting:** Create alerts based on Elasticsearch query results.

## Before you begin

Before you configure the Elasticsearch data source, you need:

- An Elasticsearch instance (v7.17+, v8.x, or v9.x)
- Network access from Grafana to your Elasticsearch server
- Appropriate user credentials or API keys with read access

> Note
> 
> If you use Amazon OpenSearch Service (the successor to Amazon Elasticsearch Service), use the [OpenSearch data source](/docs/grafana/v12.4/datasources/opensearch/) instead.

## Supported Elasticsearch versions

This data source supports these versions of Elasticsearch:

- ≥ v7.17
- v8.x
- v9.x
- Elastic Cloud Serverless

The Grafana maintenance policy for the Elasticsearch data source aligns with [Elastic Product End of Life Dates](https://www.elastic.co/support/eol). Grafana ensures proper functionality for supported versions only. If you use an EOL version of Elasticsearch, you can still run queries, but the query builder displays a warning. Grafana doesn’t guarantee functionality or provide fixes for EOL versions.

## Additional resources

Once you have configured the Elasticsearch data source, you can:

- Use [Explore](/docs/grafana/v12.4/explore/) to run ad hoc queries against your Elasticsearch data.
- Configure and use [template variables](/docs/grafana/v12.4/datasources/elasticsearch/template-variables/) for dynamic dashboards.
- Add [Transformations](/docs/grafana/v12.4/panels-visualizations/query-transform-data/transform-data/) to process query results.
- [Build dashboards](/docs/grafana/v12.4/dashboards/build-dashboards/) to visualize your Elasticsearch data.

## Related data sources

- [OpenSearch](/docs/grafana/v12.4/datasources/opensearch/) - For Amazon OpenSearch Service.
- [Loki](/docs/grafana/v12.4/datasources/loki/) - Grafana’s log aggregation system.
