Add notification and alerting system for Service Mode theme #34
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
Pending
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Public/ditdashdot!34
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "copilot/add-notification-alert-system"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Overview
This PR implements a comprehensive notification and alerting system for DitDashDot that monitors service health and sends real-time webhook notifications when services go down or recover. The feature integrates exclusively with the Service Mode theme, providing homelab administrators with proactive monitoring capabilities.
Features
Alert Management
User Interface
Added a new Alerts tab to the configuration page (
/config) with:Technical Implementation
Backend Changes (
server/index.js)/api/pingendpoint to track service downtime and trigger notifications (+244 lines)handleServiceStatusChange()to detect status transitionssendWebhookNotification()andsendRecoveryNotification()helper functionsGET /api/alerts/history- Fetch alert historyDELETE /api/alerts/history- Clear alert historyPOST /api/alerts/test- Send test notification/api/settingsendpoint to support alert configurationFrontend Changes (
src/components/config/ConfigurationPage.js)Database Changes (
migrations/005_add_alerts.sql)dashboard_configtable with 4 new columns:alerts_enabled: Master switch for alertsalerts_paused: Temporary pause togglewebhook_url: Notification destinationalert_threshold_seconds: Time before alertingalert_historytable to track service status changesrun_005_migration.sh)Webhook Payload Format
Notifications are sent as JSON POST requests:
Service Down:
Service Recovery:
Documentation
This PR includes comprehensive documentation:
Setup Instructions
Apply the database migration:
Configure alerts:
/config→ Alerts tabEnable Service Mode theme:
Testing
All changes have been manually tested:
Performance Impact
Compatibility
Security Considerations
Closes #[issue_number]
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Discard
Pull request closed