Page 2 of 4
Re: MSSQL Database Wizard not working
Posted: Mon Dec 19, 2011 3:44 pm
by scottwilkerson
This may help find the port
http://benchmarkitconsulting.com/colin- ... ing-under/
Additionally, if it is running on the standard port (1433) are you sure that the MSSQL server allows connections on it's port from the server you have Nagios XI installed on?
Re: MSSQL Database Wizard not working
Posted: Mon Dec 19, 2011 4:15 pm
by ordwaycenter
Looks like the port is 1166. I tried including that in the command and it made no difference.
Thanks,
Dumont
Re: MSSQL Database Wizard not working
Posted: Mon Dec 19, 2011 4:45 pm
by scottwilkerson
Are you sure the MSSQL server allows connections from remote machines, specifically your Nagios XI?
Additionally, are you sure their isn't any firewall blocking connections from remote machines on that port?
Re: MSSQL Database Wizard not working
Posted: Mon Dec 19, 2011 5:16 pm
by ordwaycenter
I got the command to work on an entirely different server (soon-to-replace-the-current-server). Anyways, it doesn't have an instance, and the connection from the command line works fine.
So I'm pretty sure the issue here is the instance. Is there not a way to specify that with this command?
Dumont
Re: MSSQL Database Wizard not working
Posted: Mon Dec 19, 2011 5:38 pm
by scottwilkerson
Can I have you try the following:
Try either wrapping the <hostname>\<instance> in single quotes, or if that doesn't work, try adding an additional '\' so that the second backslash escapes correctly. '\' signals a line break in a shell command.
So
Code: Select all
./check_mssql_database.py -H '<hostname>\<instance>' -U MSSQL_USER -P MSSQL_PASS -T master --time2connect
or
Code: Select all
./check_mssql_database.py -H '<hostname>\\<instance>' -U MSSQL_USER -P MSSQL_PASS -T master --time2connect
Re: MSSQL Database Wizard not working
Posted: Mon Dec 19, 2011 5:56 pm
by ordwaycenter
Same error message for both versions.
Re: MSSQL Database Wizard not working
Posted: Mon Dec 19, 2011 6:40 pm
by scottwilkerson
Again I need to ask
Are you sure the MSSQL server allows connections from remote machines, specifically your Nagios XI?
Additionally, are you sure their isn't any firewall blocking connections from remote machines on that port?
Re: MSSQL Database Wizard not working
Posted: Tue Dec 20, 2011 10:11 am
by ordwaycenter
The MSSQL server allows connections from other machines - because our production software connects to it through port 1166. I've tried turning the firewall completely off and I still can't connect to it from Nagios command line.
Thanks,
Dumont
Re: MSSQL Database Wizard not working
Posted: Tue Dec 20, 2011 11:04 am
by scottwilkerson
I'm somewhat at a loss because you can connect to another database with the script, and other machines can connect to this server through port 1166, you really should be able to use the following command
Code: Select all
./check_mssql_database.py -H <HOSTNAME_OR_IP> -p 1166 -U MSSQL_USER -P MSSQL_PASS -T master --time2connect
Re: MSSQL Database Wizard not working
Posted: Tue Dec 20, 2011 11:07 am
by ordwaycenter
Yes, but the other server does not use the "instance" name. This one does. Is there any documentation on how to use an instance? I can't find any.
Thanks,
Dumont