Drop metrics that are unset, high cardinality, or extraneous

* https://github.com/coreos/prometheus-operator/pull/2387
* https://github.com/coreos/prometheus-operator/pull/1959
This commit is contained in:
Dalton Hubble 2019-02-09 16:47:19 -08:00
parent 9c59f393a5
commit b13a651cfe
2 changed files with 24 additions and 1 deletions

View File

@ -10,7 +10,7 @@ Notable changes between versions.
#### Addons #### Addons
* Raise nginx-ingress liveness/readiness timeout to 5 seconds * Raise nginx-ingress liveness/readiness timeout to 5 seconds
* Improve Prometheus metrics labels * Improve Prometheus metrics labels and drop extraneous metrics ([#397](https://github.com/poseidon/typhoon/pull/397))
* Add `pod` name label to metrics discovered via service endpoints * Add `pod` name label to metrics discovered via service endpoints
* Rename `kubernetes_namespace` label to `namespace` * Rename `kubernetes_namespace` label to `namespace`

View File

@ -55,6 +55,17 @@ data:
action: replace action: replace
target_label: job target_label: job
metric_relabel_configs:
- source_labels: [__name__]
action: drop
regex: etcd_(debugging|disk|request|server).*
- source_labels: [__name__]
action: drop
regex: apiserver_admission_controller_admission_latencies_seconds_.*
- source_labels: [__name__]
action: drop
regex: apiserver_admission_step_admission_latencies_seconds_.*
# Scrape config for node (i.e. kubelet) /metrics (e.g. 'kubelet_'). Explore # Scrape config for node (i.e. kubelet) /metrics (e.g. 'kubelet_'). Explore
# metrics from a node by scraping kubelet (127.0.0.1:10250/metrics). # metrics from a node by scraping kubelet (127.0.0.1:10250/metrics).
- job_name: 'kubelet' - job_name: 'kubelet'
@ -89,6 +100,13 @@ data:
relabel_configs: relabel_configs:
- action: labelmap - action: labelmap
regex: __meta_kubernetes_node_label_(.+) regex: __meta_kubernetes_node_label_(.+)
metric_relabel_configs:
- source_labels: [__name__, image]
action: drop
regex: container_([a-z_]+);
- source_labels: [__name__]
action: drop
regex: container_(network_tcp_usage_total|network_udp_usage_total|tasks_state|cpu_load_average_10s)
# Scrap etcd metrics from controllers via listen-metrics-urls # Scrap etcd metrics from controllers via listen-metrics-urls
@ -152,6 +170,11 @@ data:
action: replace action: replace
target_label: job target_label: job
metric_relabel_configs:
- source_labels: [__name__]
action: drop
regex: etcd_(debugging|disk|request|server).*
# Example scrape config for probing services via the Blackbox Exporter. # Example scrape config for probing services via the Blackbox Exporter.
# #
# The relabeling allows the actual service scrape endpoint to be configured # The relabeling allows the actual service scrape endpoint to be configured