Closed TheCry closed 2 years ago
Hi Sascha,
thanks for your feedback. I did not run into this particular edge-case on my systems yet. This should be an easy fix. Could you help me understand what causes the NET IO stats to show "--".
Is it
EXPOSE
statementpodman run
-command without any mapped ports (-p
-parameter)It would probably be helpful to know the output of the following commands on your system
podman system info
podman stats test_container --no-stream --format "{{.Name}},{{.ID}},{{.CPUPerc}},{{.MemUsage}},{{.NetIO}},{{.BlockIO}},{{.PIDs}}"
Regards Mauno
Hi Mauno,
Here the infos you need
podman stats test_container --no-stream --format "{{.Name}},{{.ID}},{{.CPUPerc}},{{.MemUsage}},{{.NetIO}},{{.BlockIO}},{{.PIDs}}"
Output
test_container,b5808b6f2ab5,1.06%,23.65MB / 10.26GB,-- / --,46.24MB / 458.8kB,1
It is a container running under podman. I'm responsible for the monitoring and my skill in podman are not the best :) But this container has no mapped ports
I was able to replicate the problem on my systems.
Could you check/verify if the version at https://github.com/m-erhardt/check-container-stats/blob/fix-podman-empty-netio-stats/check_container_stats_podman.py works for you as well?
Hi Mauno, thanks for the fix. It works perfect. Regards Sascha
Hi, Your script is working fine, but i've a problem with the perdata of the net usage One container has not net usage and the out is like this
I'd find out the problem in the code is here
Is it possible to extend the script, if "--/--" appears in the output, to set it to "0"? Or a new argument "no-usage" to set the variable to "0"? Regards Sascha