mirror of
https://github.com/ipnet-mesh/meshcore-hub.git
synced 2026-03-28 17:42:56 +01:00
Joins NodeTag (key='role') to the node last seen Prometheus metric so alert rules can target infrastructure nodes only (role="infra"). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
17 lines
644 B
YAML
17 lines
644 B
YAML
# Prometheus alert rules for MeshCore Hub
|
|
#
|
|
# These rules are evaluated by Prometheus and fired alerts are sent
|
|
# to Alertmanager for routing and notification.
|
|
|
|
groups:
|
|
- name: meshcore
|
|
rules:
|
|
- alert: NodeNotSeen
|
|
expr: time() - meshcore_node_last_seen_timestamp_seconds{role="infra"} > 48 * 3600
|
|
for: 5m
|
|
labels:
|
|
severity: warning
|
|
annotations:
|
|
summary: "Node {{ $labels.node_name }} ({{ $labels.role }}) not seen for 48+ hours"
|
|
description: "Node {{ $labels.public_key }} ({{ $labels.adv_type }}, role={{ $labels.role }}) last seen {{ $value | humanizeDuration }} ago."
|