MSSQL Database Wizard not working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ordwaycenter
Posts: 37
Joined: Tue Dec 06, 2011 2:42 pm

MSSQL Database Wizard not working

Post by ordwaycenter »

Hi,

I ran the MSSQL Database wizard and all my services have a status of "null". I tried running ./check_mssql_database.py from the command line and all I can get is "Unable to access SQL Server". I've tried variations of username with [email protected] and domain\username, etc. I'm not sure how I would put my specific servername in there as MSSQL has it as "SERVER\SQLNAME". Would the host be IP.ADDRESS\SQLNAME or would I put it with the table as SQLNAME\TABLE? The error message is not very helpful in telling me what's wrong.

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 »

Dumont,

I believe the instructions for that particular plugin are found here:
http://exchange.nagios.org/directory/Pl ... ts/details

The server is specified with the -H parameter
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 »

Thanks for the reply. I found the right terminology for what I'm talking about. It's the server "instance". Where do you put the instance name?

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 »

Dumont,

I believe the instance name goes in the -T flag

Can you give that a try?
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 »

-T is the table, which is different from the Instance.
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 »

While is is marked table in the usage, it refer's to the database.

When running the wizard, on the first page it asks for the database which defaults to master.
This populates the -T arg.

Also, going back to your beginning question, you ran the MSSQL Database wizard, the server IP should go in the Address field right on the first page, along with the mssql username, password and database name to monitor.
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 »

There's three things here in the equation, but Nagios only has a spot for two of them.

Host - yes
Instance - nope
Database - yes

When I login to the SQL management on my server, I have to choose SERVERNAME\INSTANCE in addition to putting in my username and password. Then inside the instance, I have a production, staging, and testing database. Nagios has no place to put in the INSTANCE name. The script itself (running from the command line) has no place for the "instance" either.

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 »

Here's the command we want to try:

Code: Select all

cd /usr/local/nagios/libexec
./check_mssql_database.py -H IP_ADDRESS -U MSSQL_USER -P MSSQL_PASS -T master --time2connect
Obviously changing IP_ADDRESS, MSSQL_USER and MSSQL_PASS to those that apply for your MSSQL server.

If this succeeds, let's change master to be the name of the database you want to monitor.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
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 »

ordwaycenter wrote: Host - yes
Instance - nope
Database - yes
When you say instance, are you running multiple MSSQL servers on multiple ports?

The check makes a call to an host on the default port of 1433 or you can specify a different port with the -p flag
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 »

That's what I was already doing. It says "Unable to access SQL Server".

As far as multiple servers, it's really just that one. I don't know why it had to be set up with an instance...I didn't set it up. Nevertheless, there's just the one instance. But there's nowhere to give the script the name of the instance.

Thanks,
Dumont
Locked