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 »

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?
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 »

Looks like the port is 1166. I tried including that in the command and it made no difference.

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 »

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?
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 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
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 »

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
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 »

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

Post 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?
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 »

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
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 »

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
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 »

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
Locked