OpenSearch reference ΒΆ
Configuration options ΒΆ
The spec.openSearch configuration allows you to reference a single OpenSearch instance with a desired access mode.
spec:
openSearch:
instance: <OpenSearchInstanceName>
access: readwrite | read | write | adminFor details, see the manifest reference for your workload type:
- Application:
.spec.openSearch - Job:
.spec.openSearch
Access levels ΒΆ
The access levels are as follows:
| Access level | Description |
|---|---|
read | Allows only searching and retrieving documents. Allows access to _search and _mget APIs |
write | Allows updating, adding, and deleting documents. Allows access to _bulk, _mapping, _update_by_query, and _delete_by_query APIs |
readwrite | Grants full access to documents. Allows access to _search, _mget, _bulk, _mapping, _update_by_query, and _delete_by_query APIs |
admin | Allows unlimited access to indices |
See the Aiven documentation for more details.
Environment variables ΒΆ
When using an OpenSearch from your workload, these environment variables are available at runtime:
| Key | Value |
|---|---|
OPEN_SEARCH_URI | The URI for the OpenSearch instance. |
OPEN_SEARCH_HOST | The host for the OpenSearch instance. |
OPEN_SEARCH_PORT | The port for the OpenSearch instance. |
OPEN_SEARCH_USERNAME | The username to use when connecting. |
OPEN_SEARCH_PASSWORD | The password to use when connecting. |
OPEN_SEARCH_DASHBOARD_URI | The URI for the OpenSearch dashboard. |
OPEN_SEARCH_DASHBOARD_HOST | The host for the OpenSearch dashboard. |
OPEN_SEARCH_DASHBOARD_PORT | The port for the OpenSearch dashboard. |
Metrics ΒΆ
If your OpenSearch instance is managed by Nais Console, you will find essential instance metrics in Nais Console in the "Insights" tab.
Metrics are not available for the SINGLE_NODE tier and GB_2 memory configuration (equivalent to the hobbyist service plan in Aiven).
Additional metrics are available in Prometheus. For example, CPU usage percentage can be queried with:
100 - avg by (cpu) (cpu_usage_idle{service="opensearch-<team>-<instance>"})See the Aiven documentation for a full list of available OpenSearch metrics.