Skip to content
Snippets Groups Projects
Unverified Commit 374413f1 authored by Damien Grisonnet's avatar Damien Grisonnet Committed by GitHub
Browse files

Merge pull request #1409 from dgrisonnet/drop-pa-metrics

Drop some of the metrics exposed by prometheus-adapter
parents d7446e62 5ebbb652
Branches
Tags
No related merge requests found
...@@ -172,6 +172,21 @@ function(params) { ...@@ -172,6 +172,21 @@ function(params) {
insecureSkipVerify: true, insecureSkipVerify: true,
}, },
bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token', bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token',
metricRelabelings: [
{
sourceLabels: ['__name__'],
action: 'drop',
regex: '(' + std.join('|',
[
'apiserver_client_certificate_.*', // The only client supposed to connect to the aggregated API is the apiserver so it is not really meaningful to monitor its certificate.
'apiserver_envelope_.*', // Prometheus-adapter isn't using envelope for storage.
'apiserver_flowcontrol_.*', // Prometheus-adapter isn't using flowcontrol.
'apiserver_storage_.*', // Prometheus-adapter isn't using the apiserver storage.
'apiserver_webhooks_.*', // Prometeus-adapter doesn't make use of apiserver webhooks.
'workqueue_.*', // Metrics related to the internal apiserver auth workqueues are not very useful to prometheus-adapter.
]) + ')',
},
],
}, },
], ],
}, },
......
...@@ -12,6 +12,11 @@ spec: ...@@ -12,6 +12,11 @@ spec:
endpoints: endpoints:
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
interval: 30s interval: 30s
metricRelabelings:
- action: drop
regex: (apiserver_client_certificate_.*|apiserver_envelope_.*|apiserver_flowcontrol_.*|apiserver_storage_.*|apiserver_webhooks_.*|workqueue_.*)
sourceLabels:
- __name__
port: https port: https
scheme: https scheme: https
tlsConfig: tlsConfig:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment