目录
开始安装
安装HANA CLIENT
说起数据库监控,无非是两种方式:
(1)通过Zabbix Agent2进行本地采集;
(2)通过ODBC接口方式;
? 于是我就从这2个方向进行可行性分析,Agent2的方式第一个被我pass掉了,ODBC的方式是我选择的方案。
这里需要用到SAP HANA的驱动,驱动需要到SAP官方去下载,可以联系你们的SAP bassis去帮你们下,这里我就不提供了;
- 组件名称:hanaclient-2.8.22-linux-x64.tar.gz
开始安装
-
安装HANA CLIENT [root@王铁刚 client]# ./hdbinst
SAP HANA Database Client installation kit detected.
SAP HANA Lifecycle Management - Client Installation 2.8.22.1621352674
*********************************************************************
Enter Installation Path [/usr/sap/hdbclient]:
Checking installation...
Preparing package 'Product Manifest'...
Preparing package 'SQLDBC'...
Preparing package 'REPOTOOLS'...
Preparing package 'Python DB API'...
Preparing package 'Python Machine Learning Client'...
Preparing package 'ODBC'...
Preparing package 'R Machine Learning Client'...
Preparing package 'JDBC'...
Preparing package 'HALM Client'...
Preparing package 'DBCAPI'...
Preparing package 'node.js Client'...
Preparing package 'golang Client'...
Preparing package 'Ruby Client'...
Preparing package 'Code Examples'...
Preparing package '.NET Core'...
Preparing package 'Environment Script'...
Preparing package 'Client Installer'...
Preparing package 'Calculation View API'...
Installing SAP HANA Database Client to /usr/sap/hdbclient...
Installing package 'Product Manifest'...
Installing package 'SQLDBC'...
Installing package 'REPOTOOLS'...
Installing package 'Python DB API'...
Installing package 'Python Machine Learning Client'...
Installing package 'ODBC'...
Installing package 'R Machine Learning Client'...
Installing package 'JDBC'...
Installing package 'HALM Client'...
Installing package 'DBCAPI'...
Installing package 'node.js Client'...
Installing package 'golang Client'...
Installing package 'Ruby Client'...
Installing package 'Code Examples'...
Installing package '.NET Core'...
Installing package 'Environment Script'...
Installing package 'Client Installer'...
Installing package 'Calculation View API'...
Installation done
Log file written to '/var/tmp/hdb_client_2021-07-27_10.30.59_28179/hdbinst_client.log' on host 'SHDCSV-TZBXAP1'.
- 找到libodbcHDB.so文件
[root@王铁刚 client]# find / -name libodbcHDB.so
find: ‘/proc/28533’: No such file or directory
find: ‘/proc/28534’: No such file or directory
/usr/sap/hdbclient/libodbcHDB.so
vi /etc/odbcinst.ini
[<Server_Name>]
driver=<path>/libodbcHDB.so
serverNode=<endpoint>:<port>
encrypt=Yes
DESCRIPTION=<HANA-ODBC-Data-Source>
sslTrustStore=<certificate string>;
可监控指标表描述如下:
查询select * from SYS.M_MONITORS
测试连通性:
[root@王铁刚 ~]# isql -v HANA_Express CLOUDMONITOR Shana.202107
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL>
如果你对我的文章感兴趣,请加入我们的QQ群:Zabbix研究院(QQ群:1107902496)
|