Webhook Service Notification Settings
This page documents settings for configuring an Webhook service as a target for Bucket Notifications. See Publish Events to Webhook 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
.a configuration setting using the MinIO Console’s Administrator > Settings pages.
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.
Important
Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.
Multiple Webhook Service Targets
You can specify multiple Webhook service endpoints by appending a unique identifier _ID
for each set of related Webhook settings on to the top level key.
For example, the following commands set two distinct Webhook service endpoints as PRIMARY
and SECONDARY
respectively:
set MINIO_NOTIFY_WEBHOOK_ENABLE_PRIMARY="on"
set MINIO_NOTIFY_WEBHOOK_ENDPOINT_PRIMARY="https://webhook1.example.net"
set MINIO_NOTIFY_WEBHOOK_ENABLE_SECONDARY="on"
set MINIO_NOTIFY_WEBHOOK_ENDPOINT_SECONDARY="https://webhook1.example.net"
mc admin config set notify_webhook:primary \
endpoint="https://webhook1.example.net"
[ARGUMENT=VALUE ...]
mc admin config set notify_webhook:secondary \
endpoint="https://webhook2.example.net
[ARGUMENT=VALUE ...]
Settings
Enable
Required
Specify on
to enable publishing bucket notifications to a Webhook service endpoint.
Defaults to off
.
The top-level configuration key for defining an Webhook service endpoint for use with MinIO bucket notifications.
Use mc admin config set
to set or update an Webhook service endpoint.
The endpoint
argument is required for each target.
Specify additional optional arguments as a whitespace (" "
)-delimited list.
mc admin config set notify_webhook \
endpoint="https://webhook.example.net"
[ARGUMENT="VALUE"] ... \
Endpoint
Required
Specify the URL for the webhook service.
Changed in version RELEASE.2023-05-27T05-56-19Z: MinIO checks the health of the specified URL (if it is resolvable and reachable) prior to adding the target. MinIO no longer blocks adding new notification targets if existing targets are offline.
Auth Token
Required
An authentication token of the appropriate type for the endpoint. Omit for endpoints which do not require authentication.
To allow for a variety of token types, MinIO creates the request authentication header using the value exactly as specified. Depending on the endpoint, you may need to include additional information.
For example, for a Bearer token, prepend Bearer
:
set MINIO_NOTIFY_WEBHOOK_AUTH_TOKEN_myendpoint="Bearer 1a2b3c4f5e"
Modify the value according to the endpoint requirements. A custom authentication format could resemble the following:
set MINIO_NOTIFY_WEBHOOK_AUTH_TOKEN_xyz="ServiceXYZ 1a2b3c4f5e"
Consult the documentation for the desired service for more details.
- notify_webhook auth_token
An authentication token of the appropriate type for the endpoint. Omit for endpoints which do not require authentication.
To allow for a variety of token types, MinIO creates the request authentication header using the value exactly as specified. Depending on the endpoint, you may need to include additional information.
For example, for a Bearer token, prepend
Bearer
:mc admin config set myminio notify_webhook \ endpoint="https://webhook-1.example.net" \ auth_token="Bearer 1a2b3c4f5e"
Modify the value according to the endpoint requirements. A custom authentication format could resemble the following:
mc admin config set myminio notify_webhook \ endpoint="https://webhook-1.example.net" \ auth_token="ServiceXYZ 1a2b3c4f5e"
Consult the documentation for the desired service for more details.
Changed in version RELEASE.2023-06-23T20-26-00Z.
MinIO redacts this value when returned as part of
mc admin config get
.
Queue Directory
Optional
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 webhook service is offline and replays the stored events when connectivity resumes.
Queue Limit
Optional
Specify the maximum limit for undelivered messages.
Defaults to 100000
.
Client Certificate
Optional
Specify the path to the client certificate to use for performing mTLS authentication to the webhook service.
Client Key
Optional
Specify the path to the client private key to use for performing mTLS authentication to the webhook service.
MaxRetry
Optional
Maximum number of attempts to retry an event send.
By default, the max number of retries is set to 0
.
RetryInterval
Optional
Length of time to wait between retry attempts.
The default value is 3s
.
Comment
Optional
Specify a comment to associate with the Webhook configuration.