timdaman / check_docker

Nagios plugin to check docker containers
GNU General Public License v3.0
152 stars 60 forks source link

Got ValueError Exception on memory check #84

Closed cadirol closed 2 years ago

cadirol commented 2 years ago

check_docker Version:

$ /usr/local/monitoring-plugins/libexec/check_docker -V
check_docker 2.2.2

OS:

$ cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Python Version:

$ python3 -V
Python 3.9.2

The Command:

$ /usr/local/monitoring-plugins/libexec/check_docker --memory 80:90%
Traceback (most recent call last):
  File "/usr/local/monitoring-plugins/libexec/check_docker", line 983, in main
    perform_checks(argv[1:])
  File "/usr/local/monitoring-plugins/libexec/check_docker", line 966, in perform_checks
    check_memory(container, parse_thresholds(args.memory, units_required=False))
  File "/usr/local/monitoring-plugins/libexec/check_docker", line 201, in parse_thresholds
    crit = int(parts.popleft())
ValueError: invalid literal for int() with base 10: '90%'
UNKNOWN: Exception raised during check': ValueError("invalid literal for int() with base 10: '90%'")

Thank you very much to keep check_docker alive!

cadirol commented 2 years ago

Got a typo in my command!
... --memory 80:90:%

But at the end i got #81 as well