Add a new TLS monitor type that allows monitoring mTLS endpoints to verify
they properly reject connections without client certificates.
Features:
- New TLS monitor type with hostname and port configuration
- Expected TLS Alert dropdown to specify which TLS alert to expect
- Support for certificate_required (116) alert for mTLS verification
- Optional certificate expiry monitoring when connection succeeds
- Ignore TLS errors option
Closes#5837
Implement notification system that works even when database is unavailable.
Problem:
- When Uptime Kuma's database (external MariaDB/SQLite) becomes unavailable,
UK stops functioning and cannot send notifications about its own failure.
- Users are not alerted when UK itself is having database connectivity issues.
Solution:
- Added notification cache system that stores all active notification configs
in memory when database is available
- Implemented database error detection in both monitor.js and server.js
error handlers to catch EHOSTUNREACH, ECONNREFUSED, and other DB errors
- Added sendDatabaseDownNotification() method that uses cached notifications
to send alerts when database connection fails
- Cache automatically refreshes periodically (every 30 minutes) and when
notifications are added/updated/deleted
- Prevents duplicate notifications for the same database down event
Changes:
- server/notification.js: Added cache system and database down notification
- server/server.js: Enhanced error handler to detect DB errors and trigger
notifications, refresh cache on startup
- server/model/monitor.js: Added DB error detection in safeBeat error handler
- server/jobs.js: Added periodic cache refresh job (every 30 minutes)
- test/backend-test/test-database-down-notification.js: Comprehensive test
suite covering cache, notifications, error handling
This ensures users are always notified when UK itself is having database
connectivity issues, even if the database is completely unavailable.
This adds a new monitor type to check local services by executing a shell command. It also includes fixes for Prometheus errors when adding new tags and for the UI not updating when tags are changed.
Co-authored-by: Your Name <you@example.com>
Co-authored-by: Frank Elsinga <frank@elsinga.de>
Co-authored-by: Louis Lam <louislam@users.noreply.github.com>
Co-authored-by: Jacques ROUSSEL <jacques.roussel@rouaje.com>
Co-authored-by: rouja <jacques0roussel@gmail.com>
Co-authored-by: Nelson Chan <3271800+chakflying@users.noreply.github.com>
Co-authored-by: Louis Lam <louislam@users.noreply.github.com>
Co-authored-by: Frank Elsinga <frank@elsinga.de>