#!/usr/bin/env bash # M8.5 monitoring configuration checks (ADR-0072): Prometheus configuration syntax, # alert rule validity, the alert-injection unit tests, and the Alertmanager routing. # Needs promtool and amtool on PATH, taken from the same pinned images that run in # the cluster (the ci-deploy Docker stage copies them). No cluster access. set -euo pipefail root="$(cd "$(dirname "$0")/../.." && pwd)" config="$root/deploy/kubernetes/monitoring/config" promtool --version | head -1 amtool --version 2>&1 | head -1 promtool check config --syntax-only "$config/prometheus.yml" promtool check rules "$config/evo-region.rules.yml" (cd "$root/deploy/kubernetes/monitoring/tests" && promtool test rules evo-region.rules.test.yml) amtool check-config "$config/alertmanager.yml" echo "monitoring configuration, rules and alert tests passed"