Skip to content

Latest commit

 

History

History
67 lines (48 loc) · 1.3 KB

rate.md

File metadata and controls

67 lines (48 loc) · 1.3 KB
layout parent grand_parent
default
Checks
Documentation

promql/rate

This check inspects rate() and irate() functions and warns if used duration is too low. It does so by first getting global scrape_interval value for selected Prometheus servers and comparing duration to it. It will report a bug if duration is less than 2x scrape_interval.

Configuration

This check doesn't have any configuration options.

How to enable it

This check is enabled by default for all configured Prometheus servers.

Example:

prometheus "prod" {
  uri     = "https://prometheus-prod.example.com"
  timeout = "60s"
  paths = [
    "rules/prod/.*",
    "rules/common/.*",
  ]
}

prometheus "dev" {
  uri     = "https://prometheus-dev.example.com"
  timeout = "30s"
  paths = [
    "rules/dev/.*",
    "rules/common/.*",
  ]
}

How to disable it

You can disable this check globally by adding this config block:

checks {
  disabled = ["promql/rate"]
}

Or you can disable it per rule by adding a comment to it:

# pint disable promql/rate

If you want to disable only individual instances of this check you can add a more specific comment.

# pint disable promql/rate($prometheus)

Where $prometheus is the name of Prometheus server to disable.

Example:

# pint disable promql/rate(prod)