Discussion:
[Check_mk (english)] bug report docker_node_disk_usage
l***@daimler.com
2018-11-05 08:20:28 UTC
Permalink
Hello,

I have a bug report concerning the docker_node_disk_usage check.

The output of "docker system df" with older versions for docker does not include "0" in the line build cache (see [1] & [2] difference in the 4th line).
The script currently expects the 0s to be there. I have attached the tracebackand the error message [3].

I think you need to add a single if before line 188 to set the value to "0" if it is empty.

Kind regards,
Lukas Beerens

[1] actual output
TYPE TOTAL ACTIVE SIZE RECLAIMABLE
Images 10 1 855.4MB 786.6MB (91%)
Containers 1 1 0B 0B
Local Volumes 3 1 33.56MB 33.56MB (100%)
Build Cache 0B 0B

[2] expected output
TYPE TOTAL ACTIVE SIZE RECLAIMABLE
Images 16 5 2.532GB 1.86GB (73%)
Containers 5 5 950B 0B (0%)
Local Volumes 0 0 0B 0B
Build Cache 0 0 0B 0B

[3] error
Traceback:
File "/omd/sites/site/lib/python/cmk_base/data_sources/host_sections.py", line 260, in _update_with_parse_function
return parse_function(section_content)

File "/omd/sites/site/share/check_mk/checks/docker.include", line 188, in parse_docker_system_df
line[key] = type_(v)

Error:
ValueError("invalid literal for int() with base 10: ''",) File "/omd/sites/kst4330/lib/python/cmk_base/data_sources/host_sections.py", line 260, in _update_with_parse_function return parse_function(section_content) File "/omd/sites/kst4330/share/check_mk/checks/docker.include", line 188, in parse_docker_system_df line[key] = type_(v)


#MFGTSS / Mit freundlichen Grüßen / Kind regards

Lukas Beerens
Integrated CarIT Operations

Daimler TSS GmbH
Wilhelm-Runge-Straße 11
89081 Ulm/Germany

http://www.daimler-tss.de

Daimler TSS GmbH
Sitz und Registergericht/Domicile and Register Court: Ulm, HRB-Nr./Commercial Register No.: 3844
Geschäftsführung/Management: Martin Haselbach (Vorsitzender/Chairperson), Steffen Bäuerle


If you are not the addressee, please inform us immediately that you have received this e-mail by mistake, and delete it. We thank you for your support.
Loading...