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>
This commit is contained in:
Iain Lane 2022-07-15 09:59:34 +01:00
parent d41e5a5582
commit e5cd5a33d0
No known key found for this signature in database
GPG Key ID: E352D5C51C5041D4
1 changed files with 1 additions and 1 deletions

View File

@ -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: {