Skip to content

Releases: FUSAKLA/promruval

v3.5.0

31 Oct 22:36
Compare
Choose a tag to compare
  • 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

30 Oct 15:34
Compare
Choose a tag to compare
  • Fixed: ⚠️ Ignore white spaces around rule names in the disabled_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 the prometheus section of the config to set custom headers in the Prometheus requests
  • Added: new option negativeRegexp to the hasSourceTenantsForMetrics validation, see the docs
  • Added: new validator recordedMetricNameDoesNotMatchRegexp to check if the recorded metric name does not match the regexp

v3.3.0

03 Oct 21:42
Compare
Choose a tag to compare
  • 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

16 Aug 11:11
45f1684
Compare
Choose a tag to compare
  • Added: Build of windows and darwin and support for arm architectures in CI

v3.1.0

14 Aug 14:42
Compare
Choose a tag to compare
  • Added: New validator expressionUsesOnlyAllowedLabelsForMetricRegexp to check if the expression uses only allowed labels for the metric.

v3.0.0

23 Jul 15:50
Compare
Choose a tag to compare
  • 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: ⚠️ Renamed hasValidPartialStrategy to hasValidPartialResponseStrategy 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 query
    • logQlExpressionUsesRangeAggregation to check if the LogQL expression uses range aggregation
    • logQlExpressionUsesFiltersFirst 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 the bearerTokenFile field or by specifying the PROMETHEUS_BEARER_TOKEN env variable.
  • Added: maximumMatchingSeries option to the expressionSelectorsMatchesAnything 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 to promruva to identify the client.
  • Added: Automatically configure the X-ScopeOrgID header in the Prometheus requests if the source_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

20 Mar 10:44
Compare
Choose a tag to compare
  • Fixed: error message in the hasSourceTenantsForMetrics validator
  • Updated: indirect Go dependency google.golang.org/protobuf bumped to v1.33.0

v2.14.0

15 Mar 23:34
Compare
Choose a tag to compare

Changelog

  • 3412316 feat: add new param to the

v2.13.0

08 Mar 16:33
Compare
Choose a tag to compare

Changelog

  • 18e0033 chore: bump version 2.13.0
  • 50ca24c docs: fix wording in validation warning
  • 09ec132 docs: add links to validation types in readme
  • ce7546a fix: add forgotten helpers.go
  • cf81e1a feat: add support for disabling validations using comments on group and file level

v2.12.0

07 Mar 22:41
Compare
Choose a tag to compare

Changelog

  • 236a949 fix: sort tenants in the validator human readable output
  • 6d5c48e fix: load paramsFromFile as a relative path to the config file location