Skip to content

Commit

Permalink
fix: failed to get metrics from cadvisor of k8s v1.12
Browse files Browse the repository at this point in the history
Signed-off-by: Feng Kun <[email protected]>
  • Loading branch information
kevinfeng authored and QianChenglong committed Mar 9, 2020
1 parent ffbb7c0 commit 098ccf2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/platform/controller/addon/prometheus/yamls.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,11 @@ func scrapeConfigForPrometheus() string {
regex: 'container_fs_writes_bytes_total|container_fs_reads_bytes_total|container_fs_writes_total|container_fs_reads_total|container_cpu_usage_seconds_total|container_memory_usage_bytes|container_memory_cache|container_network_receive_bytes_total|container_network_transmit_bytes_total|container_network_receive_packets_total|container_network_transmit_packets_total'
action: keep
- source_labels: [container]
regex: "(.+)"
action: replace
target_label: container_name
- source_labels: [pod]
regex: "(.+)"
action: replace
target_label: pod_name
- regex: (__name__|container_name|pod_name|namespace|cpu|interface|device)
Expand Down

0 comments on commit 098ccf2

Please sign in to comment.