Page 3 of 4
Re: MSSQL Database Wizard not working
Posted: Tue Dec 20, 2011 12:34 pm
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....
Re: MSSQL Database Wizard not working
Posted: Tue Dec 20, 2011 2:30 pm
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
Re: MSSQL Database Wizard not working
Posted: Tue Dec 20, 2011 2:47 pm
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.
Re: MSSQL Database Wizard not working
Posted: Tue Dec 20, 2011 3:04 pm
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.
Re: MSSQL Database Wizard not working
Posted: Tue Dec 20, 2011 3:16 pm
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
Re: MSSQL Database Wizard not working
Posted: Tue Dec 20, 2011 5:42 pm
by ordwaycenter
No bueno.
Re: MSSQL Database Wizard not working
Posted: Wed Dec 21, 2011 4:15 pm
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
Re: MSSQL Database Wizard not working
Posted: Wed Dec 21, 2011 5:54 pm
by ordwaycenter
Thanks for the new plugin, but I still get the same error message.
Re: MSSQL Database Wizard not working
Posted: Tue Dec 27, 2011 10:36 am
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
Re: MSSQL Database Wizard not working
Posted: Tue Dec 27, 2011 11:19 am
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