Installation¶
This guide provides the necessary steps to install and configure the Zabbix Agent 2 plugin for SAP HANA.
Repository Setup¶
Ensure the following prerequisite packages are installed:
Next, set the ZABBIX_RELEASE environment variable. This must match the version of your installed Zabbix Agent 2.
Then, configure the package repository:
curl -s https://apt.ravenlayer.com/public.gpg | sudo gpg --dearmor -o /usr/share/keyrings/ravenlayer.gpg
sudo tee /etc/apt/sources.list.d/ravenlayer.list > /dev/null << EOF
deb [signed-by=/usr/share/keyrings/ravenlayer.gpg] https://apt.ravenlayer.com/zabbix/${ZABBIX_RELEASE} any main
EOF
sudo apt update
curl -s https://yum.ravenlayer.com/RPM-GPG-KEY-RAVENLAYER | sudo tee /etc/pki/rpm-gpg/RPM-GPG-KEY-RAVENLAYER
sudo tee /etc/yum.repos.d/ravenlayer.repo > /dev/null << EOF
[ravenlayer]
name=RavenLayer Official Repository - \$basearch
baseurl=https://yum.ravenlayer.com/zabbix/${ZABBIX_RELEASE}/rhel/\$releasever/\$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-RAVENLAYER
EOF
Plugin Installation¶
Once the repository is configured, the plugin can be installed with a single command:
After installation, the Zabbix Agent 2 service must be restarted:
Execute the plugin binary to confirm the installation:
Confirm that the Zabbix Agent 2 has successfully loaded the plugin and can access the metrics:
Database Setup¶
Create a restricted user for monitoring. The template description provides SQL statements that can be used to create the necessary user, role and grants.
CREATE RESTRICTED USER ZABBIX PASSWORD <PASSWORD> NO FORCE_FIRST_PASSWORD_CHANGE VALID FROM NOW UNTIL FOREVER AUTHORIZATION LOCAL;
ALTER USER ZABBIX ENABLE CLIENT CONNECT;
CREATE ROLE ZABBIX_MONITORING;
GRANT CATALOG READ TO ZABBIX_MONITORING;
/* see template description for full script */
GRANT SELECT ON DUMMY TO ZABBIX_MONITORING;
GRANT ZABBIX_MONITORING TO ZABBIX;
This configuration is required for the SYSTEMDB database and each tenant database.
XML Template Import¶
Download and import the XML templates into your Zabbix Server. The version you need depends on your Zabbix Server version:
- Zabbix 5.0 LTS
- Zabbix 5.2
- Zabbix 5.4
- Zabbix 6.0 LTS
- Zabbix 6.2
- Zabbix 6.4
- Zabbix 7.0 LTS
- Zabbix 7.2
- Zabbix 7.4
The XML file contains two different Zabbix templates:
Template DB SAP HANA by Zabbix agent 2Template DB SAP HANA Tenant by Zabbix agent 2
Only the first template should be linked to each monitored host. The second template will be applied automatically through Low-level discovery rules.
Zabbix Host Configuration¶
Assign the Template DB SAP HANA by Zabbix agent 2 monitoring template to the host and configure the following macros:
| Macro | Description | Default |
|---|---|---|
{$SAP.HANA.URI} |
Connection URI | hdb://localhost:30013 |
{$SAP.HANA.USER} |
Username | ZABBIX |
{$SAP.HANA.PASSWORD} |
Password |