Skip to main content

Notifications

Configure email notifications for node downtime, backup events, storage issues, and disk space warnings.

Notification Events​

EventDescriptionWhen it fires
Node DowntimeA node is unreachable or has stoppedNode health check fails
Node RecoveryA previously-down node is back onlineNode health check passes after downtime
Backup SuccessA scheduled backup completedAfter each successful backup
Backup FailureA scheduled backup failedWhen a backup errors out
S3 Connection IssueCannot reach the backup S3 endpointDuring backup target connectivity check
Disk Space WarningDisk usage exceeds thresholdWhen disk usage crosses the warning threshold

Supported Providers​

ProviderTypeEditionConfiguration
SMTPEmailCommunity + ProSMTP server, credentials, recipients
WebhookHTTP POSTPro onlyURL, format (Generic/Slack/Discord), HMAC secret
Pro Feature

Webhook notifications (Slack, Discord, generic HTTP) require ChainLaunch Pro. The SMTP provider is available in both editions.

Set Up Email Notifications​

Step 1: Create an SMTP Provider​

Via API​

curl -X POST http://localhost:8100/api/v1/notifications/providers \
-H "Content-Type: application/json" \
-d '{
"type": "SMTP",
"name": "Company Email",
"config": {
"host": "smtp.gmail.com",
"port": 587,
"username": "chainlaunch-alerts@yourcompany.com",
"password": "app-password-here",
"from": "chainlaunch-alerts@yourcompany.com",
"tls": true,
"recipients": [
"ops-team@yourcompany.com",
"devops-lead@yourcompany.com"
]
},
"isDefault": true,
"notifyNodeDowntime": true,
"notifyBackupSuccess": false,
"notifyBackupFailure": true,
"notifyS3ConnIssue": true,
"notifyDiskSpaceWarning": true
}'

Via Terraform​

resource "chainlaunch_notification_provider" "email" {
type = "SMTP"
name = "Company Email"
is_default = true

smtp_config = {
host = "smtp.gmail.com"
port = 587
username = "chainlaunch-alerts@yourcompany.com"
password = var.smtp_password
from = "chainlaunch-alerts@yourcompany.com"
tls = true
recipients = ["ops-team@yourcompany.com"]
}

notify_node_downtime = true
notify_backup_success = false
notify_backup_failure = true
notify_s3_conn_issue = true
notify_disk_space_warning = true
}

Step 2: Test the Provider​

Send a test email to verify your SMTP configuration:

curl -X POST http://localhost:8100/api/v1/notifications/providers/1/test \
-H "Content-Type: application/json" \
-d '{
"testEmail": "your-email@yourcompany.com"
}'

Response:

{
"status": "success",
"message": "Test email sent successfully",
"testedAt": "2026-03-24T10:30:00Z"
}

SMTP Configuration Reference​

FieldRequiredDescriptionExample
hostYesSMTP server hostnamesmtp.gmail.com
portYesSMTP port (25, 465, 587)587
usernameYesSMTP login usernamealerts@company.com
passwordYesSMTP login password or app passwordxxxx-xxxx-xxxx
fromYesSender email addresschainlaunch@company.com
tlsNoEnable TLS encryptiontrue
recipientsNoList of recipient emails. If empty, sends to from address["ops@company.com"]

Common SMTP Providers​

ProviderHostPortTLSNotes
Gmailsmtp.gmail.com587YesRequires app password
Outlook/O365smtp.office365.com587Yes
Amazon SESemail-smtp.us-east-1.amazonaws.com587YesRequires SES credentials
SendGridsmtp.sendgrid.net587YesUse API key as password
Mailgunsmtp.mailgun.org587Yes
Self-hostedmail.yourcompany.com25/587Optional

Manage Notification Preferences​

Update Which Events Trigger Notifications​

curl -X PUT http://localhost:8100/api/v1/notifications/providers/1 \
-H "Content-Type: application/json" \
-d '{
"type": "SMTP",
"name": "Company Email",
"config": { ... },
"isDefault": true,
"notifyNodeDowntime": true,
"notifyBackupSuccess": true,
"notifyBackupFailure": true,
"notifyS3ConnIssue": true,
"notifyDiskSpaceWarning": true
}'

