2026-05-18 15:10:49 +00:00
|
|
|
# ns8-backup-monitor configuration
|
|
|
|
|
|
2026-05-18 15:29:21 +00:00
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
|
# SMTP settings
|
|
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
|
# By default (use_ns8_relay: true), ns8-backup-monitor automatically reads
|
|
|
|
|
# the SMTP relay configured in NethServer 8 from the cluster Redis state
|
|
|
|
|
# (key: cluster/mail_settings). This is the same relay used by NS8 itself
|
|
|
|
|
# for system notifications, so no manual SMTP setup is needed in most cases.
|
|
|
|
|
#
|
|
|
|
|
# The fallback chain is:
|
|
|
|
|
# 1. NS8 Redis (cluster/mail_settings) <-- default, preferred
|
|
|
|
|
# 2. smtp section below
|
|
|
|
|
# 3. localhost:25 unauthenticated
|
|
|
|
|
#
|
|
|
|
|
# To disable auto-detection and use the settings below, set:
|
|
|
|
|
# use_ns8_relay: false
|
2026-05-18 15:10:49 +00:00
|
|
|
smtp:
|
2026-05-18 15:29:21 +00:00
|
|
|
use_ns8_relay: true # set to false to force manual SMTP config below
|
|
|
|
|
|
|
|
|
|
# Manual SMTP config (used only if use_ns8_relay: false or NS8 relay not found)
|
2026-05-18 15:10:49 +00:00
|
|
|
host: localhost
|
2026-05-18 15:29:21 +00:00
|
|
|
port: 587
|
2026-05-18 15:10:49 +00:00
|
|
|
use_tls: false
|
2026-05-18 15:29:21 +00:00
|
|
|
use_starttls: true
|
2026-05-18 15:10:49 +00:00
|
|
|
username: ""
|
|
|
|
|
password: ""
|
|
|
|
|
|
2026-05-18 15:29:21 +00:00
|
|
|
# ---------------------------------------------------------------------------
|
2026-05-18 15:10:49 +00:00
|
|
|
# Notification recipients
|
2026-05-18 15:29:21 +00:00
|
|
|
# ---------------------------------------------------------------------------
|
2026-05-18 15:10:49 +00:00
|
|
|
mail:
|
2026-05-18 15:29:21 +00:00
|
|
|
# Sender address.
|
|
|
|
|
# If use_ns8_relay: true, the 'from' is read from NS8 Redis (mail_from field).
|
|
|
|
|
# You can override it here if needed.
|
2026-05-18 15:10:49 +00:00
|
|
|
from: "ns8-backup-monitor@yourdomain.com"
|
2026-05-18 15:29:21 +00:00
|
|
|
|
|
|
|
|
# List of recipients - REQUIRED, always set this
|
2026-05-18 15:10:49 +00:00
|
|
|
to:
|
|
|
|
|
- "admin@yourdomain.com"
|
2026-05-18 15:29:21 +00:00
|
|
|
|
2026-05-18 15:10:49 +00:00
|
|
|
subject_prefix: "[NS8 Backup]"
|
|
|
|
|
|
2026-05-18 15:29:21 +00:00
|
|
|
# ---------------------------------------------------------------------------
|
2026-05-18 15:10:49 +00:00
|
|
|
# Webhook receiver settings
|
2026-05-18 15:29:21 +00:00
|
|
|
# ---------------------------------------------------------------------------
|
2026-05-18 15:10:49 +00:00
|
|
|
receiver:
|
|
|
|
|
host: "127.0.0.1"
|
|
|
|
|
port: 9099
|
|
|
|
|
|
2026-05-18 15:29:21 +00:00
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
|
# Timing
|
|
|
|
|
# ---------------------------------------------------------------------------
|
2026-05-18 15:10:49 +00:00
|
|
|
correlator:
|
2026-05-18 15:29:21 +00:00
|
|
|
# Seconds to wait after alert before checking Redis status.
|
|
|
|
|
# Allows all modules to finish writing their status.
|
2026-05-18 15:10:49 +00:00
|
|
|
wait_seconds: 30
|
|
|
|
|
# Time window (seconds) to consider a backup "recent" after alert
|
|
|
|
|
recent_window: 3600
|
|
|
|
|
|
2026-05-18 15:29:21 +00:00
|
|
|
# ---------------------------------------------------------------------------
|
2026-05-18 15:10:49 +00:00
|
|
|
# Redis connection (NS8 cluster state)
|
2026-05-18 15:29:21 +00:00
|
|
|
# ---------------------------------------------------------------------------
|
2026-05-18 15:10:49 +00:00
|
|
|
redis:
|
|
|
|
|
socket: "/var/lib/nethserver/cluster/state/redis.sock"
|
|
|
|
|
# Alternatively use host/port if not using unix socket
|
|
|
|
|
# host: "127.0.0.1"
|
|
|
|
|
# port: 6379
|
|
|
|
|
|
2026-05-18 15:29:21 +00:00
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
|
# Repository check
|
|
|
|
|
# ---------------------------------------------------------------------------
|
2026-05-18 15:10:49 +00:00
|
|
|
repo_check:
|
2026-05-18 15:29:21 +00:00
|
|
|
# Maximum seconds to wait for each repo check
|
2026-05-18 15:10:49 +00:00
|
|
|
timeout: 60
|
2026-05-18 15:29:21 +00:00
|
|
|
# Additional restic flags if needed (e.g. '--cacert /path/to/ca.crt')
|
2026-05-18 15:10:49 +00:00
|
|
|
restic_flags: ""
|
|
|
|
|
|
2026-05-18 15:29:21 +00:00
|
|
|
# ---------------------------------------------------------------------------
|
2026-05-18 15:10:49 +00:00
|
|
|
# Logging
|
2026-05-18 15:29:21 +00:00
|
|
|
# ---------------------------------------------------------------------------
|
2026-05-18 15:10:49 +00:00
|
|
|
logging:
|
|
|
|
|
level: INFO
|
|
|
|
|
file: "/var/log/ns8-backup-monitor.log"
|