Install Raspberry Pi production monitor timer

This commit is contained in:
Курнат Андрей
2026-06-09 21:26:17 +03:00
parent ccd20d76e7
commit 4bf54f7fda
8 changed files with 213 additions and 7 deletions
@@ -0,0 +1,8 @@
[Unit]
Description=Report QSfera Raspberry Pi production check failure for %I
Documentation=file:/mnt/data/qsfera/cloud-server/src/docs/raspberry-pi-5-docker.md
[Service]
Type=oneshot
EnvironmentFile=-/etc/qsfera/rpi-production-check.env
ExecStart=/bin/sh -c 'cd "${QSFERA_SERVER_DIR:-/mnt/data/qsfera/cloud-server/src}" && exec ./scripts/alert-rpi-production-check-failure.sh "$1"' -- "%I"
@@ -0,0 +1,12 @@
[Unit]
Description=QSfera Raspberry Pi production verification
Documentation=file:/mnt/data/qsfera/cloud-server/src/docs/raspberry-pi-5-docker.md
Wants=network-online.target
After=network-online.target docker.service
Requires=docker.service
OnFailure=qsfera-rpi-production-check-alert@%n.service
[Service]
Type=oneshot
EnvironmentFile=-/etc/qsfera/rpi-production-check.env
ExecStart=/bin/sh -c 'cd "${QSFERA_SERVER_DIR:-/mnt/data/qsfera/cloud-server/src}" && exec ./scripts/verify-rpi-production.sh'
@@ -0,0 +1,13 @@
[Unit]
Description=Run QSfera Raspberry Pi production verification every five minutes
Documentation=file:/mnt/data/qsfera/cloud-server/src/docs/raspberry-pi-5-docker.md
[Timer]
OnBootSec=2min
OnUnitActiveSec=5min
AccuracySec=30s
Persistent=true
Unit=qsfera-rpi-production-check.service
[Install]
WantedBy=timers.target
@@ -0,0 +1,15 @@
QSFERA_SERVER_DIR=/mnt/data/qsfera/cloud-server/src
PUBLIC_STATUS_URL=https://qsfera.kusoft.xyz/status.php
REQUIRE_METRICS=true
METRICS_URL=http://127.0.0.1:9205/metrics
EXPECTED_IMAGE=qsfera-cloud-server:7.0.0-rpi5-stable
EXPECTED_VERSION=7.0.0
EXPECTED_EDITION=stable
EXPECTED_DOCKER_ROOT_PREFIX=/mnt/data
STRICT_DOCKER_ROOT=true
MIN_ROOT_AVAILABLE_KB=5242880
MIN_DATA_AVAILABLE_KB=20971520
QSFERA_ALERT_JOURNAL_LINES=80
# Optional off-host alert endpoint. The alert script sends a JSON POST when set.
#QSFERA_ALERT_WEBHOOK_URL=https://alerts.example.com/qsfera-rpi