mirror of
https://github.com/ipnet-mesh/meshcore-hub.git
synced 2026-03-28 17:42:56 +01:00
Add /metrics endpoint with Prometheus gauges for nodes, messages, advertisements, telemetry, trace paths, events, and members. Include per-node last_seen timestamps for alerting. Add Alertmanager service to Docker Compose metrics profile with default blackhole receiver. Add NodeNotSeen alert rule (48h threshold). Add 1h time window to all windowed metrics alongside existing 24h/7d/30d windows. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
17 lines
584 B
YAML
17 lines
584 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 > 48 * 3600
|
|
for: 5m
|
|
labels:
|
|
severity: warning
|
|
annotations:
|
|
summary: "Node {{ $labels.node_name }} not seen for 48+ hours"
|
|
description: "Node {{ $labels.public_key }} ({{ $labels.adv_type }}) last seen {{ $value | humanizeDuration }} ago."
|