mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-03 17:36:05 +00:00
feat(alerts): mail and webhook alerts, and /healthz for a monitor
A failed backup, a scheduled backup not taken, backups the daily check finds missing and a job that ends uncertain could only be seen on the pages. They are now queued as alerts in the transaction of the change they tell of (never stopping it) and sent by the worker's periodic pass to the Settings page's alert e-mail addresses (the server's SMTP settings) and alert webhook (a JSON POST), each tried again for ten passes on its own. A skip for a host in maintenance is no alert. Setting values take 255 characters. /healthz answers 200 while the database answers and the job worker runs, 503 otherwise, without a login.
This commit is contained in:
parent
2cf7dbe577
commit
dcd7e32df7
21 changed files with 695 additions and 74 deletions
|
|
@ -8,6 +8,6 @@ class AppSettings(models.Model):
|
|||
|
||||
name = models.CharField(_("name"), max_length=25, null=False)
|
||||
key = models.CharField(_("key"), db_index=True, max_length=50, unique=True)
|
||||
value = models.CharField(_("value"), max_length=25)
|
||||
value = models.CharField(_("value"), max_length=255)
|
||||
choices = models.CharField(_("choices"), max_length=70)
|
||||
description = models.CharField(_("description"), max_length=100, null=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue