zabbix监控sqlserver的过程详解
下面看下zabbix监控sqlserver。首先下载安装freetds
wget -c http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz tar -zxvf freetds-stable.tgz cd freetds-0.91/ ./configure --prefix=/usr/local/freetds --with-tdsver=8.0 --enable-msdblib make && makeinstall
FreeTDS默认安装在/usr/local/freetds目录当中,库文件在相应的lib目录下。
#vim /etc/ld.so.conf /usr/local/freetds/lib
配置生效
#ldconfig
修改/usr/local/freetds/etc/freetds.conf
全局配置版本号tds version为8.0
#vim /usr/local/freetds/etc/freetds.conf [global] # TDS protocol version ; tds version = 4.2 tds version = 8.0
连接测试
/usr/local/freetds/bin/tsql -H 192.168.31.158 -p 1433 -U sa -P 12345678
安装unixODBC unixODBC-devel
yum -y install unixODBC unixODBC-devel
修改配置
#vim /etc/odbcinst.ini [FreeTDS] Driver = /usr/local/freetds/lib/libtdsodbc.so.0
#vim /etc/odbc.ini [sql1] Driver = FreeTDS Server = 192.168.31.158 PORT = 1433 TDS_Version = 8.0 [sql2] Driver = FreeTDS Server = 192.168.31.159 PORT = 1433 TDS_Version = 8.0
测试连接
#isql -v sql1 sa 12345678 +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL>
选择模板
到此这篇关于zabbix监控sqlserver的文章就介绍到这了,更多相关zabbix监控sqlserver内容请搜索我们以前的文章或继续浏览下面的相关文章希望大家以后多多支持我们!
赞 (0)