Browse Source

PrometheusHighQueryLoad alert: use configured selector

Currently we're hardcoding `job="prometheus-k8s"` as selector. This
doesn't work if your prometheus is elsewhere. Fortunately we have
`prometheusSelector` in `$._config`  which all the other alerts use.

Use that here too.

Signed-off-by: Iain Lane <iain@orangesquash.org.uk>
pull/11028/head
Iain Lane 2 years ago
parent
commit
e5cd5a33d0
No known key found for this signature in database
GPG Key ID: E352D5C51C5041D4
  1. 2
      documentation/prometheus-mixin/alerts.libsonnet

2
documentation/prometheus-mixin/alerts.libsonnet

@ -320,7 +320,7 @@
{
alert: 'PrometheusHighQueryLoad',
expr: |||
avg_over_time(prometheus_engine_queries{job="prometheus-k8s"}[5m]) / max_over_time(prometheus_engine_queries_concurrent_max{job="prometheus-k8s"}[5m]) > 0.8
avg_over_time(prometheus_engine_queries{%(prometheusSelector)s}[5m]) / max_over_time(prometheus_engine_queries_concurrent_max{%(prometheusSelector)s}[5m]) > 0.8
||| % $._config,
'for': '15m',
labels: {

Loading…
Cancel
Save