-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem AWS Linux #38
Comments
Zabbix 3.4 |
So I haven't tested this on AWS Linux, however, I don't think that there is anything specific in Docker or Python for any Linux. At least there shouldn't be anything very specific. Can you run the following command and provide me the output? docker stats --no-stream=true I suspect that the lmem value might not be returned or it has been removed from the Docker version that you're using. It's quite possible that the Docker version is different in the newer OS versions and that there was a change. Please note that I do very seldom maintenance to this repo but I really appreciate your report. I do need to take some time and clean this code up for errors and recent changes to the tools. |
Yes of course. Follow: [root@xxx zabbix-docker]# docker stats --no-stream=true I noticed that it does not refresh for a long time, if it is the case I will try to adjust and send a pull request for you to analyze. Thank you very much for the quick response. |
Can you also include the output from the older servers? I'm wondering if the command has changed the output and the parser is now invalid. |
Actually, the command should be... docker stats --no-stream=true That's my bad. I haven't updated this particular code in 3 years. |
Argh... docker stats --no-stream=true CONTAINERID Where CONTAINERID is the docker container. In your example above it would be a4565f9c7a60. |
That container died, follow another one. [root@xxx zabbix-docker]# docker stats --no-stream=true 761b9e2e05ca The order must have changed even though we're getting the MB instead of%. |
[root@xxx ~]# docker stats --no-stream=true |
I think NAME is in the way. |
Notice that the headers have changed. CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS What has also changed is the way they represent memory values. In the newer example, the lmem is 100MiB while the older example shows 3.86 GiB for the lmem. This "space" change is what's confusing the parser I expect. I have to figure out how the code changes for this AND make sure that it doesn't break older versions. Thank you so much for the data. I really appreciate it. I will definitely let you know once I figure this out. |
Okay, I'll take a look at this too and I'll let you know if I find out. Thank you very much for the conversation. Hug. |
BTW, looking at the Python code and the data you provided, this problem exists on lines 57, 62, 67, and 72. If you manage to fix it, please post the change or create a pull request so that we can help others. This repo has a few watchers and forks. |
Hi!
I am having trouble running the script on new machines with AWS Linux, the old ones are running normally. Is there any change to make? Evidence follows.
[root@xxx zabbix-docker]# uname -a
Linux workers2 4.9.119-44.140.amzn1.x86_64 #1 SMP Fri Aug 10 19:17:29 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@xxx zabbix-docker]# docker --version
Docker version 17.12.1-ce, build 3dfb8343b139d6342acfd9975d7f1068b5b1c3d3
[root@xxx zabbix-docker]# /usr/local/bin/zabbix-docker-stats.py 4223c203b334 pmem 271MB
[root@xxx zabbix-docker]# /usr/local/bin/zabbix-docker-stats.py 4223c203b334 lmem
Traceback (most recent call last):
File "/usr/local/bin/zabbix-docker-stats.py", line 110, in
print optionskey
File "/usr/local/bin/zabbix-docker-stats.py", line 62, in lmem
value = size_optionspdata[1][0]
KeyError: '1'
The text was updated successfully, but these errors were encountered: