Page 1 of 5
Do we need to install Pre-requisites for monitoring MS SQL
Posted: Mon May 13, 2013 5:56 am
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.
Re: Do we need to install Pre-requisites for monitoring MS S
Posted: Mon May 13, 2013 9:51 am
by yancy
MSPk,
I believe TDS and the other pre-reqs should be installed by default. Are you having issues monitoring MSSQL?
Thanks,
-Yancy
Re: Do we need to install Pre-requisites for monitoring MS S
Posted: Mon May 13, 2013 11:50 am
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.
Re: Do we need to install Pre-requisites for monitoring MS S
Posted: Mon May 13, 2013 12:44 pm
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!
Re: Do we need to install Pre-requisites for monitoring MS S
Posted: Tue May 14, 2013 7:43 am
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.
Re: Do we need to install Pre-requisites for monitoring MS S
Posted: Tue May 14, 2013 9:52 am
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.
Re: Do we need to install Pre-requisites for monitoring MS S
Posted: Tue May 14, 2013 10:01 am
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?
Re: Do we need to install Pre-requisites for monitoring MS S
Posted: Tue May 14, 2013 10:26 am
by slansing
You will need a table name "-T" but you can only have either "-p" for port, or "-I" for instance name.
Re: Do we need to install Pre-requisites for monitoring MS S
Posted: Tue May 14, 2013 12:09 pm
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?
Re: Do we need to install Pre-requisites for monitoring MS S
Posted: Tue May 14, 2013 1:54 pm
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.