pint
validates Prometheus alerting and recording rules
TLDR
SYNOPSIS
pint [-c config] command [options] [files]
DESCRIPTION
pint validates Prometheus alerting and recording rules, catching errors before deployment. It goes beyond basic syntax checking by querying a live Prometheus server to verify that referenced metrics actually exist and that selectors return data.Key capabilities include: PromQL syntax validation, series existence checks against live Prometheus, alert template validation (annotation and label rendering), duplicate rule detection, and cost estimation for expensive queries.The ci mode is designed for pull request workflows — it only reports problems in changed files, making it practical for large rule repositories. The watch mode continuously monitors rule files and re-checks on changes.
PARAMETERS
lint
Check rules for problems.watch
Watch and lint continuously.ci
CI/CD mode.checks
List available checks.-c, --config FILE
Configuration file.--output FORMAT
Output format.--no-color
Disable colors.-v, --verbose
Verbose output.
CHECKS
promql/syntax - Query syntaxpromql/series - Series existencealerts/for - Alert durationalerts/template - Template errorsrule/duplicate - Duplicate rules
CAVEATS
Live checks require network access to a Prometheus server. Some checks may produce false positives for metrics that are intermittently scraped. Configuration is required to connect pint to Prometheus instances.
HISTORY
pint was created by Cloudflare for validating their Prometheus rules at scale. It provides deeper analysis than Prometheus's built-in rule checking.
SEE ALSO
promtool(1), prometheus(1), amtool(1)
