File "/usr/local/nagios/libexec/check_mssql_server.py", line 464, in
main()
File "/usr/local/nagios/libexec/check_mssql_server.py", line 430, in main
execute_query(mssql, options, host)
File "/usr/local/nagios/libexec/check_mssql_server.py", line 443, in execute_query
mssql_query.do(mssql)
File "/usr/local/nagios/libexec/check_mssql_server.py", line 283, in do
self.calculate_result()
File "/usr/local/nagios/libexec/check_mssql_server.py", line 292, in calculate_result
self.result = (float(self.query_result[0]) / self.query_result[1]) * self.modifier
ZeroDivisionError: float division
I see this only on one service. The others seem to work correctly.
rpm -qi pymssql
Name : pymssql Relocations: (not relocatable)
Version : 1.0.2 Vendor: Fedora Project
Release : 4.el6 Build Date: Sat 19 Mar 2011 07:13:35 PM CET
Install Date: Wed 10 Oct 2012 02:08:58 AM CEST Build Host: x86-17.phx2.fedoraproject.org
Group : Development/Languages Source RPM: pymssql-1.0.2-4.el6.src.rpm
Size : 127535 License: LGPLv2+
Signature : RSA/8, Sun 20 Mar 2011 01:56:09 PM CET, Key ID 3b49df2a0608b895
Packager : Fedora Project
URL : http://pymssql.sourceforge.net/
Summary : A simple database interface to MS-SQL for Python
Description :
pymssql is the Python language extension module that provides access to
Microsoft SQL Servers from Python scripts. It is compliant with Python
DB-API 2.0 Specification.
The check is throwing an exception divide by zero. Could you double check the to make sure you are using the correct IP address, and correct credentials. Can you run the following command and show the output?
(No output on stdout) stderr: Traceback (most recent call last):
File "/usr/local/nagios/libexec/check_mssql_server.py", line 464, in
main()
File "/usr/local/nagios/libexec/check_mssql_server.py", line 430, in main
execute_query(mssql, options, host)
File "/usr/local/nagios/libexec/check_mssql_server.py", line 443, in execute_query
mssql_query.do(mssql)
File "/usr/local/nagios/libexec/check_mssql_server.py", line 283, in do
self.calculate_result()
File "/usr/local/nagios/libexec/check_mssql_server.py", line 292, in calculate_result
self.result = (float(self.query_result[0]) / self.query_result[1]) * self.modifier
ZeroDivisionError: float division
Willem, go to Home->Service Detail, click on the "problem" service->Configure->Re-configure this service, and show us what you have in the "Monitor the service with this command ..." field.
Be sure to check out our Knowledgebase for helpful articles and solutions!
I'm not sure if you were comparing the same check -- one was with --averagewait, and the other was with --activetrans. Could you retry the CLI with the --averagewait on the server that failed.
It seems to work fine from cli:
Code: Select all
/usr/local/nagios/libexec/check_mssql_database.py -H gensaptherthtrhr0 -U 'nagiosql' -P 'O6eSyyuvxS' -T 'EXP' -I EXP --activetrans
OK: Active Transactions is 0.0|log_file_usage=0.0;;;;