Releases: FUSAKLA/promruval
Releases · FUSAKLA/promruval
v3.5.0
- Added: New validation
expressionDoesNotUseClassicHistogramBucketOperations
to avoid queries fragile because of the classic histogram bucket operations.
See the docs for more info expressionDoesNotUseClassicHistogramBucketOperations - Changed:
⚠️ revert the ENV expansion in config file since it was breaking and caused issues (it was a stupid idea) - Fix: Avoid panic when validating unsupported file type and revert to previous behavior when any file was treated as a rule file regardless of the extension.
The only exception are.jsonnet
files that are evaluated first.
v3.4.0
- Fixed:
⚠️ Ignore white spaces around rule names in thedisabled_validation_rules
annotation CSV format (Thanks @jmichalek13 !) - Added:
⚠️ Support ENV expansion in the config file in format$ENV_VAR
or${ENV_VAR}
- Changed:
⚠️ The cache format is now scoped by source tenants (internal change, no action required) - Changed: Uses structured logging
- Added: new
httpHeaders
field in theprometheus
section of the config to set custom headers in the Prometheus requests - Added: new option
negativeRegexp
to thehasSourceTenantsForMetrics
validation, see the docs - Added: new validator
recordedMetricNameDoesNotMatchRegexp
to check if the recorded metric name does not match the regexp
v3.3.0
- Changed: Upgrade to go 1.23
- Changed: Upgrade prometheus dependencies
- Changed: Upgrade other dependencies
- Changed: Enable experimental functions in PromQL parser by default, to forbid them use a new validator
expressionDoesNotUseExperimentalFunctions
- Added: New validator
expressionDoesNotUseExperimentalFunctions
to check if the expression does not use experimental functions - Added: New validator
expressionUsesUnderscoresInLargeNumbers
that requires using underscores as separators in large numbers in expressions
v3.2.0
- Added: Build of windows and darwin and support for arm architectures in CI
v3.1.0
- Added: New validator
expressionUsesOnlyAllowedLabelsForMetricRegexp
to check if the expression uses only allowed labels for the metric.
v3.0.0
- Changed: Updated README.md installation instructions, to install latest version use
go install github.com/fusakla/promruval/v3
. - Fixed:
⚠️ Unmarshalling of the rule files is strict again, this behavior was unintentionally brought when adding support for yaml comments. - Changed:
⚠️ RenamedhasValidPartialStrategy
tohasValidPartialResponseStrategy
as it was documented so it is actually a fix - Changed:
⚠️ Disallow special rule file fields of Thanos, Mimir or Loki by default
To enable them, you need to set some of the new flags described below - Changed: The Prometheus results cache format has changed to reduce it's size and improve performance. Delete the old cache file before upgrade.
Also now if the cache contains time of creation and URL of the Prometheus it has data for. From now on, if the URL does not match, the case is pruned. - Added: 🚀 Support for validation of rule files in the Jsonnet format.
- Added: New flags
--support-thanos
,--support-mimir
,--support-loki
to enable special rule file fields of Thanos, Mimir or Loki - Added: 🎉 Support for validation of Loki rules! Now you can validate Loki rules as well. First two validators are:
expressionIsValidLogQL
to check if the expression is a valid LogQL querylogQlExpressionUsesRangeAggregation
to check if the LogQL expression uses range aggregationlogQlExpressionUsesFiltersFirst
to check if the LogQL expression uses filters first in the query since it is more efficient
- Added: Support for alert field
keep_firing_for
- Added: Support for the
query_offset
field in the rule group - Added: New validator
expressionIsValidPromQL
to check if the expression is a valid PromQL query - Added: Support for bearer token authentication in the
prometheus
section of the config using thebearerTokenFile
field or by specifying thePROMETHEUS_BEARER_TOKEN
env variable. - Added:
maximumMatchingSeries
option to theexpressionSelectorsMatchesAnything
validator to check maximum number of series any selector can match. - Added: new config options to the prometheus section of config:
queryOffset
: Specify offset(delay) of the query (useful for consistency if using remote write for example).queryLookback
: How long into the past to look in queries supporting time range (just metadata queries for now).
- Added: New validator
alertNameMatchesRegexp
to check if the alert name matches the regexp. - Added: New validator
groupNameMatchesRegexp
to check if the rule group name matches the regexp. - Added: New validator
recordedMetricNameMatchesRegexp
to check if the recorded metric name matches the regexp. - Added: Set the
User-Agent
header in the Prometheus requests topromruva
to identify the client. - Added: Automatically configure the
X-ScopeOrgID
header in the Prometheus requests if thesource_tenants
field is set in the rule group. - Fixed: Rules count in the result stats is now correct.
- Fixed: Better error message when validation rule is missing
scope
. - Fixed: Loading glob patterns in the file paths to rules
- Fixed: Params of the
expressionCanBeEvaluated
validator were ignored, this is now fixed. - Updated: Prometheus and other dependencies
- CI: Updated Github actions for golangcilint and goreleaser
v2.14.1
- Fixed: error message in the
hasSourceTenantsForMetrics
validator - Updated: indirect Go dependency google.golang.org/protobuf bumped to v1.33.0