In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Principle: Connect SQL Server through ODBC, and send the data queried by SQL statement to zabbix server for analysis.
Brief description of configuration steps:
1. Install Freetds, unixODBC, unixODBC-devel on zabbix server to enable it to access SQL Server database.
2. Configure ODBC to access Sql Server database.
3. Custom SQL statements
4. Add item of monitoring database in zabbix management interface.
Operation process:
1, Install Freetds, unixODBC, unixODBC-devel on zabbix server
#yum install unixODBC unixODBC-devel
Note: freetds usually does not exist in yum source, need to download, compile and install
Baidu Cloud Address: pan.baidu.com/s/1cb09tW
#wget 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
#make install
2. Configure ODBC to access SQL Server database
a. Find the location of the libtdsodbc.so.0 driver
#locate libtdsodbc.so.0
If there is no locate command, install mlocate to execute
#yum install mlocate && updatedb
Find the file libtdsodbc.so.0 and copy its path to make a soft connection
#ln -s /usr/local/freetds/lib/libtdsodbc.so.0 /usr/lib64/libtdsodbc.so.0
b. Modify/etc/odbcinst.ini to add a line
#vim /etc/odbcinst.ini
[FreeTDS]
Driver = /usr/lib64/libtdsodbc.so.0
c. Configure odbc connection information
#vim/etc/odbc.ini #Write the following configuration file
[DBNAME] #defines an identifier name
Driver = FreeTDS
Server = [SQL Server IP]
PORT = 1433
TDS_Version = 8.0
d. Connection database test
#isql -v DBNAME (defined in odbc.ini) Database Account Database Password
Connect to the database and execute SQL tests
Custom SQL statements vary according to requirements.
4. Add item of monitoring database in zabbix management interface.
Find the SQL Server main sentence being monitored and add item
Data collected by zabbix. This is consistent with the SQL query above.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.