KubeStellar Console supports sending alert notifications through multiple channels including Slack and Email. This guide explains how to configure these notification channels.
- Overview
- Configuring Slack Notifications
- Configuring Email Notifications
- Setting Up Alert Rules with Notifications
- Testing Notifications
- Troubleshooting
The KubeStellar Console alert notification system allows you to:
- Send alerts to Slack via webhook integration
- Send alerts via Email using SMTP
- Configure multiple notification channels per alert rule
- Route alerts based on severity (critical, warning, info)
- Test notification configurations before deployment
- Go to your Slack workspace settings
- Navigate to Apps > Incoming Webhooks
- Click Add New Webhook to Workspace
- Select the channel where you want to receive alerts
- Copy the webhook URL (e.g.,
https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXX)
- Navigate to Settings > Alert Notifications
- In the Slack Integration section:
- Paste your webhook URL
- (Optional) Override the default channel with
#alertsor another channel
- Click Test Slack Notification to verify the configuration
Alerts sent to Slack include:
- Alert severity (with color coding)
- Alert rule name
- Alert message
- Cluster, namespace, and resource information
- Timestamp
Example Slack message:
🚨 Critical Alert
GPU Usage Critical
GPU usage is 95.2% (38/40 GPUs allocated)
Severity: critical
Status: firing
Cluster: prod-cluster
Threshold: 90%
You'll need:
- SMTP host (e.g.,
smtp.gmail.comfor Gmail) - SMTP port (usually
587for TLS or465for SSL) - Email username (for authentication)
- Email password or app-specific password
- From address (sender email)
- To address(es) (comma-separated list of recipients)
- Navigate to Settings > Alert Notifications
- In the Email Integration section:
- Enter SMTP host and port
- Enter from address
- Enter to address(es) (comma-separated for multiple recipients)
- Enter SMTP username and password
- Click Test Email Notification to verify the configuration
Alert emails are sent as HTML with:
- Color-coded severity headers
- Alert rule name and message
- Detailed alert information (cluster, namespace, resource)
- Timestamp
- Alert ID for tracking
SMTP Host: smtp.gmail.com
SMTP Port: 587
Username: your-email@gmail.com
Password: [App-specific password]
Note: For Gmail, you must use an app-specific password.
SMTP Host: smtp.office365.com
SMTP Port: 587
Username: your-email@company.com
Password: [Your password]
SMTP Host: smtp.sendgrid.net
SMTP Port: 587
Username: apikey
Password: [Your SendGrid API key]
- Navigate to the Alerts page
- Click Create Alert Rule or edit an existing rule
- Configure the alert condition (e.g., GPU usage > 90%)
- In the Notification Channels section:
- Click + Slack to add a Slack channel
- Enter the Slack webhook URL (inline configuration)
- Alternatively, click + Email for email notifications
- Enter email configuration details
- Enable/disable channels with the toggle switch
- Save the alert rule
{
name: "High GPU Usage Alert",
severity: "critical",
condition: {
type: "gpu_usage",
threshold: 90
},
channels: [
{
type: "slack",
enabled: true,
config: {
slackWebhookUrl: "https://hooks.slack.com/services/...",
slackChannel: "#alerts"
}
},
{
type: "email",
enabled: true,
config: {
emailSMTPHost: "smtp.gmail.com",
emailSMTPPort: 587,
emailFrom: "alerts@example.com",
emailTo: "team@example.com,oncall@example.com",
emailUsername: "alerts@example.com",
emailPassword: "app-specific-password"
}
}
]
}- Go to Settings > Alert Notifications
- Configure a notification channel (Slack or Email)
- Click the Test button for that channel
- Check your Slack channel or email inbox for the test notification
When you create or edit an alert rule:
- Save the alert rule with notification channels configured
- The alert system will automatically send notifications when conditions are met
- Use the demo mode or manually trigger conditions to test alerts
Problem: Test notification fails or alerts don't appear in Slack
Solutions:
- Verify the webhook URL is correct and hasn't been revoked
- Check that the webhook has permission to post to the selected channel
- Ensure the webhook URL starts with
https://hooks.slack.com/services/ - Try creating a new webhook in Slack
Problem: Test email fails or emails aren't received
Solutions:
- Gmail: Make sure you're using an app-specific password, not your regular password
- Port Issues: Try port 465 if 587 doesn't work
- Firewall: Ensure the KubeStellar Console can connect to the SMTP server
- Authentication: Verify username and password are correct
- Spam Filter: Check spam/junk folders
- TLS/SSL: Some SMTP servers require specific TLS/SSL configurations
Problem: Alerts are created but notifications aren't sent
Solutions:
- Check that the notification channel is enabled in the alert rule
- Verify the alert condition is actually being met
- Check browser console for errors
- Review backend logs for notification failures
- Ensure notification configuration is saved in the alert rule
Configure the Slack webhook URL in the alert rule's notification channel.
Ensure all required email fields (SMTP host, from, to) are filled in.
Check network connectivity and verify credentials are correct.
- Notification configurations are stored client-side in localStorage
- For production deployments, consider:
- Using environment variables for sensitive credentials
- Implementing server-side credential storage with encryption
- Using secret management systems (Vault, AWS Secrets Manager, etc.)
- Keep Slack webhook URLs secret
- Regenerate webhooks if they're compromised
- Use channel-specific webhooks to limit access
- Use app-specific passwords instead of main account passwords
- Consider using dedicated email accounts for alerts
- Enable 2FA on email accounts
- Test First: Always test notification channels before relying on them in production
- Multiple Channels: Configure both Slack and Email for critical alerts
- Channel Routing: Use different channels for different severity levels
- Alert Fatigue: Don't over-alert; focus on critical issues
- Documentation: Document your alert rules and notification channels for your team
- Regular Review: Periodically review and update notification configurations
The notification system exposes the following API endpoints:
POST /api/notifications/test- Test a notification configurationPOST /api/notifications/send- Send an alert notificationGET /api/notifications/config- Get notification configurationPOST /api/notifications/config- Save notification configuration
For issues or questions:
- Create an issue in the KubeStellar Console repository
- Check the KubeStellar documentation
- Review existing alert configurations and examples in the codebase