kube-prometheus: Don't drop non-pod metrics

These metrics can still be valuable to troubleshoot components running
in cgroups on the host, outside the scope of Kubernetes pods.
This commit is contained in:
Frederic Branczyk
2019-04-09 15:28:44 +02:00
parent 7e4381ca87
commit f8bd9b89f7

View File

@@ -283,13 +283,6 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet';
}, },
bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token', bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token',
metricRelabelings: [ metricRelabelings: [
// Drop container_* metrics with no image.
{
sourceLabels: ['__name__', 'image'],
regex: 'container_([a-z_]+);',
action: 'drop',
},
// Drop a bunch of metrics which are disabled but still sent, see // Drop a bunch of metrics which are disabled but still sent, see
// https://github.com/google/cadvisor/issues/1925. // https://github.com/google/cadvisor/issues/1925.
{ {