mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/prometheus] added slow pod scrape config (#20443)
* added slow pod scrape config Signed-off-by: André Bauer <andre.bauer@kiwigrid.com> * removed whitespace Signed-off-by: André Bauer <andre.bauer@kiwigrid.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
apiVersion: v1
|
||||
name: prometheus
|
||||
version: 10.3.1
|
||||
version: 10.4.0
|
||||
appVersion: 2.15.2
|
||||
description: Prometheus is a monitoring system and time series database.
|
||||
home: https://prometheus.io/
|
||||
|
||||
@@ -1496,6 +1496,45 @@ serverFiles:
|
||||
action: replace
|
||||
target_label: kubernetes_pod_name
|
||||
|
||||
# Example Scrape config for pods which should be scraped slower. An useful example
|
||||
# would be stackriver-exporter which querys an API on every scrape of the pod
|
||||
#
|
||||
# The relabeling allows the actual pod scrape endpoint to be configured via the
|
||||
# following annotations:
|
||||
#
|
||||
# * `prometheus.io/scrape-slow`: Only scrape pods that have a value of `true`
|
||||
# * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
|
||||
# * `prometheus.io/port`: Scrape the pod on the indicated port instead of the default of `9102`.
|
||||
- job_name: 'kubernetes-pods-slow'
|
||||
|
||||
scrape_interval: 5m
|
||||
scrape_timeout: 30s
|
||||
|
||||
kubernetes_sd_configs:
|
||||
- role: pod
|
||||
|
||||
relabel_configs:
|
||||
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape_slow]
|
||||
action: keep
|
||||
regex: true
|
||||
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
|
||||
action: replace
|
||||
target_label: __metrics_path__
|
||||
regex: (.+)
|
||||
- source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
|
||||
action: replace
|
||||
regex: ([^:]+)(?::\d+)?;(\d+)
|
||||
replacement: $1:$2
|
||||
target_label: __address__
|
||||
- action: labelmap
|
||||
regex: __meta_kubernetes_pod_label_(.+)
|
||||
- source_labels: [__meta_kubernetes_namespace]
|
||||
action: replace
|
||||
target_label: kubernetes_namespace
|
||||
- source_labels: [__meta_kubernetes_pod_name]
|
||||
action: replace
|
||||
target_label: kubernetes_pod_name
|
||||
|
||||
# adds additional scrape configs to prometheus.yml
|
||||
# must be a string so you have to add a | after extraScrapeConfigs:
|
||||
# example adds prometheus-blackbox-exporter scrape config
|
||||
|
||||
Reference in New Issue
Block a user