Skip to content

Configuration

This section details the configuration and optimization of the SAP HANA plugin.

Plugin Options

The following options are available for the SAP HANA plugin.

System.Path

Plugins.SAPHANA.System.Path — Path to the external plugin executable.
Mandatory: yes
Default value:


CallTimeout

Plugins.SAPHANA.CallTimeout — The maximum time in seconds for waiting when a request has to be executed.
Mandatory: no
Limits: 1-30
Default value: Global timeout


Timeout

Plugins.SAPHANA.Timeout — The maximum time in seconds for waiting when a connection has to be established.
Mandatory: no
Limits: 1-30
Default value: Global timeout


KeepAlive

Plugins.SAPHANA.KeepAlive — Time in seconds for waiting before unused connections will be closed.
Mandatory: no
Limits: 60-900
Default value: 300


Uri

Plugins.SAPHANA.Default.Uri
Plugins.SAPHANA.Sessions.<SessionName>.Uri
The URI to connect to. If specified in a session, it overrides the default value.
Mandatory: no
Range: Must match URI format; supported schemas: hdb.
Default value:


Username

Plugins.SAPHANA.Default.Username
Plugins.SAPHANA.Sessions.<SessionName>.Username
Username for the connection. If specified in a session, it overrides the default value.
Mandatory: no
Range: Must match SAP HANA username.
Default value:


Password

Plugins.SAPHANA.Default.Password
Plugins.SAPHANA.Sessions.<SessionName>.Password
Password for the connection. If specified in a session, it overrides the default value.
Mandatory: no
Range: Must match password format.
Default value:


Database

Plugins.SAPHANA.Default.Database
Plugins.SAPHANA.Sessions.<SessionName>.Database
Database for the connection. If specified in a session, it overrides the default value.
Mandatory: no
Default value:


TLSRootCAFile

Plugins.SAPHANA.Default.TLSRootCAFile
Plugins.SAPHANA.Sessions.<SessionName>.TLSRootCAFile
Full pathname of a file containing the top-level CA(s) certificate for peer certificate verification. If specified in a session, it overrides the default value.
Mandatory: no
Default value:


TLSServerName

Plugins.SAPHANA.Default.TLSServerName
Plugins.SAPHANA.Sessions.<SessionName>.TLSServerName
TLS hostname used to connect to HANA cloud connection proxy which is using SNI. If specified in a session, it overrides the default value.
Mandatory: no
Default value:


TLSInsecureSkipVerify

Plugins.SAPHANA.Default.TLSInsecureSkipVerify
Plugins.SAPHANA.Sessions.<SessionName>.TLSInsecureSkipVerify
Disable server's certificate chain and hostname verification. If specified in a session, it overrides the default value.
Mandatory: no
Default value:


LicenseKey

Plugins.SAPHANA.LicenseKey — License key to unlock all features. If not provided, the plugin runs in "demo" mode.
Mandatory: yes
Default value:


CustomQueriesPath

Plugins.SAPHANA.CustomQueriesPath — Full pathname of a directory containing *.sql files with custom queries.
Mandatory: no
Default value:


Named Sessions

Named sessions allow you to group connection settings (URI, credentials, database and TLS) and reference them in item keys instead of passing individual parameters. This is the recommended way to manage multiple SAP HANA connections securely.

To define a named session, add the parameters to the plugin configuration file:

Plugins.SAPHANA.Sessions.Prod.Uri=hdb://192.168.1.50:30015
Plugins.SAPHANA.Sessions.Prod.Username=ZABBIX
Plugins.SAPHANA.Sessions.Prod.Password=secret_password

Once defined, the session name can be used as the first parameter in item keys: sap.hana.db.ping[Prod]

Named session parameters override Default parameters. If a parameter is not defined in a session, the corresponding Default parameter will be used.

License Activation

A license key is required to activate premium features such as Custom Queries and Low-level discovery (LLD) of tenants. Without a key, the plugin operates in demo mode, providing access only to basic features.

Internet Connection

Subscription-based licenses require an internet connection for activation.

To activate your license, add the following line to your plugin configuration file:

Plugins.SAPHANA.LicenseKey=<license-key>

Alternatively, use this command to append it automatically:

echo 'Plugins.SAPHANA.LicenseKey=<license-key>' | sudo tee -a '/etc/zabbix/zabbix_agent2.d/plugins.d/saphana.conf'

Restart the Zabbix Agent 2 service to apply the changes:

sudo systemctl restart zabbix-agent2

Finally, verify the license status:

zabbix_agent2 -t 'sap.hana.plugin.license'

Custom Queries

License Required

Custom SQL query execution is available for licensed installations.

To enable custom queries, set the path to your .sql files:

Plugins.SAPHANA.CustomQueriesPath=/path/to/sql

Any .sql file placed in this directory can then be executed using the item key sap.hana.custom.query by providing a valid connection URI, credentials and the file name (without the .sql extension).

For instance the following file /path/to/sql/current_database.sql:

SELECT CURRENT_DATABASE() "current database" FROM DUMMY

can be executed with the monitoring key:

sap.hana.custom.query["hdb://<host>:<port>","<user>","<pass>","<db>","current_database"]

You can even pass dynamic parameters to the sql script, for instance with file /path/to/sql/dir/with_parameters.sql:

SELECT $1, $2 FROM DUMMY

you would configure the following monitoring key:

sap.hana.custom.query["hdb://<hostname>:<port>","<user>","<pass>","<db>","with_parameters","A","B"]