release 1.6.0: mail monitoring (firefly + pixel/TSA)

This commit is contained in:
Hernâni Marques 2026-07-18 23:58:53 +02:00
parent a63db6c8d3
commit b2aef8aad7
No known key found for this signature in database
12 changed files with 415 additions and 8 deletions

View file

@ -127,6 +127,8 @@ Units:
| `taler-monitoring-surface.service` | → `/taler-monitoring-surface*` (taler only) |
| `taler-monitoring-mattermost.timer` | every **1h** |
| `taler-monitoring-mattermost.service` | → `/taler-monitoring-mattermost*` (mattermost.taler.net) |
| `taler-monitoring-mail.timer` | every **4h** |
| `taler-monitoring-mail.service` | → `/taler-monitoring-mail*` (firefly + pixel MX/SMTP/IMAP) |
| `taler-monitoring-aptdeploy.timer` | every **4h** |
| `taler-monitoring-aptdeploy.service` | → `/taler-monitoring-aptdeploy*` (taler only) |

View file

@ -64,6 +64,8 @@ install_local() {
install -m 644 "$ROOT/taler-monitoring-aptdeploy.timer" "$home_unit/"
install -m 644 "$ROOT/taler-monitoring-mattermost.service" "$home_unit/"
install -m 644 "$ROOT/taler-monitoring-mattermost.timer" "$home_unit/"
install -m 644 "$ROOT/taler-monitoring-mail.service" "$home_unit/"
install -m 644 "$ROOT/taler-monitoring-mail.timer" "$home_unit/"
systemctl --user daemon-reload
systemctl --user enable --now taler-monitoring-hacktivism.path
@ -71,12 +73,14 @@ install_local() {
systemctl --user enable --now taler-monitoring-surface.timer
systemctl --user enable --now taler-monitoring-aptdeploy.timer
systemctl --user enable --now taler-monitoring-mattermost.timer
systemctl --user enable --now taler-monitoring-mail.timer
# initial stamp so path exists
"$ROOT/touch-software-stamp.sh"
systemctl --user start taler-monitoring-hacktivism.service || true
systemctl --user start taler-monitoring-surface.service || true
systemctl --user start taler-monitoring-aptdeploy.service || true
systemctl --user start taler-monitoring-mattermost.service || true
systemctl --user start taler-monitoring-mail.service || true
echo "--- status ---"
systemctl --user status taler-monitoring-hacktivism.path --no-pager -l | head -15
@ -84,13 +88,15 @@ install_local() {
systemctl --user status taler-monitoring-surface.timer --no-pager -l | head -12
systemctl --user status taler-monitoring-aptdeploy.timer --no-pager -l | head -12
systemctl --user status taler-monitoring-mattermost.timer --no-pager -l | head -12
systemctl --user status taler-monitoring-mail.timer --no-pager -l | head -12
systemctl --user list-timers --all | grep taler-monitoring || true
echo "OK host-agent (hacktivism 4h + surface 1h + aptdeploy 4h + mattermost 1h)"
echo "OK host-agent (hacktivism 4h + surface 1h + aptdeploy 4h + mattermost 1h + mail 4h)"
echo "suite: $mon"
echo "manual: systemctl --user start taler-monitoring-hacktivism.service"
echo "manual surface: systemctl --user start taler-monitoring-surface.service"
echo "manual aptdeploy: systemctl --user start taler-monitoring-aptdeploy.service"
echo "manual mattermost: systemctl --user start taler-monitoring-mattermost.service"
echo "manual mail: systemctl --user start taler-monitoring-mail.service"
echo "after upgrades: $ROOT/touch-software-stamp.sh"
}

View file

@ -0,0 +1,32 @@
#!/usr/bin/env bash
# run-mail-monitoring.sh — mail MX/SMTP/IMAP (firefly + pixel, …) → public HTML
# Public only on taler.hacktivism.ch:
# https://taler.hacktivism.ch/taler-monitoring-mail/
# https://taler.hacktivism.ch/taler-monitoring-mail_err/
#
set -uo pipefail
AGENT_DIR=$(cd "$(dirname "$0")" && pwd)
export AGENT_LABEL="${AGENT_LABEL:-mail-host-agent}"
export STATE_NAME="${STATE_NAME:-taler-mail-monitoring}"
export TALER_DOMAIN="${TALER_DOMAIN:-hacktivism.ch}"
export INSIDE_PODMAN=0
export LOCAL_STACK=0
export SKIP_SSH=1
export INSIDE_MODE="${INSIDE_MODE:-none}"
export CONTINUE_ON_ERROR="${CONTINUE_ON_ERROR:-1}"
export RUN_TIMEOUT="${RUN_TIMEOUT:-600}"
export PHASES="${PHASES:-mail monpages}"
export MON_HOSTS="${MON_HOSTS:-taler.hacktivism.ch}"
export HTML_OUT="${HTML_OUT:-$HOME/monitoring-sites-staging}"
export DEPLOY_WWW_ROOT="${DEPLOY_WWW_ROOT:-/var/www/monitoring-sites}"
export HTML_OK_DIR="taler-monitoring-mail"
export HTML_ERR_DIR="taler-monitoring-mail_err"
export HTML_URL_OK="/taler-monitoring-mail/"
export HTML_URL_ERR="/taler-monitoring-mail_err/"
export PAGE_LABEL="taler-monitoring-mail"
export APT_DEPLOY_ENSURE=0
exec bash "$AGENT_DIR/run-host-report.sh" "$@"

View file

@ -0,0 +1,18 @@
[Unit]
Description=Taler monitoring mail (firefly/pixel MX SMTP IMAP)
Documentation=file:%h/src/taler-monitoring/host-agent/README.md
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
Environment=PATH=%h/.local/bin:/usr/local/bin:/usr/bin:/bin
Environment=CONTINUE_ON_ERROR=1
Environment=RUN_TIMEOUT=600
WorkingDirectory=%h/src/taler-monitoring
ExecStart=%h/src/taler-monitoring/host-agent/run-mail-monitoring.sh
Nice=10
TimeoutStartSec=20min
[Install]
WantedBy=default.target

View file

@ -0,0 +1,14 @@
[Unit]
Description=Periodic taler-monitoring mail (MX/SMTP/IMAP)
Documentation=file:%h/src/taler-monitoring/host-agent/README.md
[Timer]
OnBootSec=30min
OnUnitActiveSec=4h
AccuracySec=5min
Persistent=true
RandomizedDelaySec=10min
Unit=taler-monitoring-mail.service
[Install]
WantedBy=timers.target