Page 1 of 1

Nagios plugins failing for Python 3

Posted: Wed Oct 23, 2024 10:38 am
by montr3245
I am running into issues where certain Nagios plugins are breaking (e.g., check_mongodb.py) for Python 3. Is there a list somewhere or plan forward for plugins that don’t currently work with Python 3 for Nagios XI? I am mainly referring to plugins that are used when creating new checks via the Nagios XI configuration wizards.

Re: Nagios plugins failing for Python 3

Posted: Wed Oct 23, 2024 3:22 pm
by jmichaelson
I am unaware of any lists detailing incompatibilities with Python 3 and Nagios plugins.

That said, could you provide some details as to the nature of your environment (e.g., Linux distribution and version, Nagios XI version), as well as what the plugin is doing under Python 3?

Re: Nagios plugins failing for Python 3

Posted: Thu Oct 24, 2024 1:18 am
by kg2857
Maybe check /usr/bin/python* (or wherever it is) to see if python 2 is still around.

Re: Nagios plugins failing for Python 3

Posted: Mon Oct 28, 2024 11:24 am
by DoubleDoubleA
Hi @montr3245,

Thanks for reporting check_mongodb.py. Definitely the version we have been shipping breaks for python3. The authors provide a later version that appears from basic initial testing to support python3 https://github.com/mzupan/nagios-plugin ... mongodb.py.

I will update that in what we distribute. In the mean time, you could

Code: Select all

mv check_mongodb.py check_mongodb.py.bak
vi check_mongodb.py
hit "i" to insert and right click to paste a clipboard-copied version of the plugin, then "<esc>:wq" to save, and test if that works on your system.

Aaron