Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Gu <[email protected]>
  • Loading branch information
tylergu committed Nov 22, 2023
1 parent 0464a91 commit 737fca6
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions performance_measurement/cadvisor_watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ def start(self, apiclient: ApiClient):
elif labels["container"] == "kube-apiserver":
pod_metrics["kube-apiserver"]["container_fs_writes_bytes_total"] = {
"value": value, "timestamp": timestamp}
elif name == "container_fs_reads_bytes_total":
if labels["container"] == "etcd":
pod_metrics["etcd-anvil-control-plane"][
"container_fs_reads_bytes_total"] = {
"value": value, "timestamp": timestamp}
elif labels["container"] == "kube-apiserver":
pod_metrics["kube-apiserver"]["container_fs_reads_bytes_total"] = {
"value": value, "timestamp": timestamp}
elif name == "container_cpu_usage_seconds_total":
if labels["container"] == "etcd":
pod_metrics["etcd-anvil-control-plane"]["container_cpu_usage_seconds_total"] = {
Expand All @@ -69,19 +77,19 @@ def start(self, apiclient: ApiClient):
pod_metrics["kube-apiserver"]["container_memory_usage_bytes"] = {
"value": value, "timestamp": timestamp}
elif name == "container_network_transmit_bytes_total":
if labels["container"] == "etcd":
if labels["pod"] == "etcd-anvil-control-plane":
pod_metrics["etcd-anvil-control-plane"][
"container_network_transmit_bytes_total"] = {
"value": value, "timestamp": timestamp}
elif labels["container"] == "kube-apiserver":
elif labels["pod"] == "kube-apiserver-anvil-control-plane":
pod_metrics["kube-apiserver"]["container_network_transmit_bytes_total"] = {
"value": value, "timestamp": timestamp}
elif name == "container_network_receive_bytes_total":
if labels["container"] == "etcd":
if labels["pod"] == "etcd-anvil-control-plane":
pod_metrics["etcd-anvil-control-plane"][
"container_network_receive_bytes_total"] = {
"value": value, "timestamp": timestamp}
elif labels["container"] == "kube-apiserver":
elif labels["container"] == "kube-apiserver-anvil-control-plane":
pod_metrics["kube-apiserver"]["container_network_receive_bytes_total"] = {
"value": value, "timestamp": timestamp}

Expand Down

0 comments on commit 737fca6

Please sign in to comment.