Notifications Configuration
SolidPing supports multiple notification channels to alert you when incidents occur.
Supported Channels
| Channel | Status | Configuration |
|---|---|---|
| Slack | Available | OAuth integration |
| Discord | Available | Webhook |
| Available | SMTP | |
| Webhooks | Available | HTTP POST |
Email (SMTP)
Configure email notifications via SMTP.
Environment Variables
SP_EMAIL_ENABLED=true
SP_EMAIL_HOST=smtp.example.com
SP_EMAIL_PORT=587
SP_EMAIL_USERNAME=noreply@example.com
SP_EMAIL_PASSWORD=your-smtp-password
SP_EMAIL_FROM=noreply@example.com
SP_EMAIL_FROMNAME=SolidPing
SP_EMAIL_AUTHTYPE=login
SP_EMAIL_INSECURESKIPVERIFY=false
Configuration File
email:
enabled: true
host: smtp.example.com
port: 587
username: noreply@example.com
password: your-smtp-password
from: noreply@example.com
from_name: SolidPing
auth_type: login
insecure_skip_verify: false
Auth Types
| Type | Description |
|---|---|
plain | PLAIN authentication |
login | LOGIN authentication (default) |
cram-md5 | CRAM-MD5 authentication |
Provider Examples
Gmail
SP_EMAIL_HOST=smtp.gmail.com
SP_EMAIL_PORT=587
SP_EMAIL_USERNAME=your-email@gmail.com
SP_EMAIL_PASSWORD=your-app-password # Use App Password, not your account password
SP_EMAIL_AUTHTYPE=login
Gmail App Password
Gmail requires an App Password when 2FA is enabled. Generate one at https://myaccount.google.com/apppasswords
SendGrid
SP_EMAIL_HOST=smtp.sendgrid.net
SP_EMAIL_PORT=587
SP_EMAIL_USERNAME=apikey
SP_EMAIL_PASSWORD=your-sendgrid-api-key
SP_EMAIL_AUTHTYPE=login
Amazon SES
SP_EMAIL_HOST=email-smtp.us-east-1.amazonaws.com
SP_EMAIL_PORT=587
SP_EMAIL_USERNAME=your-ses-smtp-username
SP_EMAIL_PASSWORD=your-ses-smtp-password
SP_EMAIL_AUTHTYPE=login
Mailgun
SP_EMAIL_HOST=smtp.mailgun.org
SP_EMAIL_PORT=587
SP_EMAIL_USERNAME=postmaster@your-domain.mailgun.org
SP_EMAIL_PASSWORD=your-mailgun-smtp-password
SP_EMAIL_AUTHTYPE=login
Slack
Slack integration uses OAuth for secure access.
Environment Variables
SP_SLACK_APP_ID=A0XXXXXXXXX
SP_SLACK_CLIENT_ID=1234567890.1234567890123
SP_SLACK_CLIENT_SECRET=your-client-secret
SP_SLACK_SIGNING_SECRET=your-signing-secret
Configuration File
slack:
app_id: A0XXXXXXXXX
client_id: "1234567890.1234567890123"
client_secret: your-client-secret
signing_secret: your-signing-secret
Setting Up a Slack App
- Go to https://api.slack.com/apps
- Click "Create New App" → "From scratch"
- Name it "SolidPing" and select your workspace
- Go to "OAuth & Permissions" and add scopes:
chat:writechat:write.publicchannels:read
- Go to "Basic Information" to get your credentials
- Install the app to your workspace
Notification Format
Slack notifications include:
- Service name and URL
- Status change (Up → Down, Down → Up)
- Error details (for failures)
- Direct link to the check in SolidPing
Discord
Discord notifications use webhooks.
Setting Up Discord Webhooks
- In your Discord server, go to Server Settings → Integrations
- Click "Webhooks" → "New Webhook"
- Name it "SolidPing" and select the channel
- Copy the Webhook URL
- Add the webhook URL in SolidPing's integration settings
Webhook URL Format
https://discord.com/api/webhooks/{webhook.id}/{webhook.token}
Webhooks
Generic webhooks send HTTP POST requests to any URL.
Payload Format
{
"event": "incident.created",
"timestamp": "2024-01-15T10:30:00Z",
"check": {
"uid": "550e8400-e29b-41d4-a716-446655440000",
"name": "API Health Check",
"url": "https://api.example.com/health"
},
"incident": {
"uid": "550e8400-e29b-41d4-a716-446655440001",
"status": "active",
"started_at": "2024-01-15T10:30:00Z"
},
"result": {
"status": "down",
"duration_ms": 5000,
"error": "Connection timeout"
}
}
Event Types
| Event | Description |
|---|---|
incident.created | New incident (check started failing) |
incident.escalated | Incident reached escalation threshold |
incident.resolved | Incident resolved (check recovered) |
Webhook Configuration
In the SolidPing dashboard:
- Go to Settings → Integrations
- Add a new Webhook connection
- Configure:
- URL: Your webhook endpoint
- Method: POST (default)
- Headers: Custom headers (e.g., Authorization)
- Secret: HMAC secret for signature verification
Signature Verification
Webhooks include an X-Signature-256 header containing an HMAC-SHA256 signature:
import hmac
import hashlib
def verify_webhook(payload, signature, secret):
expected = hmac.new(
secret.encode(),
payload.encode(),
hashlib.sha256
).hexdigest()
return hmac.compare_digest(f"sha256={expected}", signature)
Incident Thresholds
Configure when notifications are sent per check:
| Setting | Default | Description |
|---|---|---|
incident_threshold | 1 | Failures before creating incident |
escalation_threshold | 3 | Failures before escalation |
recovery_threshold | 1 | Successes before resolving |
Example
incident_threshold: 2 # Notify after 2 consecutive failures
escalation_threshold: 5 # Escalate after 5 consecutive failures
recovery_threshold: 2 # Resolve after 2 consecutive successes
Testing Notifications
Test your notification setup:
- Create a check for a known-failing endpoint
- Wait for the incident to trigger
- Verify notifications are received
- Fix the endpoint and verify resolution notification
Or use the API:
# Send test notification (requires auth)
curl -X POST http://localhost:4000/api/v1/orgs/default/connections/{uid}/test \
-H "Authorization: Bearer $TOKEN"