Promruval organizes its validations into different scopes. Depending on the type of rule you are validating (e.g., a Rule Group, an Alert, or a Recording Rule), only specific validators are available.
- Groups: Validations that apply specifically to the
Group scope (e.g., maxRulesPerGroup, hasAllowedEvaluationInterval). - Universal rule validators: Validations that can be applied to any rule, including Labels and PromQL expression validators.
- Alert validators: Validations specific to Alert rules, covering Labels, Annotations, and other alert-specific properties.
- Recording rules validators: Validations specific to Recording rules.
For a sane starting point, you can refer to default_validation.yaml to see recommended default validations.
Note on Regular Expressions: Unless explicitly stated otherwise, all regular expressions used in configuration are fully anchored (^...$) and default to matching everything (.*).