Skip to content

Commit 5df10b7

Browse files
Merge pull request #2554 from machine424/smooth-prom3
MON-4136: set up the PrometheusPossibleNarrowSelectors alert
2 parents 884f872 + 187d9d7 commit 5df10b7

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

assets/cluster-monitoring-operator/prometheus-rule.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ spec:
3030
for: 15m
3131
labels:
3232
severity: warning
33+
- alert: PrometheusPossibleNarrowSelectors
34+
annotations:
35+
description: Queries or/and relabel configs on Prometheus/Thanos {{$labels.namespace}}/{{$labels.pod}} could be too restrictive.
36+
summary: |
37+
Some queries or/and relabel configs with selectors on the values of the "le" label of classic histograms or/and the "quantile" label of summaries
38+
may not take into account that values could also be floats, they may need to be adjusted. If assistance is needed, please let us know at https://issues.redhat.com/browse/MON-4129.
39+
expr: increase(prometheus_narrow_selectors_count{job=~"prometheus-k8s|prometheus-user-workload|thanos-querier|thanos-ruler"}[5m]) > 0
40+
for: 15m
41+
labels:
42+
severity: warning
3343
- name: openshift-kubernetes.rules
3444
rules:
3545
- expr: sum(rate(container_cpu_usage_seconds_total{container="",pod!=""}[5m])) BY (pod, namespace)

jsonnet/rules.libsonnet

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,21 @@ function(params) {
2727
severity: 'warning',
2828
},
2929
},
30+
{
31+
expr: 'increase(prometheus_narrow_selectors_count{job=~"prometheus-k8s|prometheus-user-workload|thanos-querier|thanos-ruler"}[5m]) > 0',
32+
alert: 'PrometheusPossibleNarrowSelectors',
33+
'for': '15m',
34+
annotations: {
35+
description: 'Queries or/and relabel configs on Prometheus/Thanos {{$labels.namespace}}/{{$labels.pod}} could be too restrictive.',
36+
summary: |||
37+
Some queries or/and relabel configs with selectors on the values of the "le" label of classic histograms or/and the "quantile" label of summaries
38+
may not take into account that values could also be floats, they may need to be adjusted. If assistance is needed, please let us know at https://issues.redhat.com/browse/MON-4129.
39+
|||,
40+
},
41+
labels: {
42+
severity: 'warning',
43+
},
44+
},
3045
],
3146
},
3247
{

0 commit comments

Comments
 (0)