[root]@nagiosxi ~] $ cat /tmp/info.txt
# $Id: freetds.conf,v 1.12 2007/12/25 06:02:36 jklowden Exp $
#
# This file is installed by FreeTDS if no file by the same
# name is found in the installation directory.
#
# For information about the layout of this file and its settings,
# see the freetds.conf manpage "man freetds.conf".
# Global settings are overridden by those in a database
# server specific section
[global]
# TDS protocol version
; tds version = 4.2
# Whether to write a TDSDUMP file for diagnostic purposes
# (setting this to /tmp is insecure on a multi-user system)
; dump file = /tmp/freetds.log
; debug flags = 0xffff
# Command and connection timeouts
; timeout = 10
; connect timeout = 10
# If you get out-of-memory errors, it may mean that your client
# is trying to allocate a huge buffer for a TEXT field.
# Try setting 'text size' to a more reasonable limit
text size = 64512
# A typical Sybase server
[egServer50]
host = symachine.domain.com
port = 5000
tds version = 5.0
# A typical Microsoft server
[egServer70]
host = ntmachine.domain.com
port = 1433
tds version = 7.0
Updating it through the Admin > Manage Config Wizards did not work for some reason.
Download the file to your desktop, then in the XI GUI, go to the Admin > Manage Plugins menu.
Browse to the downloaded plugin and check the box called Convert line endings and upload the plugin.
Then see if that fixes the issue with that check.
Also, what version of Nagios XI are you running and what version of MSSQL is the remote server running?
Be sure to check out our Knowledgebase for helpful articles and solutions!
File "/usr/local/nagios/libexec/check_mssql_server.py", line 469, in <module>
main()
File "/usr/local/nagios/libexec/check_mssql_server.py", line 435, in main
execute_query(mssql, options, host)
File "/usr/local/nagios/libexec/check_mssql_server.py", line 448, in execute_query
mssql_query.do(mssql)
File "/usr/local/nagios/libexec/check_mssql_server.py", line 284, in do
self.run_on_connection(connection)
File "/usr/local/nagios/libexec/check_mssql_server.py", line 271, in run_on_connection
self.query_result = cur.fetchone()[0]
TypeError: 'NoneType' object is unsubscriptable
<type 'exceptions.TypeError'>
Caught unexpected error. This could be caused by your sysperfinfo not containing the proper entries for this query, and you may delete this service check.
Are you running the freepages option when you run the test?
If so, it will fail as newer versions on MSSQL do not have the Free Pages counter and was was removed in 2012.
Just a note that the issue is on SQL 2014 but here are other SQL 2014 servers that I am monitoring that doesn't bring up this error and they are not meant to be anything different in the configuration.
@mindspring , Are you able to manually query MySQL from your Nagios server?
Have you tried running a query using a different check_mysql plugin? I think you should have another one written in C instead of Python in libexec folder.
In your freetds file uncomment tds version line under global settings [global]
# TDS protocol version
; tds version = 4.2
And change it to tds version = 7.0
And you said you're able to query all other MySQL servers using the same plugin and the same command, right?
Finally, can you post the exact command you tried to run the last time so i can try to replicate this issue?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Thanks I made the tds change but it still complains. So the connection time responds but things like Deadlocks and Lock request, lock wait times and average wait times are coming up with that error.
I found the check_mssql php script but it just makes a connection. I can't see how to use this script to test the options above that are not working.
@mindspring, I'd like to see the exact commands you're running. Could you post them here? I spinned up MSSQL 2014 and so far all the commands from your original post worked fine. We need to see the exact syntax to be able to troubleshoot.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.