Linuxfabrik / monitoring-plugins

220+ check plugins for Icinga and other Nagios-compatible monitoring applications. Each plugin is a standalone command line tool (written in Python) that provides a specific type of check.
https://linuxfabrik.ch
The Unlicense
220 stars 51 forks source link

pip-updates: Include- and exclude-property #646

Closed dorkmaneuver closed 1 year ago

dorkmaneuver commented 1 year ago

Is your feature request related to a problem? Please describe.

I am using graphite-web installed by pip. I monitor the virtual environment with your nice plugin. However, graphite-web depends on Django 3.0.14 and django-tagging 0.4., so I have to keep them on this version until graphite-web is updated.

Describe the solution you'd like

I could set warning/critical to "3" to not have a warning. But more elegant approach could be, to give it an include- and an exclude-property. Then I could ignore these packages, wait for others to update and if I see that graphite-web has an update, update these a well to their last supported version. This feature would be a bit more precise in the check. :)

Alternatives

No response

Additional context

No response

markuslf commented 1 year ago

Sounds reasonable. On which operating system do you use the plugin? Which Python and Pip version?

dorkmaneuver commented 1 year ago

Thanks! And sorry - it's a Debian 10, Python 3.7.3 and pip 23.0. :)

markuslf commented 1 year ago

I implemented a bunch of new parameters that allow you to control pip's update determination more precisely. --exclude is one of the most interesting for you, I guess. Greetings to Berlin - will we see each other at the next Icinga Camp 2023?

dorkmaneuver commented 1 year ago

Wow, Markus, great! I'm deeply impressed! Huge thanks and best wishes back to Zürich and yes, looking forward to see you at Icinga Camp 2023! Have a beautiful weekend!

dorkmaneuver commented 1 year ago

Just a short follow up: I got a "/bin/sh: 1: source: not found" as output. When I changed line 204 of the script and replaced "source" with a "." cmd = '. {} && {}'.format(args.VIRTUALENV, cmd) it worked as expected. Thanks for this excellent plugin!

markuslf commented 1 year ago

Changed it in https://github.com/Linuxfabrik/monitoring-plugins/commit/26a697cf96c803ab225ae6f08defbbbb2424fa59, thank you. :-)