MSSQL Database Wizard not working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: MSSQL Database Wizard not working

Post by scottwilkerson »

After digging around a little more I found this:
http://support.nagios.com/wiki/index.ph ... ck_Command

Can we try this:

Code: Select all

./check_mssql_database.py -H SERVER\\$$INSTANCE -U MSSQL_USER -P MSSQL_PASS -T master --time2connect
That's \\$$ between server and instance. Hopefully the instance name doesn't have a space in it too....
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
ordwaycenter
Posts: 37
Joined: Tue Dec 06, 2011 2:42 pm

Re: MSSQL Database Wizard not working

Post by ordwaycenter »

Hi Scott, thanks for continuing to try things. That did not work, unfortunately. Looking at the page you referenced, it seems like the SERVER\\$$INSTANCE is meant to go in the nagios configuration command (under core config manager). Aren't those $$ referring to arguments? Plus, it says that's for the check_nt command.

Is there a different way that would work straight into the check_mssql_database.py command from the console command line?

Thanks,
Dumont
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: MSSQL Database Wizard not working

Post by scottwilkerson »

Well to be honest, I'm kind of grabbing at straws...

This is what should work

Code: Select all

./check_mssql_database.py -H <HOSTNAME_OR_IP> -p 1166 -U MSSQL_USER -P MSSQL_PASS -T master --time2connect
Provided that the instance is in fact mapped to port 1166 and the user/password combination you are providing is allowed to access the master database.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
ordwaycenter
Posts: 37
Joined: Tue Dec 06, 2011 2:42 pm

Re: MSSQL Database Wizard not working

Post by ordwaycenter »

I did notice that when trying to connect with Windows 7 ODBC, I have to use server\instance and also 1166. Test succeeds. Don't know why nagios won't do it.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: MSSQL Database Wizard not working

Post by scottwilkerson »

Again, throwing darts....

If you have to use both on the ODBC, maybe the default port has been changed on this SQL server.

We could try

Code: Select all

./check_mssql_database.py -H <HOSTNAME_OR_IP>\\<INSTANCE> -p 1166 -U MSSQL_USER -P MSSQL_PASS -T master --time2connect
or

Code: Select all

./check_mssql_database.py -H <HOSTNAME_OR_IP>\<INSTANCE> -p 1166 -U MSSQL_USER -P MSSQL_PASS -T master --time2connect
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
ordwaycenter
Posts: 37
Joined: Tue Dec 06, 2011 2:42 pm

Re: MSSQL Database Wizard not working

Post by ordwaycenter »

No bueno.
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: MSSQL Database Wizard not working

Post by nscott »

ordway,

There are some bugs in the Linux distro of ODBC with having trouble connecting to non-default instances of MSSQL. to work around that I've altered the plugin, give this a swing

I attached a modified version of the plugin that I'm hoping we can get working on your install and then I will upgrade our wizard with it. So download the attached tar.gz and untar it, chmod +x the new plugin and then run the plugin like so:

./check_mssql_database_update.py -H <HOSTNAME_OR_IP> -I <INSTANCE> -p 1166 -U MSSQL_USER -P MSSQL_PASS -T master --time2connect
You do not have the required permissions to view the files attached to this post.
Nicholas Scott
Former Nagios employee
ordwaycenter
Posts: 37
Joined: Tue Dec 06, 2011 2:42 pm

Re: MSSQL Database Wizard not working

Post by ordwaycenter »

Thanks for the new plugin, but I still get the same error message.
ordwaycenter
Posts: 37
Joined: Tue Dec 06, 2011 2:42 pm

Re: MSSQL Database Wizard not working

Post by ordwaycenter »

Interesting...

So I tried the new script WITHOUT specifying the instance name (but I still included the right port number). That's the only way it works. Weird. Thanks!

Dumont
ordwaycenter
Posts: 37
Joined: Tue Dec 06, 2011 2:42 pm

Re: MSSQL Database Wizard not working

Post by ordwaycenter »

And yet for both SQL servers, if I try to do --activetrans or whatever else, I get the error message "CRITICAL:Can access server but cannot query".

Thanks,
Dumont
Locked