Here is an example of a notification config to send backups events to the custom webhook API.
notifications:
webhooks:
- webhook_url: "https://nxs-alert.nixys.io/v2/alert/pool"
enabled: true
message_level: "info"
extra_headers:
"X-Auth-Key": "07B2vx0l79AmPBB0OwQnqDBRIs8xL8JO1sADUE84zpWoJezlE9"
payload_message_key: "triggerMessage"
extra_payload:
"isEmergencyAlert": false
"rawTriggerMessage": false
`webhooks` reference for nxs-backup.conf:
webhooks: list
# Enables this notification channel
- enabled: bool # Default: true
# URL where the webhook request will be sent. POST method is used to send webhooks. When sending a POST request, the body is json.
webhook_url: string # Required
# The json key is defined, which will contain the event message.
payload_message_key: string # Required
# Here you can define additional json key/value pairs to customize your request body. For example, to set style.
extra_payload: map # Optional
# Here you can define additional json key/value pairs to customize your request headers, if it is required. For example, to auth your request.
extra_headers: map # Optional
# Allows you to send a request to a server with a self-signed certificate.
insecure_tls: bool # Default: false
# Here it defines the minimum level of events to be sent to the webhook. Each event in the log has a certain level: "error", "warning", "info", "debug".
message_level: string # Default: warning