List Providers​

curl http://localhost:8100/api/v1/notifications/providers | jq

Delete a Provider​

curl -X DELETE http://localhost:8100/api/v1/notifications/providers/1

Email Content​

Each notification type sends a formatted email with relevant details:

Node Downtime​

Subject: [ChainLaunch] Node Down: peer0-org1

Node peer0-org1 (FABRIC_PEER) is unreachable.
Down since: 2026-03-24T10:15:00Z
Duration: 5 minutes
Error: connection refused

Dashboard: http://localhost:8100/nodes/1

Backup Failure​

Subject: [ChainLaunch] Backup Failed: daily-s3-backup

Backup for schedule "daily-s3-backup" failed.
Target: production-s3 (S3)
Error: AccessDenied: bucket not accessible
Started: 2026-03-24T02:00:00Z
Duration: 12 seconds

Disk Space Warning​

Subject: [ChainLaunch] Disk Space Warning

Disk usage on /var/lib/chainlaunch has reached 85%.
Used: 170 GB / 200 GB
Available: 30 GB
Threshold: 80%

Webhook Notifications (Pro)​

ChainLaunch Pro supports webhook notifications with three formats:

Generic Webhook​

curl -X POST http://localhost:8100/api/v1/notifications/providers \
-H "Content-Type: application/json" \
-d '{
"type": "WEBHOOK",
"name": "PagerDuty Webhook",
"config": {
"url": "https://events.pagerduty.com/v2/enqueue",
"format": "GENERIC",
"secret": "hmac-signing-secret",
"timeout": 30,
"customHeaders": {
"X-Custom-Header": "value"
}
},
"isDefault": false,
"notifyNodeDowntime": true,
"notifyBackupFailure": true
}'

Slack Webhook​

curl -X POST http://localhost:8100/api/v1/notifications/providers \
-H "Content-Type: application/json" \
-d '{
"type": "WEBHOOK",
"name": "Ops Slack Channel",
"config": {
"url": "https://hooks.slack.com/services/T00/B00/xxx",
"format": "SLACK"
},
"isDefault": false,
"notifyNodeDowntime": true,
"notifyBackupFailure": true,
"notifyBackupSuccess": true
}'

Discord Webhook​

curl -X POST http://localhost:8100/api/v1/notifications/providers \
-H "Content-Type: application/json" \
-d '{
"type": "WEBHOOK",
"name": "Alerts Discord",
"config": {
"url": "https://discord.com/api/webhooks/xxx/yyy",
"format": "DISCORD"
},
"isDefault": false,
"notifyNodeDowntime": true
}'

Webhook Payload Format (Generic)​

Generic webhooks receive a JSON payload:

{
"eventId": "evt_abc123",
"eventType": "NODE_DOWNTIME",
"severity": "CRITICAL",
"timestamp": "2026-03-24T10:15:00Z",
"source": {
"nodeId": "1",
"instanceId": "cl-prod-01",
"version": "0.5.0"
},
"data": {
"nodeName": "peer0-org1",
"nodeType": "FABRIC_PEER",
"downSince": "2026-03-24T10:10:00Z",
"error": "connection refused"
}
}

When a secret is configured, the payload is signed with HMAC-SHA256. Verify the signature in the X-Signature-256 header.

Troubleshooting​

"Test email failed"​

  • Verify SMTP host and port are correct
  • Check username/password (Gmail requires app passwords, not account passwords)
  • Ensure TLS setting matches the port (587 = STARTTLS, 465 = implicit TLS)
  • Check firewall allows outbound SMTP traffic

Not receiving notifications​

  • Verify the provider has the specific event types enabled (notifyNodeDowntime, etc.)
  • Check the provider's lastTestStatus field
  • Look at ChainLaunch logs for SMTP errors
  • Check spam/junk folder

Next Steps​