timdaman / check_docker

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

Version check for arm images #72

Open Virsacer opened 4 years ago

Virsacer commented 4 years ago

When checking the image-version on a raspberry pi it does not work:

root@RASPI2 ~ $ docker pull pihole/pihole
Using default tag: latest
latest: Pulling from pihole/pihole
Digest: sha256:abdddfb266ddd8e0591f97203ad11fd8dc33f2542187223f20ff18862b76bfbb
Status: Image is up to date for pihole/pihole:latest
docker.io/pihole/pihole:latest
root@RASPI2 ~ $
root@RASPI2 ~ $ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
pihole/pihole       latest              4d43d29c9890        3 days ago          301MB
root@RASPI2 ~ $
root@RASPI2 ~ $ /etc/nagios/check_docker.py --version
CRITICAL: PiHole's version does not match registry
root@RASPI2 ~ $

When I do the same on a amd64 system it shows different image-id and works without problems:

root@Ubuntu ~ $ docker pull pihole/pihole
Using default tag: latest
latest: Pulling from pihole/pihole
Digest: sha256:abdddfb266ddd8e0591f97203ad11fd8dc33f2542187223f20ff18862b76bfbb
Status: Image is up to date for pihole/pihole:latest
docker.io/pihole/pihole:latest
root@Ubuntu ~ $
root@Ubuntu ~ $ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
pihole/pihole       latest              4642d275ab73        3 days ago          296MB
root@Ubuntu ~ $
root@Ubuntu ~ $ /etc/nagios/check_docker.py --version
OK: PiHole's version matches registry
root@Ubuntu ~ $
MarcusCaepio commented 3 years ago

Hi @timdaman I can confirm this. I also get a crit alarm on my raspi although I have the latest image.