Elasticsearch Notification Settings

This page documents settings for configuring an Elasticsearch service as a target for Bucket Notifications. See Publish Events to Elasticsearch for a tutorial on using these settings.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Multiple Elasticsearch Targets

You can specify multiple Elasticsearch service endpoints by appending a unique identifier _ID for each set of related settings. For example, the following commands set two distinct Elasticsearch service endpoints as PRIMARY and SECONDARY, respectively:

Examples

export MINIO_NOTIFY_ELASTICSEARCH_ENABLE_PRIMARY="on"
export MINIO_NOTIFY_ELASTICSEARCH_URL_PRIMARY="https://user:[email protected]:9200"
export MINIO_NOTIFY_ELASTICSEARCH_INDEX_PRIMARY="bucketevents"
export MINIO_NOTIFY_ELASTICSEARCH_FORMAT_PRIMARY="namespace"

export MINIO_NOTIFY_ELASTICSEARCH_ENABLE_SECONDARY="on"
export MINIO_NOTIFY_ELASTICSEARCH_URL_SECONDARY="https://user:[email protected]:9200"
export MINIO_NOTIFY_ELASTICSEARCH_INDEX_SECONDARY="bucketevents"
export MINIO_NOTIFY_ELASTICSEARCH_FORMAT_SECONDARY="namespace"
mc admin config set notify_elasticsearch:primary \
   url="user:password@https://elasticsearch-endpoint.example.net:9200" \
   index="bucketevents" \
   format="namespace" \
   [ARGUMENT=VALUE ...]

mc admin config set notify_elasticsearch:secondary \
   url="user:password@https://elasticsearch-endpoint.example.net:9200" \
   index="bucketevents" \
   format="namespace" \
   [ARGUMENT=VALUE ...]

Notice that for configuration settings, the unique identifier appends to notify_elasticsearch only, not to each individual argument.

Settings

Enable

Required

MINIO_NOTIFY_ELASTICSEARCH_ENABLE

envvar

Specify on to enable publishing bucket notifications to an Elasticsearch service endpoint.

Defaults to off.

Requires specifying the following additional environment variables if set to on:

notify_elasticsearch

mc-conf

The top-level configuration key for defining an Elasticsearch service endpoint for use with MinIO bucket notifications.

Use mc admin config set to set or update an Elasticsearch service endpoint. The following arguments are required for each target:

Specify additional optional arguments as a whitespace (" ")-delimited list.

mc admin config set notify_elasticsearch \
  url="https://user:[email protected]:9200" \
  [ARGUMENT="VALUE"] ... \

URL

Required

MINIO_NOTIFY_ELASTICSEARCH_URL

envvar

notify_elasticsearch url

mc-conf

Specify the Elasticsearch service endpoint to which MinIO publishes bucket events. For example, https://elasticsearch.example.com:9200.

MinIO supports passing authentication information using as URL parameters using the format PROTOCOL://USERNAME:PASSWORD@HOSTNAME:PORT.

Index

Required

MINIO_NOTIFY_ELASTICSEARCH_INDEX

envvar

notify_elasticsearch index

mc-conf

Specify the name of the Elasticsearch index in which to store or update MinIO bucket events. Elasticsearch automatically creates the index if it does not exist.

Format

Required

MINIO_NOTIFY_ELASTICSEARCH_FORMAT

envvar

notify_elasticsearch format

mc-conf

Specify the format of event data written to the Elasticsearch index. MinIO supports the following values:

namespace

For each bucket event, MinIO creates a JSON document with the bucket and object name from the event as the document ID and the actual event as part of the document body. Additional updates to that object modify the existing index entry for that object. Similarly, deleting the object also deletes the corresponding index entry.

access

For each bucket event, MinIO creates a JSON document with the event details and appends it to the index with an Elasticsearch-generated random ID. Additional updates to an object result in new index entries, and existing entries remain unmodified.

Username

Optional

MINIO_NOTIFY_ELASTICSEARCH_USERNAME

envvar

notify_elasticsearch username

mc-conf

The username for connecting to an Elasticsearch service endpoint which enforces authentication.

Password

Optional

MINIO_NOTIFY_ELASTICSEARCH_PASSWORD

envvar

notify_elasticsearch password

mc-conf

The password for connecting to an Elasticsearch service endpoint which enforces authentication.

Queue Directory

Optional

MINIO_NOTIFY_ELASTICSEARCH_QUEUE_DIR

envvar

notify_elasticsearch queue_dir

mc-conf

Specify the directory path to enable MinIO’s persistent event store for undelivered messages, such as /opt/minio/events.

MinIO stores undelivered events in the specified store while the Elasticsearch service is offline and replays the stored events when connectivity resumes.

Queue Limit

Optional

MINIO_NOTIFY_ELASTICSEARCH_QUEUE_LIMIT

envvar

notify_elasticsearch queue_limit

mc-conf

Specify the maximum limit for undelivered messages. Defaults to 100000.

Comment

Optional

MINIO_NOTIFY_ELASTICSEARCH_COMMENT

envvar

notify_elasticsearch comment

mc-conf

Specify a comment to associate with the Elasticsearch configuration.

Last modified August 2, 2026: init commit (8338d5b)

Portions of this page are adapted from the MinIO Object Storage Documentation, © 2020–Present MinIO, Inc., licensed under CC BY 4.0, converted and maintained by the Silo project. Attribution