There are more ways to check a MSSQL database from a Linux machine. This is my method for a Centos 5.5 server with Nagios 3.2.3.
# wget http://labs.consol.de/wp-content/uploads/2011/01/check_mssql_health-1.5.8.2.tar.gz
or a newer version
# wget http://labs.consol.de/download/shinken-nagios-plugins/check_mssql_health-1.5.9.3.tar.gz
# tar xvzf check_mssql_health-1.5.8.2.tar.gz
# cd check_mssql_health-1.5.8.2
# ./configure
# make
# make install
# yum install perl-DBD-Sybase.x86_64
# vi /etc/freetds.conf
[vcenter]
host = vcenter.r71.nl
port = 49209
tds version = 8.0
The vCenter MSSQL installation listens to port 49209, not the standard 1433 port.
Now add a Windows user without any special rights, I named it "Nagios".
# ./check_mssql_health --server rainier --username=vcenter\\nagios --password=******** --mode=connection-time
OK - 0.03 seconds to connect as VCENTER\nagios | connection_time=0.03;1;5
Leave a Reply