Add metrics_path label to kubelet servicemonitor endpoints (#277)
* Add metrics_path label to kubelet servicemonitor endpoints * Set kubelet metric_path label in jsonnet * Add generated kubelet servicemonitor
This commit is contained in:
committed by
Frederic Branczyk
parent
a7884a6c18
commit
4e5b454ba8
@@ -281,6 +281,12 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
|
||||
insecureSkipVerify: true,
|
||||
},
|
||||
bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token',
|
||||
relabelings: [
|
||||
{
|
||||
sourceLabels: ['__metrics_path__'],
|
||||
targetLabel: 'metrics_path'
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
port: 'https-metrics',
|
||||
@@ -292,6 +298,12 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
|
||||
insecureSkipVerify: true,
|
||||
},
|
||||
bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token',
|
||||
relabelings: [
|
||||
{
|
||||
sourceLabels: ['__metrics_path__'],
|
||||
targetLabel: 'metrics_path'
|
||||
},
|
||||
],
|
||||
metricRelabelings: [
|
||||
// Drop a bunch of metrics which are disabled but still sent, see
|
||||
// https://github.com/google/cadvisor/issues/1925.
|
||||
|
||||
Reference in New Issue
Block a user