layout | parent | grand_parent |
---|---|---|
default |
Checks |
Documentation |
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
.
This check doesn't have any configuration options.
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/.*",
]
}
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)