This check monitors SAP HANA 2.0, SPS 2 through the Datadog Agent.
The SAP HANA check is included in the Datadog Agent package. To use this integration, you need to manually install the hdbcli library.
For Unix:
sudo -Hu dd-agent /opt/datadog-agent/embedded/bin/pip install hdbcli==2.21.28
For Windows:
"C:\Program Files\Datadog\Datadog Agent\embedded<PYTHON_MAJOR_VERSION>\python.exe" -m pip install hdbcli==2.21.28
To query certain views, specific privileges must be granted to the chosen HANA monitoring user. For more information, see Granting privileges.
To learn how to set the port number for HANA tenant, single-tenant, and system databases, see the Connect to SAP documentation.
-
Connect to the system database and run the following command to create a user:
CREATE RESTRICTED USER <USER> PASSWORD <PASSWORD>;
-
Run the following command to allow the user to connect to the system:
ALTER USER <USER> ENABLE CLIENT CONNECT;
-
(optional) To avoid service interruption you may want to make the password long-lived:
ALTER USER <USER> DISABLE PASSWORD LIFETIME;
-
Run the following command to create a monitoring role (named
DD_MONITOR
for these examples):CREATE ROLE DD_MONITOR;
-
Run the following command to grant read-only access to all system views:
GRANT CATALOG READ TO DD_MONITOR;
-
Then run the following commands to grant select privileges on each system view:
GRANT SELECT ON SYS.M_DATABASE TO DD_MONITOR; GRANT SELECT ON SYS.M_DATABASES TO DD_MONITOR; GRANT SELECT ON SYS_DATABASES.M_BACKUP_PROGRESS TO DD_MONITOR; GRANT SELECT ON SYS_DATABASES.M_CONNECTIONS TO DD_MONITOR; GRANT SELECT ON SYS_DATABASES.M_DISK_USAGE TO DD_MONITOR; GRANT SELECT ON SYS_DATABASES.M_LICENSES TO DD_MONITOR; GRANT SELECT ON SYS_DATABASES.M_RS_MEMORY TO DD_MONITOR; GRANT SELECT ON SYS_DATABASES.M_SERVICE_COMPONENT_MEMORY TO DD_MONITOR; GRANT SELECT ON SYS_DATABASES.M_SERVICE_MEMORY TO DD_MONITOR; GRANT SELECT ON SYS_DATABASES.M_SERVICE_STATISTICS TO DD_MONITOR; GRANT SELECT ON SYS_DATABASES.M_VOLUME_IO_TOTAL_STATISTICS TO DD_MONITOR;
-
Finally, run the following command to assign the monitoring role to the desired user:
GRANT DD_MONITOR TO <USER>;
-
Edit the
sap_hana.d/conf.yaml
file, in theconf.d/
folder at the root of your Agent's configuration directory to start collecting your sap_hana performance data. See the sample sap_hana.d/conf.yaml for all available configuration options.
-
In your SAP HANA database, to make sure you can read audit logs, run the following command:
GRANT AUDIT READ TO DD_MONITOR; GRANT SELECT ON SYS.AUDIT_LOG TO DD_MONITOR
-
Collecting logs is disabled by default in the Datadog Agent. Enable it in
datadog.yaml
:logs_enabled: true
-
Add this configuration block to your
sap_hana.d/conf.yaml
file to start collecting your SAP HANA logs, adjusting theservice
value to configure them for your environment:logs: - type: integration source: sap_hana service: sap_hana
See the sample sap_hana.d/conf.yaml for all available configuration options.
Run the Agent's status subcommand and look for sap_hana
under the Checks section.
See metadata.csv for a list of metrics provided by this integration.
SAP HANA does not include any events.
See service_checks.json for a list of service checks provided by this integration.
Need help? Contact Datadog support.