Connecting Grafana to Elasticsearch
Now that we have our data loaded into Elasticsearch, we’ll need to create a data source connection in Grafana to read it. Connecting to Elasticsearch is not substantially different from the InfluxDB data sources we’ve been using. The authorization controls for our Elasticsearch container allow open access to the data source, so we won’t need to use an API token to access it:
- Open your browser to the Grafana app and select Connections | Add new connection from the main menu.
- Search for the Elasticsearch data source and select it.
- Click on Add a new data source. Fill out the following form fields:
- Name:
Elasticsearch
- HTTP | URL: http://elasticsearch:9200
- Elasticsearch details | Index name:
data-index
- Elasticsearch details | pattern: No pattern
- Elasticsearch details | Time field name:
Opened
- Elasticsearch details | Min time interval:
5m
- Name:
The data source page should look something like this: