MSSQL monitoring problem
MSSQL monitoring problem
Hello,
I'd like to share with you a problem I've encountered with nagiox XI when supervising MSSQL. If anyone can help me solve it, please let me know.
thank you in advance
ERROR: [run_check] CRITICAL: Could not connect to odbc:Driver=FreeTDS:Server=192.168.xx.xx\SQLSERVER:dbname=DataBase1:charset=UTF8 as nagxi (Exception: SQLSTATE[08001] SQLDriverConnect: 0 [FreeTDS][SQL Server]Unable to connect to data source)
I'd like to share with you a problem I've encountered with nagiox XI when supervising MSSQL. If anyone can help me solve it, please let me know.
thank you in advance
ERROR: [run_check] CRITICAL: Could not connect to odbc:Driver=FreeTDS:Server=192.168.xx.xx\SQLSERVER:dbname=DataBase1:charset=UTF8 as nagxi (Exception: SQLSTATE[08001] SQLDriverConnect: 0 [FreeTDS][SQL Server]Unable to connect to data source)
Re: MSSQL monitoring problem
Hi @amintay, thanks for reaching out.
You can run the plugins from the command line, to make it easier to debug.
First make sure the check_ping plugin works.
If you get output like this...
There is a network/firewall/Windows firewall issue.
If you get output like this...
Try running the MSSQL plugin.
If you get a response like this...
There is likely a SQLServer or Firewall configuration issue. For instance, is the TCP/IP protocol Enabled in the SQL Server Network Configuration | Protocols for MSSQLSERVER | TCP/IP?
This post may give you some ideas where to look for issues. viewtopic.php?p=345316#p345316
You should get a response like this, if the XI server can connect to your SQL Server.
You can run the plugins from the command line, to make it easier to debug.
First make sure the check_ping plugin works.
Code: Select all
/usr/local/nagios/libexec/check_ping -H <sqlname.domain.local> -w 10,2% -c 20,5%
If you get output like this...
Code: Select all
CRITICAL - Host Unreachable (<sqlname.domain.local>)
If you get output like this...
Code: Select all
PING OK - Packet loss = 0%, RTA = 0.08 ms|rta=0.078000ms;10.000000;20.000000;0.000000 pl=0%;2;5;0
Code: Select all
/usr/local/nagios/libexec/check_mssql_server.php -H <sqlhostname_or_ip> --checktype 'server' -U 'sa' -P '<your_password>' --perftype default -p 1433 --mode autoparamattempts --warning 100 --critical 200
Code: Select all
ERROR: [run_check] CRITICAL: Could not connect to odbc:Driver=FreeTDS;Server=192.168.255.251;Port=1433;dbname=master;charset=UTF8 as xi_sql_user (Exception: SQLSTATE[08S01] SQLDriverConnect: 20009 [FreeTDS][SQL Server]Unable to connect: Adaptive Server is unavailable or does not exist)
CRITICAL: Could not connect to odbc:Driver=FreeTDS;Server=192.168.255.251;Port=1433;dbname=master;charset=UTF8 as xi_sql_user (Exception: SQLSTATE[08S01] SQLDriverConnect: 20009 [FreeTDS][SQL Server]Unable to connect: Adaptive Server is unavailable or does not exist).
This post may give you some ideas where to look for issues. viewtopic.php?p=345316#p345316
You should get a response like this, if the XI server can connect to your SQL Server.
Code: Select all
OK: Auto-Param Attempts/sec is 0.008914/sec|autoparam_attempts=0.008914;100;200;;
Please let us know if you have any other questions or concerns.
-Laura
-Laura
Re: MSSQL monitoring problem
Hi Laura ,
thank you for your reply,
I ran the check_ping plugin and here's the result and I ran the MSSQL plugin and here's the result for firewall settings they are well added do you have any other ideas for solving this problem?
thank you.
thank you for your reply,
I ran the check_ping plugin and here's the result and I ran the MSSQL plugin and here's the result for firewall settings they are well added do you have any other ideas for solving this problem?
thank you.
You do not have the required permissions to view the files attached to this post.
Re: MSSQL monitoring problem
If you can ping the host and the port is open you have an odbc connection issue. Often a uname/pasword issue.
Re: MSSQL monitoring problem
hi,
Hello, I assure you that the user name and the password are correct.
Hello, I assure you that the user name and the password are correct.
Re: MSSQL monitoring problem
Hi @amintay,
How about enabling TCP/IP for SQL Server?
Enable TCP/IP in the SQL Server Configuration Manager
How about enabling TCP/IP for SQL Server?
Enable TCP/IP in the SQL Server Configuration Manager
Please let us know if you have any other questions or concerns.
-Laura
-Laura
Re: MSSQL monitoring problem
Hi Laura,
it's enable do I need to configure my centos server (nagios XI)?
thank you.
it's enable do I need to configure my centos server (nagios XI)?
thank you.
You do not have the required permissions to view the files attached to this post.
Re: MSSQL monitoring problem
hello again laura,
I wanted to share something with you still about this MSSQL problem. I searched on the internet for a plugin to check mssql developed in python and I think it worked.while monitoring using config wizard does not work ?????
I wanted to share something with you still about this MSSQL problem. I searched on the internet for a plugin to check mssql developed in python and I think it worked.while monitoring using config wizard does not work ?????
You do not have the required permissions to view the files attached to this post.
Re: MSSQL monitoring problem
Hi @amintay,
That is a very interesting result. It seems like something may not be setup correctly for the PHP plugin, since the Python one is working.
What version of CentOS are you using, what version of PHP, and what version of XI?
If you are willing to contact our support team directly, they could get to the bottom of this issue quickly. To contact support, open a ticket (case) at the Nagios Answer Hub.
That is a very interesting result. It seems like something may not be setup correctly for the PHP plugin, since the Python one is working.
What version of CentOS are you using, what version of PHP, and what version of XI?
If you are willing to contact our support team directly, they could get to the bottom of this issue quickly. To contact support, open a ticket (case) at the Nagios Answer Hub.
Please let us know if you have any other questions or concerns.
-Laura
-Laura
Re: MSSQL monitoring problem
Hi laura,
the centos version is CentOS Stream release 9
the php version is PHP 8.0.30 (cli) (built : Aug 3 2023 17:13:08) ( NTS gcc x86_64 )
Copyright (c) The PHP Group
Zend Engine v4.0.30, Copyright (c) Zend Technologies
with Zend OPcache v8.0.30, Copyright (c), by Zend Technologies
mssql version is 2017
version XI is full=5.11.3
I want to dig even deeper before opening a support ticket.
thanks.
the centos version is CentOS Stream release 9
the php version is PHP 8.0.30 (cli) (built : Aug 3 2023 17:13:08) ( NTS gcc x86_64 )
Copyright (c) The PHP Group
Zend Engine v4.0.30, Copyright (c) Zend Technologies
with Zend OPcache v8.0.30, Copyright (c), by Zend Technologies
mssql version is 2017
version XI is full=5.11.3
I want to dig even deeper before opening a support ticket.
thanks.