Monitor SQL Server from Nagios
Instructions from Nagios website:
URL: http://www.nagios.org/faqs/viewfaq.php?faq_id=156
The above link states that ” ….
So here’s what I’ve done to have a way to connect to both SQL 7 and SQL 2000:
1. Download and install freetds from http://www.freetds.org.
2. Download and install sqsh from http://www.sqsh.org.
3. export SYBASE=/usr/local/freetds (or where ever your freetds is installed)
Now you can use sqsh to connect to your MS SQL
“.
Some more points to note in order to make the installation an easier task …
* It works with SQL Server 2005 in addition to SQL Server 7, SQL Server 2000.
* How to install freetds?
1. As the first step, download FreeTDS from http://www.freetds.org/ and make a build from the source
2. To build FreeTDS execute the following commands from the folder where FreeTDS is extracted
$ ./configure –prefix=/usr/local/freetds
$ make
$ make install
3. For making the SQL Server related settings, open /usr/local/freetds/etc/freetds.conf and add a section for the server you’re using.
# Configuration example for SQL server
[SQL_EXAMPLE]
host = 192.168.1.102
port = 2025
tds version = 8.0
* How to install sqsh on Ubuntu?
$apt-get install sqsh
Working solution with minimal checks
Check http://www.daveclayton.info/2007/07/checking-sql-server-with-nagios-for.html