update
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<%- if metrics_enabled and metrics_docker %>
|
||||
prometheus.exporter.cadvisor "dockermetrics" {
|
||||
docker_host = "unix:///var/run/docker.sock"
|
||||
storage_duration = "5m"
|
||||
}
|
||||
|
||||
/* Relabel component to drop container_spec metrics that often have NaN values */
|
||||
prometheus.relabel "docker_filter" {
|
||||
forward_to = [prometheus.remote_write.default.receiver]
|
||||
|
||||
rule {
|
||||
source_labels = ["__name__"]
|
||||
regex = "container_spec_(cpu_period|cpu_quota|cpu_shares|memory_limit_bytes|memory_swap_limit_bytes|memory_reservation_limit_bytes)"
|
||||
action = "drop"
|
||||
}
|
||||
}
|
||||
|
||||
prometheus.scrape "dockermetrics" {
|
||||
targets = prometheus.exporter.cadvisor.dockermetrics.targets
|
||||
forward_to = [prometheus.relabel.docker_filter.receiver]
|
||||
scrape_interval = "10s"
|
||||
}
|
||||
<%- endif %>
|
||||
Reference in New Issue
Block a user