From 2c1a1cdbdd4e7d83ef2e34f19301b493ac1c971f Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 18 May 2026 20:58:15 +0000 Subject: [PATCH] =?UTF-8?q?docs:=20add=20section-by-section=20comments=20?= =?UTF-8?q?=E2=80=94=20=5F=5Finit=5F=5F.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ns8_backup_monitor/__init__.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/ns8_backup_monitor/__init__.py b/ns8_backup_monitor/__init__.py index bca09b0..9815644 100644 --- a/ns8_backup_monitor/__init__.py +++ b/ns8_backup_monitor/__init__.py @@ -1,2 +1,23 @@ -# ns8-backup-monitor package +"""ns8-backup-monitor — NethServer 8 backup failure notification service. + +This package receives Alertmanager webhook alerts for backup failures, +correlates per-module status data stored in the NS8 cluster Redis, optionally +verifies repository health via restic, and sends a detailed email notification +through the NS8 mail relay (ns8-sendmail / runagent). + +Public API +---------- +The package is executed as a module: + python3 -m ns8_backup_monitor [--config PATH] + +Submodules +---------- +receiver HTTP webhook server; entry point for Alertmanager payloads. +correlator Reads Redis state and classifies the backup outcome. +repo_check Probes restic repositories for reachability and integrity. +notifier Builds HTML/text emails and dispatches them via ns8-sendmail. +utils Configuration loader and logging setup shared by all modules. +""" + +# Package version — updated on every release. __version__ = "0.1.0"