Overview
OpenSRE queries OpenSearch (or Elasticsearch) to retrieve application logs, error events, and analytics records — pulling concrete log lines into the investigation alongside metrics and traces from your other observability tools. For Amazon OpenSearch Service (AWS ES) domain specifics, see also AWS Elasticsearch.Prerequisites
- OpenSearch 1.x/2.x or Elasticsearch 7.x/8.x reachable from the machine running OpenSRE
- The cluster URL (e.g.
https://my-cluster.us-east-1.es.amazonaws.com) - Credentials for one of:
- HTTP Basic Auth (username and password) — typical for self-hosted OpenSearch
- API key — typical for Elastic Cloud
- No auth — only when the cluster has the security plugin disabled
Setup
Option 1: Interactive CLI / onboard
Option 2: Environment variables
Use API key or basic auth, not both — verify rejects both set together. If only one of username/password is set, no
Authorization header is emitted.
Option 3: Persistent store
Credentials
Prefer a dedicated read-only user (or API key) scoped to the indices OpenSRE should search. For AWS ES, use fine-grained access control with an internal user — see AWS Elasticsearch.Quick local test with Docker
@timestamp, so use that field name, not timestamp:
query_elasticsearch_logs and didn’t need query_opensearch_analytics for this alert — both tools share the same credentials and index, so either is reachable from the same setup.
Teardown:
Investigation tools
Both become available once the
opensearch integration is configured.
Verify
GET /_cluster/health for live feedback.
Troubleshooting
Security
- Prefer least-privilege read users / API keys.
- Do not use the master user for OpenSRE.
- Store credentials out of source control.