LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pint

validates Prometheus alerting and recording rules

TLDR

Lint Prometheus rules
$ pint lint [rules.yaml]
copy
Check rules against live Prometheus
$ pint -c [config.yaml] lint [rules.yaml]
copy
Watch for changes
$ pint watch [rules/]
copy
Show rule problems
$ pint lint --output=json [rules.yaml]
copy
CI mode
$ pint ci
copy
List available checks
$ pint checks
copy

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

Copied to clipboard
Kai