Do we need to install Pre-requisites for monitoring MS SQL

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

Do we need to install Pre-requisites for monitoring MS SQL

Post by MSPk »

Hi,

Do we need to install Pre-requisites for monitoring MS SQL DB's for the new version of nagios (2012R1.8) as i see that the plugins check_mssql_ser, DB, Health and the MS SQL config wizards are already installed.
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: Do we need to install Pre-requisites for monitoring MS S

Post by yancy »

MSPk,

I believe TDS and the other pre-reqs should be installed by default. Are you having issues monitoring MSSQL?

Thanks,

-Yancy
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

Re: Do we need to install Pre-requisites for monitoring MS S

Post by MSPk »

I haven't tried yet...I have setup a new server for one of our clients and I already see these plugins and configwizards as against our earlier implementation, hence wanted to check before i try to monitor any of the parameters.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Do we need to install Pre-requisites for monitoring MS S

Post by slansing »

Yes these pre-req's should be installed by default with all XI 2012 installations. Let us know if you run into any bumps!
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

Re: Do we need to install Pre-requisites for monitoring MS S

Post by MSPk »

I guess these pre-requisites are already installed as I tried to run through the doc and in all cases YUM has come out with a msg saying the latest version is already installed.

I have tried to configure parameters for one of the SQL DB's and it failed - gave a (null) as the status message.

I have tried running the query manually from the nagios server and below are the results.

./check_mssql_database.py -H ipaddress -U username -P password -T instance -p 1433 --time2connect -w 20 -c 30

DB-Lib error message 20009, severity 9:
Unable to connect: Adaptive Server is unavailable or does not exist
Net-Lib error during Connection refused Error 111 - Connection refused

we have another instance on this server configured on a different port and that returns the below error

./check_mssql_database.py -H ipaddress -U username -P password -T instance -p 1601 --time2connect -w 20 -c 30

SQL Server message 18452, severity 14, state 1, line 1:
Login failed for user 'username'. The user is not associated with a trusted SQL Server connection.
DB-Lib error message 18452, severity 14:
General SQL Server error: Check messages from the SQL Server
DB-Lib error message 20002, severity 9:
Adaptive Server connection failed


I have checked with my DB admin and they have confirmed that they dont see any thing on SQL server logs.

Also, the server uses windows authentication and doesnt require a seperate SQL authentication and the account we use has sysadmin permissions.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Do we need to install Pre-requisites for monitoring MS S

Post by slansing »

Is the username that of a valid user with MSSQL privileges? The user must have these or the query will not work. In addition keep in mind that you can use either a "Instance" definition, or the port, you cannot use both as this will fail as well.
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

Re: Do we need to install Pre-requisites for monitoring MS S

Post by MSPk »

ya, i'm quite sure that the user has the privilages (atleast that what the team has confirmed)

are you suggesting that we use either -T or -p not both?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Do we need to install Pre-requisites for monitoring MS S

Post by slansing »

You will need a table name "-T" but you can only have either "-p" for port, or "-I" for instance name.
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

Re: Do we need to install Pre-requisites for monitoring MS S

Post by MSPk »

ok, I'm using only -p at the moment, so that should be fine I guess..!!
Have we come across these error messages before?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Do we need to install Pre-requisites for monitoring MS S

Post by slansing »

Ahh I made a mistake here, apparently with this plugin you cannot use a port, you must only use the instance name. Make sure you are defining a "-I" I noticed above you noted using '-T instance name' when -T must be used for the table name you wish to query.

Try running your command in this fashion:

Code: Select all

./check_mssql_database.py -H ipaddress -U username -P password -T tablename -I instancename --time2connect -w 20 -c 30 
Be sure to add your own information for ipaddress, username, password, tablename, and instance
The usage guidelines for the plugin are as follows:

Code: Select all

Usage: check_mssql_database.py -H hostname -U user -P password -T table --mode

Options:
  -h, --help            show this help message and exit

  Required Options:
    -H HOSTNAME, --hostname=HOSTNAME
                        Specify MSSQL Server Address
    -U USER, --user=USER
                        Specify MSSQL User Name
    -P PASSWORD, --password=PASSWORD
                        Specify MSSQL Password
    -T TABLE, --table=TABLE
                        Specify MSSQL Table

  Threshold Options:
    -I INSTANCE, --instance=INSTANCE
                        Specify instance
    -p PORT, --port=PORT
                        Specify port
    -w WARNING, --warning=WARNING
                        Specify min:max threshold
    -c CRITICAL, --critical=CRITICAL
                        Specify min:max threshold

  Mode Options:
    --datasize          Check size of database
    --logfileusage      Check Log File Usage
    --activetrans       Check Active Transactions
    --transpsec         Check Transactions/Sec
    --logcachehit       Check Log Cache Hit Ratio
    --time2connect      Check Time to Connect [DEFAULT IF NONE GIVEN]
    --loggrowths        Check Log Growths
    --logshrinks        Check Log Shrinks
    --logtruncs         Check Log Truncations
    --logwait           Check Log Flush Wait Times
    --logflushes        Check Log Flushes/Sec
We're looking into the Wizard as it may be that the port field should be removed since it is not in use with this plugin at all.
Locked