Skip to main content
This page covers what to watch in production, which values to use, which permissions to grant, and what the package does not guarantee. Alert and branch only on stable fields: the error class, code, details.reason, the event type and outcome, state values, and report counts. Message text can change and depends on the locale.

Monitoring and alerts

The drain report fields, every event, and an event listener with state gauges are in Indexing worker. Backlog figures can be read with an administrative handle created without an OpenSearch client, so monitoring needs no administrator OpenSearch credentials. The recommended constants, their values, where each is used, and why each value was chosen are under “Recommended values” in Setup. They do not make required options optional: spread them and override only what you need.

Relationships between values

createIndexer checks the relationships among the worker limits and rejects a violation with SearchConfigurationError; the rules and their details.reason values are in the limits table of Indexing worker, together with the heap bound (about 65 MiB on the recommended values) and the drain time bound (245 s on the recommended values). These relationships are not checked, but must hold:
  • The administrative handle’s workerBounds must equal the actual worker limits. They set how long retirement waits after removing the alias, so a worker with a longer lease or request time limit can deliver a late bulk after the wait. If you override worker limits, rebuild them with workerBoundsFrom(overridden limits).
  • A query handle’s lifetimes cannot exceed the maximums recorded in read_heads (lifetime-exceeds-catalog at search time), so use the same RECOMMENDED_READ_LIFETIMES on both sides. The recorded values can be raised with changeReadLifetimes, but not lowered in a way that shortens the retirement grace.
  • If you raise the client’s requestTimeoutMs, raise adminLeaseMs too. One remote request cannot exceed (adminLeaseMs − 4 × statementTimeoutMs) / 3.
  • The worker stop deadline must be shorter than the orchestrator’s termination grace period, and stop() can take up to 3 × statementTimeoutMs beyond the deadline.

What to tune

OpenSearch permissions

These are the least-privilege roles for the package’s three handles on an engine with the security plugin enabled. Every index and alias name starts with snm-. The integration tests run every real operation of each handle under these roles, then remove each permission in turn and check that the package request needing it is denied with 403. This was checked on OpenSearch 3.5.0 and 3.9.0.
The admin role’s bulk and document-write permissions are used only by confirmStoreOwnership to take fences back; without them it cannot. The cluster-level indices:data/read/mget and indices:data/write/bulk (admin, worker) are required from 3.9.0: on 3.9.0 removing them gives 403, while 3.5.0 allows the requests without them. Keep them in the roles so the roles work across the supported range. The worker role has no permission to create indexes, so a late bulk arriving after retirement removed the alias cannot create one even without require_alias. The permission models and IAM policies of managed services such as AWS OpenSearch Service are untested.

PostgreSQL roles and supported versions

PostgreSQL permissions come in four groups (capture, worker, query, admin), granted by applySearchGrants; the groups and a membership example are in Setup. Use the admin role only for migrations and administrative commands, never for runtime processes. A role that may not call pg_control_system() still works, but the store binding check then compares only the database OID and name, without the system identifier.

Message language

How to set the message language (setSearchLocale, registerSearchMessages, error.localize) and how lookup falls back are under “Localizing messages” in Transactional indexing.

Known limits

Next steps

Recovery runbooks

Copied databases, quarantine, paused targets, ambiguous creates, source restores

miomock walkthrough

The integration in a real Sonamu application