You are here

check_sql_advanced doesn't support MS SQL Server

1 post / 0 new
bellis
bellis's picture
check_sql_advanced doesn't support MS SQL Server

Hi

I am trying to monitor the number of users logged in to our application.  The information I need is stored in our SQL Server database.

I basically need to run a query and found check_sql_advanced is provided out of the box from Opsview.

I've tried to connect to an MS SQL Server database using check_sql_advanced and it doesn't seem to support it.

Looking at the script there are data sources that support "Sybase" which searching around is supposed to be what you use to connect to SQL Server but according to the -t option the only supported values are Oracle, oracle, mysql and postgresql.

This is the error I get when running the script to connect to my database:

[nagios@qpp-ovslave-camb libexec]$ ./check_sql_advanced -H myDbServer -P 53146 -d myDB -t Sybase -q "select count(*) from myTable" -u myDbUser -p myDbPwd -w eq:1 -c eq:2 -e -D Using $hostname myDbServer Using $dbport port=53146 Using $query select count(*) from myTable Unsupported database type Sybase Using $dbname myDB Using $user myDbUser Using $password myDbPwd Using data source dbi:Sybase:server=myDbServer;database=myDB Can't connect to dbi:Sybase:server=myDbServer;database=myDB:

Surely there is something out there already that connections to SQL Server and allows you to run a query!?

Any ideas please?