Zum Inhalt springen
Produkte

// Benutzung · Monitoring & Alerting

Creating an alert rule

Rules decide what fires an alert. There are two kinds: threshold (a value crossing a line) and heartbeat (a whole location going silent). Set up at least one notification channel first.

Unreachability is already covered without a rule: the built-in system alerts fire when a location or an individual resource stops reporting. Add a heartbeat rule only for custom scoping or a different stale window.

  1. Open Alerts → the Rules tab.
  2. In New rule, set Name, Severity (info / warning / critical), and an optional description, then choose a Kind.

Threshold rule

Fires when a metric crosses a value.

  • PromQL query — the metric to watch, e.g. cpu_usage_ratio{source="proxmox"} or temperature_celsius{sensor="CPU1 Temp"}. Every series the query returns is evaluated independently, so one rule can cover many resources.
  • Comparator and Threshold — e.g. > 0.9.
  • For (seconds) — how long the breach must hold before firing (0 = fire on the first breach).

A per-host "host down" rule is just a threshold: query up{source="proxmox"}, comparator <, threshold 1.

Heartbeat rule ("location unreachable")

Fires when a location stops sending metrics entirely (its agent went silent).

  • Stale after (seconds) — silence longer than this fires (blank = the installation's default, [alerting] heartbeat_stale_secs, 90s as shipped; the empty box and the rule list show the value in force). At least 60s: an agent heartbeats every 30s, so a shorter window would fire on a healthy location between two beats.
  • Scope to location — a specific location name, or blank to watch every location that has reported.

Notify channels

Tick the channel(s) this rule should notify, then Create rule. The rule starts evaluating immediately — no redeploy.

Managing rules

  • Toggle a rule on/off with the enabled button.
  • Through the API, a rule accepts only its own kind's fields: a heartbeat rule refuses query, comparator, threshold and for_secs, and a threshold rule stale_secs and scope_location, with a 400 naming the field. See Alerting.
  • Edit / Delete from the rule's row. Edit re-opens the form; the kind can't change, so create a new rule for a different kind.
  • If someone else changed the rule (or deleted one of its channels) while your form was open, Save does not overwrite their change. The form says the rule was changed meanwhile, shows the new values in the fields you did not edit, keeps your edits, and lists any field you both changed with the value it now has. Check them and save again. See stale rule edits.
  • To silence a firing rule temporarily without deleting it, see muting an alert.
  • Every create, edit (an on/off toggle included) and delete is recorded in the audit log, with who did it and what changed. While it cannot be recorded (inventory-svc down or not yet upgraded) the change is refused with 503 and nothing is changed.

// Zusammenarbeit

Bereit, Ihre digitale Infrastruktur zu bauen?

Ob individuelle Automatisierung für Ihr Unternehmen oder ein durchgeplantes Netzwerk für Ihr Zuhause — lassen Sie uns über das Projekt sprechen.