Skip to content

Commit 3402cf5

Browse files
committed
jsonnet: Patch metric relabelings for control plane
We drop some pod-centric metrics from cAdvisor to reduce cardinality. This metrics are available at the slice level.
1 parent f520062 commit 3402cf5

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## 4.10
44

55
- [#1299](https://github.com/openshift/cluster-monitoring-operator/pull/1299) Expose expose /api/v1/labels endpoint for Thanos query.
6+
- [#1402](https://github.com/openshift/cluster-monitoring-operator/pull/1402) Drop pod-centric cAdvisor metrics that are available at slice level.
67

78
## 4.9
89

assets/control-plane/service-monitor-kubelet.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ spec:
8080
regex: container_memory_failures_total
8181
sourceLabels:
8282
- __name__
83+
- action: drop
84+
regex: (container_fs_.*);.+
85+
sourceLabels:
86+
- __name__
87+
- container
8388
path: /metrics/cadvisor
8489
port: https-metrics
8590
relabelings:

jsonnet/components/control-plane.libsonnet

+6
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ function(params)
8888
action: 'drop',
8989
regex: 'container_memory_failures_total',
9090
},
91+
{
92+
// these metrics are available at the slice level
93+
sourceLabels: ['__name__', 'container'],
94+
action: 'drop',
95+
regex: '(container_fs_.*);.+',
96+
},
9197
],
9298
}
9399
else

0 commit comments

Comments
 (0)