1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-03 17:36:05 +00:00

feat(instances): alert when a fault stops or pauses a VM

The VM page shows why a VM paused or stopped when nobody asked (a disk
error, a crash, a kernel panic: instances.states.REASONS), but nobody
learnt of it until they opened the page. While an alert channel is set,
the worker reads every host's VM states each minute (one call a host,
all hosts at once, 10 s at most) and queues one alert per fault; the VM
keeps the fault it was alerted for, so a fault is told once and again
only after the VM recovered.
This commit is contained in:
catborise 2026-11-25 09:30:44 +03:00
parent c5a04e040d
commit de9f37a20d
12 changed files with 143 additions and 7 deletions

View file

@ -1,7 +1,8 @@
"""Notices for the operator: a backup that failed, was not taken, is missing or damaged, and a job that ended
uncertain. alert() queues one in the caller's transaction, so a failed send never holds up the change it tells
of; send(), a periodic task of the worker, mails it to the Settings page's alert addresses and POSTs it as JSON
to its alert webhook, trying again at the next passes."""
"""Notices for the operator: a backup that failed, was not taken, is missing or damaged, a job that ended
uncertain, and a VM a fault stopped or paused (instances.jobs.watch_faults). alert() queues one in the
caller's transaction, so a failed send never holds up the change it tells of; send(), a periodic task of the
worker, mails it to the Settings page's alert addresses and POSTs it as JSON to its alert webhook, trying again
at the next passes."""
import json
import logging