Skip to content

Commit

Permalink
jsonnet: Patch metric relabelings for control plane
Browse files Browse the repository at this point in the history
We drop some pod-centric metrics from cAdvisor to reduce cardinality.
This metrics are available at the slice level.
  • Loading branch information
philipgough committed Sep 28, 2021
1 parent f520062 commit 6be7a0c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions assets/control-plane/service-monitor-kubelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ spec:
regex: container_memory_failures_total
sourceLabels:
- __name__
- action: drop
regex: (container_fs_.*);.+
sourceLabels:
- __name__
- container
path: /metrics/cadvisor
port: https-metrics
relabelings:
Expand Down
6 changes: 6 additions & 0 deletions jsonnet/components/control-plane.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ function(params)
action: 'drop',
regex: 'container_memory_failures_total',
},
{
// these metrics are available at the slice level
sourceLabels: ['__name__', 'container'],
action: 'drop',
regex: '(container_fs_.*);.+',
},
],
}
else
Expand Down

0 comments on commit 6be7a0c

Please sign in to comment.