#!/bin/bash
# License   :   Apache-2.0 @ https://pigsty.io/docs/about/license/
# Copyright :   2018-2026  Ruohang Feng / Vonng (rh@vonng.com)
# Check VictoriaMetrics configuration and rules

# check prometheus-compatible config
echo "Checking VictoriaMetrics config: /infra/prometheus.yml"
/usr/bin/victoria-metrics -promscrape.config=/infra/prometheus.yml -promscrape.config.dryRun

# check alert rules
echo "Checking alert rules: /infra/rules/*.yml"
/usr/bin/vmalert -rule=/infra/rules/*.yml -dryRun