timdaman / check_docker

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

Add check for image age #58

Closed martialblog closed 5 years ago

martialblog commented 5 years ago

Hi,

I added a new check for the module:

Since Docker images should regularly be rebuilt to ensure the latest (security) fixes, I think this will be a nice feature.

Let me know if you require some changes to the PR, I'll take care of it.

Cheers, Markus

martialblog commented 5 years ago

Also, let me say: great plugin! The code and the tests were super easy to work with

martialblog commented 5 years ago

So the Python 3.6 and 3.7 Build are alright. However there are issues with the 3.4 and 3.5 Build unrelated to my changes.

3.5: Could not find a version that matches tox<3.7,==3.7.0,>=2.0,>=3.5 (from -r /tmp/pipenv-zc1pul9a-requirements/pipenv-mvdzdsug-constraints.txt (line 3))

Updating the tox version might resolve that.

3.4: Has some issues with pytest_random_order... I'll try to find out what's going on here

martialblog commented 5 years ago

Seems as pytest-random-order==1.0.4 requires: Python >=3.5.0

https://github.com/jbasko/pytest-random-order/releases/tag/v1.0.0

Cheers, Markus

martialblog commented 5 years ago

This might help: https://github.com/martialblog/check_docker/tree/fix-travis

timdaman commented 5 years ago

Very nice patch. Glad to hear the test worked for you. I will look into the test failures on Travis and Tox. Looks like you already made some progress on finding the solution, thanks.

timdaman commented 5 years ago

Can you rebase off my freshen branch. https://github.com/timdaman/check_docker/tree/freshen I think that may resolve all your test failures. 🤞 If it works for you I will merge it into master so you can have a clean PR.

martialblog commented 5 years ago

Hi Tim, the Travis build works now. The codeclimate checks fail... but I think the checks need some configuration anyways. If you want I can have a look at that.

timdaman commented 5 years ago

Don't worry about CodeClimate. I cleared the alert.