add extra filter in prometheus scrape for http-metrics
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
This commit is contained in:
parent
6eac38d4ec
commit
5e908f796c
@ -85,11 +85,21 @@ data:
|
|||||||
name = "metrics"
|
name = "metrics"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
discovery.relabel "only_http_metrics" {
|
||||||
|
targets = discovery.relabel.rename_meta_labels.output
|
||||||
|
|
||||||
|
rule {
|
||||||
|
source_labels = ["__meta_kubernetes_pod_container_port_name"]
|
||||||
|
action = "keep"
|
||||||
|
regex = "http-metrics"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
prometheus.scrape "pods" {
|
prometheus.scrape "pods" {
|
||||||
clustering {
|
clustering {
|
||||||
enabled = true
|
enabled = true
|
||||||
}
|
}
|
||||||
targets = discovery.relabel.rename_meta_labels.output
|
targets = discovery.relabel.only_http_metrics.output
|
||||||
forward_to = [ {{ include "agent.prometheus_write_targets" . }} ]
|
forward_to = [ {{ include "agent.prometheus_write_targets" . }} ]
|
||||||
}
|
}
|
||||||
{{- if .Values.kubeStateMetrics.enabled }}
|
{{- if .Values.kubeStateMetrics.enabled }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user