Configure the Elasticsearch connection
In this milestone, you configure the connection details so that Grafana Cloud can query your Elasticsearch instance. This includes the server URL, the authentication method, the index name, and the time field.
Refer to Configure the Elasticsearch data source for the full list of settings.
Under Connection > URL, enter the URL of your Elasticsearch server, including the port.
For example:
http://elasticsearch.example.com:9200Under Elasticsearch details > Index name, enter the name of the index you want to query.
You can use a wildcard pattern such as
logs-*, a time pattern such as[filebeat-]YYYY.MM.DD, or a specific index name such asapplication-logs.Under Elasticsearch details > Time field name, enter the name of your time field.
The default is
@timestamp. Enter a different name only if your index uses a custom time field.
Configure authentication
Under Authentication, select the method that matches your Elasticsearch security configuration:
- Basic authentication — Enter the username and password for your Elasticsearch user.
- Forward OAuth identity — Forward the OAuth access token (and the OIDC ID token if available) of the user querying the data source.
- No authentication — Use only if your Elasticsearch instance doesn’t require credentials. To authenticate with an API key, select No authentication, then add an HTTP header named
Authorizationwith the valueApiKey <your-api-key>. - Serverless API key — Enter your API key to connect to an Elastic Cloud Serverless instance.
Enter credentials directly in the Grafana UI — for your security, this path doesn’t automate filling passwords or API keys.
In the next milestone, you’ll save and test the connection to verify everything is configured correctly.