[实战]Zabbix监控SAP HANA数据库

目录

第一步:安装HANA CLIENT

第二步:找到libodbcHDB.so文件

第三步:ODBC配置如下:

第四步:SAP HANA监控指标TABLE信息描述

第五步:测试连通性


说起数据库监控,无非是两种方式:

(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 '王铁刚'.

第二步:找到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

第三步:ODBC配置如下:

vi /etc/odbcinst.ini
[]
driver=/libodbcHDB.so
serverNode=: 
encrypt=Yes
DESCRIPTION=
sslTrustStore=;

第四步:SAP HANA监控指标TABLE信息描述

可监控指标表描述如下:
查询select * from SYS.M_MONITORS

第五步:测试连通性

测试连通性:
[root@王铁刚 ~]# isql -v HANA_Express 帐号 密码
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> 

如果你对我的文章感兴趣,请加入我们的QQ群:Zabbix研究院(QQ群:1107902496)

你可能感兴趣的:(Zabbix,big,data,数据库,sap,zabbix)