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>
30 lines
727 B
YAML
30 lines
727 B
YAML
# Prometheus scrape configuration for MeshCore Hub
|
|
#
|
|
# This file is used when running Prometheus via Docker Compose:
|
|
# docker compose --profile core --profile metrics up -d
|
|
#
|
|
# The scrape interval matches the default metrics cache TTL (60s)
|
|
# to avoid unnecessary database queries.
|
|
|
|
global:
|
|
scrape_interval: 60s
|
|
evaluation_interval: 60s
|
|
|
|
alerting:
|
|
alertmanagers:
|
|
- static_configs:
|
|
- targets: ['alertmanager:9093']
|
|
|
|
rule_files:
|
|
- 'alerts.yml'
|
|
|
|
scrape_configs:
|
|
- job_name: 'meshcore-hub'
|
|
metrics_path: '/metrics'
|
|
# Uncomment basic_auth if API_READ_KEY is configured
|
|
# basic_auth:
|
|
# username: 'metrics'
|
|
# password: '<API_READ_KEY>'
|
|
static_configs:
|
|
- targets: ['api:8000']
|