MongoDB monitoring issue
Posted: Sat May 17, 2025 8:45 am
Hi Team,
Following the Nagios upgrade from 5.7.8 to the latest version on Ubuntu, all services and hosts are functioning as expected, except for the MongoDB monitoring script (/usr/local/nagios/libexec/check_mongodb.py). This is due to Python version incompatibility. The old Nagios server (CentOS 7) uses Python 2.17, while the new server uses Python 3.12.3. Please provide an updated script compatible with the latest Nagios version and Python 3.12.3 that will allow us to monitor all MongoDB statistics as before.
Refer the below screenshot
(No output on stdout) stderr: File "/usr/local/nagios/libexec/check_mongodb.py", line 57
Following the Nagios upgrade from 5.7.8 to the latest version on Ubuntu, all services and hosts are functioning as expected, except for the MongoDB monitoring script (/usr/local/nagios/libexec/check_mongodb.py). This is due to Python version incompatibility. The old Nagios server (CentOS 7) uses Python 2.17, while the new server uses Python 3.12.3. Please provide an updated script compatible with the latest Nagios version and Python 3.12.3 that will allow us to monitor all MongoDB statistics as before.
Refer the below screenshot
(No output on stdout) stderr: File "/usr/local/nagios/libexec/check_mongodb.py", line 57