P42-S.M.: Server-Monitoring-Agent als Docker-Container

Misst CPU, RAM, Swap, Platten, Netzwerk, Temperaturen und Prozesse des
Hosts und liefert sie als JSON-API (/api/metrics, /api/history) für das
P42-Dashboard. Nur Python-Standardbibliothek, Token-geschützt,
Container ohne Root und mit schreibgeschütztem Dateisystem.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
guyg1474andClaude Opus 5.5 committed 2026-10-14 15:15:01 +02:00
commit c6eef176a2
11 files changed
+727

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import logging
import signal
import sys
from .server import serve
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s", datefmt="%Y-%m-%d %H:%M:%S")
# "docker stop" sendet SIGTERM – sofort sauber beenden statt 10 s auf SIGKILL zu warten
signal.signal(signal.SIGTERM, lambda *_: sys.exit(0))
try:
serve()
except KeyboardInterrupt:
pass