Add ability to drop metrics from cAdvisor (#11173)

* Add ability to drop metrics from cAdvisor

Tons and tons of them are useless.

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>

* Add values to files

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
This commit is contained in:
Goutham Veeramachaneni
2019-02-19 22:29:12 -08:00
committed by Kubernetes Prow Robot
parent fa4468c8ca
commit 8e8282d049
5 changed files with 30 additions and 1 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ name: prometheus-operator
sources:
- https://github.com/coreos/prometheus-operator
- https://coreos.com/operators/prometheus
version: 2.3.0
version: 2.3.1
appVersion: 0.26.0
home: https://github.com/coreos/prometheus-operator
keywords:
+1
View File
@@ -264,6 +264,7 @@ The following tables lists the configurable parameters of the prometheus-operato
| `kubelet.enabled` | Deploy servicemonitor to scrape the kubelet service. See also `prometheusOperator.kubeletService` | `true` |
| `kubelet.namespace` | Namespace where the kubelet is deployed. See also `prometheusOperator.kubeletService.namespace` | `kube-system` |
| `kubelet.serviceMonitor.https` | Enable scraping of the kubelet over HTTPS. For more information, see https://github.com/coreos/prometheus-operator/issues/926 | `false` |
| `kubelet.serviceMonitor.cAdvisorMetricRelabelings` | The `metric_relabel_configs` for scraping cAdvisor. | `` |
| `kubeControllerManager.enabled` | Deploy a `service` and `serviceMonitor` to scrape the Kubernetes controller-manager | `true` |
| `kubeControllerManager.endpoints` | Endpoints where Controller-manager runs. Provide this if running Controller-manager outside the cluster | `[]` |
| `kubeControllermanager.service.port` | Controller-manager port for the service runs on | `10252` |
@@ -386,6 +386,18 @@ kubelet:
## https://github.com/coreos/prometheus-operator/issues/926
##
https: false
cAdvisorMetricRelabelings:
- sourceLabels: [__name__, image]
separator: ;
regex: container_([a-z_]+);
replacement: $1
action: drop
- sourceLabels: [__name__]
separator: ;
regex: container_(network_tcp_usage_total|network_udp_usage_total|tasks_state|cpu_load_average_10s)
replacement: $1
action: drop
## Component scraping the kube controller manager
##
@@ -34,6 +34,10 @@ spec:
path: /metrics/cadvisor
interval: 30s
honorLabels: true
{{- if .Values.kubelet.serviceMonitor.cAdvisorMetricRelabelings }}
metricRelabelings:
{{ toYaml .Values.kubelet.serviceMonitor.cAdvisorMetricRelabelings | indent 4 }}
{{- end }}
{{- end }}
jobLabel: k8s-app
namespaceSelector:
+12
View File
@@ -398,6 +398,18 @@ kubelet:
## https://github.com/coreos/prometheus-operator/issues/926
##
https: false
# cAdvisorMetricRelabelings:
# - sourceLabels: [__name__, image]
# separator: ;
# regex: container_([a-z_]+);
# replacement: $1
# action: drop
# - sourceLabels: [__name__]
# separator: ;
# regex: container_(network_tcp_usage_total|network_udp_usage_total|tasks_state|cpu_load_average_10s)
# replacement: $1
# action: drop
## Component scraping the kube controller manager
##