Help with MSSQL_Health_Check

This board serves as an open discussion and support collaboration point for Nagios XI. NOTE: Nagios XI customers should use the Customer Support forum to obtain expedited support.

Help with MSSQL_Health_Check

Postby Katkota » Tue Aug 13, 2019 8:47 pm

Hello folks;
I'm trying to get mssql_health_check plugin to work on my CentOS 7 server and installed the plugin as well as freetds.conf but no matter what i do every time i run the command it returns the following:
Code: Select all
./check_mssql_health -v --mode cpu-busy --hostname servername --username nagios --password xxxxxx

CRITICAL - connection could not be established within 15 seconds

I tried to change from servername to hostname and also used IP address and no matter what i do it always gives the same critical error with no explanation of what's going on.

i added the following to freetds.conf:

# A typical Microsoft server
Code: Select all
[servername]
        host=server IP
        port = 1433
        tds version = 8.0


Any idea or help would be greatly appreciated
Katkota
 
Posts: 3
Joined: Tue Aug 13, 2019 8:33 pm

Re: Help with MSSQL_Health_Check

Postby mbellerue » Wed Aug 14, 2019 9:34 am

Katkota wrote:
Code: Select all
./check_mssql_health -v --mode cpu-busy --hostname servername --username nagios --password xxxxxx

CRITICAL - connection could not be established within 15 seconds


Does the command actually take about 15 seconds to run, or does it just return immediately? If it just returns immediately, there may be something preventing it from connecting, though I would expect a different error message if that were the case. If it's taking about 15 seconds to run, then it's just timing out when connecting to the database.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
mbellerue
 
Posts: 375
Joined: Fri Jul 12, 2019 11:10 am

Re: Help with MSSQL_Health_Check

Postby Katkota » Thu Aug 15, 2019 1:00 am

It actually takes 15 seconds before it responds
Katkota
 
Posts: 3
Joined: Tue Aug 13, 2019 8:33 pm

Re: Help with MSSQL_Health_Check

Postby mbellerue » Thu Aug 15, 2019 9:14 am

One thing that you could try is providing a known wrong password. That should kick you out almost immediately. That would tell me that the plugin is actually reaching SQL Server, and SQL Server is processing the login properly. If it still takes 15 seconds to try to process, then is it possible that SQL Server is busy enough that processing logins is backed up 15+ seconds? Unfortunately it doesn't look like there's a verbose option or a timeout option on this plugin.

What about the SQL Server side? Do the logs in SQL Server show any sign of the plugin's connection attempt?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
mbellerue
 
Posts: 375
Joined: Fri Jul 12, 2019 11:10 am

Re: Help with MSSQL_Health_Check

Postby Katkota » Thu Aug 15, 2019 11:25 pm

I did try that already by typing the wrong password but the command still took 15 seconds to give the same error so i don't think it's getting that far.
i have not looked on the SQL server side because i did not honestly think the command is even making it to the SQL server.

Any other ideas? this is going on for a while now and i'm hoping anyone can help
Katkota
 
Posts: 3
Joined: Tue Aug 13, 2019 8:33 pm

Re: Help with MSSQL_Health_Check

Postby mbellerue » Fri Aug 16, 2019 10:14 am

If presenting the wrong password also takes 15 seconds, then I completely agree, it's probably not making it to the SQL Server. Is your Nagios install monitoring anything else on the same host where SQL Server is running? Can you ping that host from your Nagios server?

Do you know if SQL Server is running on the default port of 1433?
The next hiccup I could see would be a firewall running on the Windows host. Could it be set to allow access to SQL Server only from specific hosts, or a subnet that your Nagios install is not part of?

Also, you say this has been going on for a while. Was it working previously and just stopped?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
mbellerue
 
Posts: 375
Joined: Fri Jul 12, 2019 11:10 am


Return to Nagios XI

Who is online

Users browsing this forum: solarmon and 22 guests