Skip to content
This repository has been archived by the owner on Dec 19, 2022. It is now read-only.

Commit

Permalink
fix(app) fix metric by container problem (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
deadc authored Oct 19, 2018
1 parent d5ec314 commit eee6933
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ def collect(self):
pod_container_mem = container['usage']['memory']
pod_container_mem = pod_container_mem.translate(str.maketrans('', '', string.ascii_letters))

metrics_pods_mem.add_sample('kube_metrics_server_pods_mem', value=int(pod_container_mem), labels={ 'pod_name': pod_name, 'pod_namespace': pod_namespace, 'pod_container_name': pod_container_name })
metrics_pods_cpu.add_sample('kube_metrics_server_pods_cpu', value=int(pod_container_cpu), labels={ 'pod_name': pod_name, 'pod_namespace': pod_namespace, 'pod_container_name': pod_container_name })
metrics_pods_mem.add_sample('kube_metrics_server_pods_mem', value=int(pod_container_mem), labels={ 'pod_name': pod_name, 'pod_namespace': pod_namespace, 'pod_container_name': pod_container_name })
metrics_pods_cpu.add_sample('kube_metrics_server_pods_cpu', value=int(pod_container_cpu), labels={ 'pod_name': pod_name, 'pod_namespace': pod_namespace, 'pod_container_name': pod_container_name })

yield metrics_pods_mem
yield metrics_pods_cpu
Expand Down
2 changes: 1 addition & 1 deletion deploy/deployment-metrics-server-exporter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
serviceAccountName: metrics-server-exporter
containers:
- name: metrics-server-exporter
image: vivareal/metrics-server-exporter:v0.0.3
image: vivareal/metrics-server-exporter:v0.0.4
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8000
Expand Down

0 comments on commit eee6933

Please sign in to comment.