MSSQL Database Wizard not working
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: MSSQL Database Wizard not working
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?
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?
-
ordwaycenter
- Posts: 37
- Joined: Tue Dec 06, 2011 2:42 pm
Re: MSSQL Database Wizard not working
Looks like the port is 1166. I tried including that in the command and it made no difference.
Thanks,
Dumont
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
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?
Additionally, are you sure their isn't any firewall blocking connections from remote machines on that port?
-
ordwaycenter
- Posts: 37
- Joined: Tue Dec 06, 2011 2:42 pm
Re: MSSQL Database Wizard not working
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
So I'm pretty sure the issue here is the instance. Is there not a way to specify that with this command?
Dumont
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: MSSQL Database Wizard not working
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
or
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
Code: Select all
./check_mssql_database.py -H '<hostname>\\<instance>' -U MSSQL_USER -P MSSQL_PASS -T master --time2connect
-
ordwaycenter
- Posts: 37
- Joined: Tue Dec 06, 2011 2:42 pm
Re: MSSQL Database Wizard not working
Same error message for both versions.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: MSSQL Database Wizard not working
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?
-
ordwaycenter
- Posts: 37
- Joined: Tue Dec 06, 2011 2:42 pm
Re: MSSQL Database Wizard not working
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
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
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-
ordwaycenter
- Posts: 37
- Joined: Tue Dec 06, 2011 2:42 pm
Re: MSSQL Database Wizard not working
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
Thanks,
Dumont