You are here

check_sql_advanced doesn't support MS SQL Server

2 posts / 0 new
Last post
bellis's picture
check_sql_advanced doesn't support MS SQL Server


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?

Chris Cox's picture
The error received suggests

The error received suggests that the underlying perl module for the Sybase database driver weren't installed.  If this module is installed it is possible to use check_sql_advanced to query an MS SQL database.  On CentOS likely the following would resolve:-

yum install perl-DBD-Sybase-1.10-1.el6.rf.x86_64.rpm