LinuxCommandLibrary

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. It catches errors before deployment.
Syntax checking validates PromQL queries. Invalid queries won't load in Prometheus.
Live checking queries actual Prometheus. This verifies metrics exist and selectors match.
Template validation catches annotation and label errors. Alert messages are verified.
Watch mode monitors rule files. Changes trigger immediate re-checking.

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 syntax
promql/series - Series existence
alerts/for - Alert duration
alerts/template - Template errors
rule/duplicate - Duplicate rules

CAVEATS

Live checks need Prometheus access. Some checks have false positives. Configuration complexity.

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

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community