NagiosXI version: 2024R1.2
OS: CentOS9
Issue: MSSQL monitoring throws the following error when trying to connect to any SQL database/server on the network:
ERROR: [run_check] CRITICAL: Could not connect to odbc:Driver=FreeTDS:Server=xx.xx.xx.xx:Port=1433:dbname=master:charset=UTF8 as sa (Exception: SQLSTATE[08001] SQLDriverConnect: 0 [FreeTDS][SQL Server]Unable to connect to data source)
What I have tried:
-Confirmed odbc and mssql install with "yum install php-odbc" and "yum install php-mssql"
-Tried running the plugin command manually on the Nagios terminal but it comes up with the same error
-Confirmed firewall rules are in place that are recommended for port 1433
-Disabled firewall on targeted VM
-TCP/IP protocol Enabled on SQL server settings
-I am able to ping the database from the Nagios server
-Confirmed the password and username to access the database is correct
Is there some configuration for TDS or ODBC drivers that I need to do or missed?
Thanks
MSSQL Monitoring Issue
Re: MSSQL Monitoring Issue
Hi @tsample,
Are there any error logs on the MSSQL side for these connection attempts? Looking into this issue, I found other users talking about a similar error message and when drilling into the error details within their MSSQL UI, were able to determine it was an authentication method error. You may need to change the settings from "Windows Authentication" to whatever username/password combination you are trying to send from your Nagios server.
Are there any error logs on the MSSQL side for these connection attempts? Looking into this issue, I found other users talking about a similar error message and when drilling into the error details within their MSSQL UI, were able to determine it was an authentication method error. You may need to change the settings from "Windows Authentication" to whatever username/password combination you are trying to send from your Nagios server.
Re: MSSQL Monitoring Issue
No error logs on MSSQL side for connection attempts.
I did double check and the SQL server properties is set to use local and windows authentication. I tried doing both and still had the same issue.
I did double check and the SQL server properties is set to use local and windows authentication. I tried doing both and still had the same issue.
Re: MSSQL Monitoring Issue
Update: I escalated this to a support ticket. Bug report was generated for the MSSQL plugin as it doesn't work currently for 2012 SQL servers. 2016 SQL servers and above worked fine in our testing.
This thread can be closed.
This thread can be closed.
Re: MSSQL Monitoring Issue
Hi @tsample,
Is this a new install of XI or an upgrade? If upgrade and the plugin was working before, what version did you upgrade from?
Is this a new install of XI or an upgrade? If upgrade and the plugin was working before, what version did you upgrade from?
Please let us know if you have any other questions or concerns.
-Laura
-Laura
-
- Posts: 199
- Joined: Thu Feb 09, 2017 5:07 pm
Re: MSSQL Monitoring Issue
Hi @tsample,
I have been working on that ticket with a couple of others. We believe we have a solution which we expect support should be able to give you soon, and we will update the plugin in an upcoming release. Support will update you via the ticket.
As I understand it, the OpenTDS version changed between CentOS 7 and CentOS9, which changed the default version of TDS being used (from 7.0 to 7.4), which broke MSSQL 2012 connections on CentOS/RHEL 8/9. Unfortunately the config files don't get respected in the way you'd think, which is why changing them doesn't help. But when we pass the TDS version as an environment variable, it works.
I will lock this thread.
Aaron
I have been working on that ticket with a couple of others. We believe we have a solution which we expect support should be able to give you soon, and we will update the plugin in an upcoming release. Support will update you via the ticket.
As I understand it, the OpenTDS version changed between CentOS 7 and CentOS9, which changed the default version of TDS being used (from 7.0 to 7.4), which broke MSSQL 2012 connections on CentOS/RHEL 8/9. Unfortunately the config files don't get respected in the way you'd think, which is why changing them doesn't help. But when we pass the TDS version as an environment variable, it works.
I will lock this thread.
Aaron