Configuring SAP HANA Connector
Import the HEAL SSL certificate into the keystore to configure the connector.
Follow the steps below to configure the SAP HANA Connector:
1. Import the HEAL certificate into the keystore.
a. Generate the SSL certificate from the server using the following command:
echo -n | openssl s_client -connect '<SERVERIP>:<PORT>' | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' >
/tmp/<servicename>.crt
Replace the following:
- <SERVERIP>:<PORT>: The IP and PORT of GRPC/HAPROXY.
b. Import the certificate into the Java cacerts keystore using the following command:
keytool -import -trustcacerts -keystore
<JAVA_HOME>/jre/lib/security/cacerts -storepass changeit -noprompt - alias <servicename> -file /tmp/<servicename>.crt
c. Make a copy of your cacerts file to the config directory:
cp <JAVA_HOME>/jre/lib/security/cacerts <Connector Build path>/config/
This is needed to push KPIs to HEAL over SSL.
2. Update values of fields from insert statements in the SQL file for the following tables.
- adapter_chain_repository
- worker_parameters
- a1_logscan_heal_instance_mapper
- heal_kpis
- domain_to_heal_kpi_mappings
The following tables are part of the data adapter MySQL database.
a. The a1_logscan_heal_instance_mapper table:
| DB Column | Description |
|---|---|
| logscan_instance_name | Refer to the host column of the host_service_mapper table. |
| heal_agent_uid | The agent ID is mapped to the HANA instance in the HEAL server. |
| heal_instance_name | Name of the HANA instance in the HEAL server. |
b. adapter_chain_repository table:
| DB Column | Description |
|---|---|
| ID | Unique identifier of a row in the table. |
| name | Name of the SAP HANA repository. Do not modify. |
| class_path | Class name of the SAP HANA repository. Do not modify. |
| user_name | User name to connect to the SQL server. |
| password | Password to connect to the SQL server. |
| auto_reconnect | It can be true or false. The default value is true. Do not modify. If the value of this attribute is true, the Java module connects to the SQL server. |
| cpool_min_size | The minimum number of retries. This indicates the minimum number of times the Java module tries to connect to the SQL server till the connection succeeds. |
| cpool_max_size | The maximum number of retries. This indicates the maximum number of times the Java module tries to connect to the SQL server till the connection succeeds. |
| connection_url | The Java module connects to the SQL server through a JDBC connection. Specify the URL as follows:jdbc:mysql://<mysql server ip>:<mysql server port>/<SAPHANA DB name> For example: jdbc:mysql://127.0.0.1:3306/dataadapter_saphana |
c. domain_to_heal_kpi_mappings table:
| DB Column | Description |
|---|---|
| ID | Unique identifier of a row in the table. |
| domain | Indicates the domain of HANA KPI. |
| heal_kpi_id | Contains the value from the kpi_id column of the heal_kpis table. Refer to the heal_kpis table. |
| src_kpi_id | Contains the value from the kpi_id column of the hana_kpis table. Refer to the ID of the hana_kpis table. |
d. hana_kpi table:
| DB Column | Description |
|---|---|
| ID | Unique identifier of the row. |
| kpi_name | Name of the KPI. Do not modify. |
| kpi_identifier | Identifier of the KPI. Do not modify. |
| kpi_query_id | Refer to the query_id of the sql_file_path_mapper table. |
| is_group | 0 or 1. 0 — Specify 0 if the KPIs are non-group KPIs. 1 — Specify 1 if the KPIs are group KPIs. |
e. heal_kpis table:
| DB Column | Description |
|---|---|
| ID | Unique identifier of a row in the table. |
| kpi_id | HEAL KPI IDs. |
| kpi_name | HEAL KPI names. Refer to mst_kpi_details to get the HANA KPI name. |
| kpi_identifier | HEAL KPI identifier. Refer to SAP HANA OOB KPI Identifier to get the kpi_identifier. |
| is_group | By default, the value is 0. |
| group_name | By default, the value is empty. |
3. Adapter chain configuration: These parameters are set in the worker_parameters table for the SapHanaExtractor worker.
| Parameter | Key Example | Value Description |
|---|---|---|
| hana_repository | SapHanaKpiMaster | Named repository bean for the MySQL adapter DB. |
| sql_file_path | /opt/heal/ext-system-adapter/sql_file/ | Directory containing all HANA SQL files (must end with /). |
| connection_statistics | HANA_Connections_Statistics.sql | SQL file used during initialization to discover service ports. |
| url | jdbc:sap://%s/?databaseName=%s&encrypt=true&validateCertificate=false | HANA JDBC URL template (%s = endpoint, %s = db instance). |
| user | HEALTECH | HANA DB username. |
| password | <base64-password>== | HANA DB password (Base64-encoded). |
| hana_endpoint | 192.0.2.109:30015 | HANA host:port. |
| db_instance | HD4 | HANA database/tenant name. |
| query_date_format | MMM dd, yyyy, HH:mm:ss.SSS a | Date format injected into time-filtered queries. |
| hana_time_zone | PST | Timezone applied to query timestamps. |
Password Encoding: Passwords must be base64 encoded.
<password> → <base64-password>==
- SQL Files Reference: All SQL query files must be placed in the directory configured as sql_file_path.
The following files must be present:
| File | Used During | HANA System View |
|---|---|---|
| HANA_Connections_Statistics.sql | Initialization only (port discovery) | M_CONNECTION_STATISTICS, M_SERVICES |
| HANA_IndexSrv_Worload_Count.sql | Every extract cycle | M_LOAD_HISTORY_SERVICE |
| HANA_IndexSrv_Worload_DataProc.sql | Every extract cycle | M_LOAD_HISTORY_SERVICE |
| HANA_IndexSrv_Worload_RespTime.sql | Every extract cycle | M_LOAD_HISTORY_SERVICE |
| HANA_XSEngine_Worload_Count.sql | Every extract cycle | M_LOAD_HISTORY_SERVICE |
| HANA_XSEngine_Worload_DataProc.sql | Every extract cycle | M_LOAD_HISTORY_SERVICE |
| HANA_XSEngine_Worload_RespTime.sql | Every extract cycle | M_LOAD_HISTORY_SERVICE |
| NSE_Buffer.sql | Every extract cycle | SYS.M_BUFFER_CACHE_STATISTICS |
| HANA_Data_Schemas.sql | Every extract cycle | M_TABLE_PERSISTENCE_STATISTICS, M_CS_TABLES, M_RS_TABLES, M_RS_INDEXES |
SQL Query Filter Pattern (workload queries):
`WHERE TIME LIKE '?%' AND PORT LIKE '%s'`
`?` is replaced with the `from` timestamp at runtime
`s` is replaced with the last two digits of the service port (e.g., port `30003` → `03`)
For example:
30003 → 03
SAP HANA OOB KPI Identifier#
These are the HANA KPIs added as OOB in HEAL.
Get the KPI ID and name for these KPI identifiers and specify them in the heal_kpis table of the HANA DB.
IndexServer Workload Count (query_id = 1) – `M_LOAD_HISTORY_SERVICE`#
| KPI Identifier | Description |
|---|---|
| INDEXSERVER_CONNECTION_COUNT | Total active connections |
| INDEXSERVER_TRANSACTION_COUNT | Active transactions |
| INDEXSERVER_BLOCKED_TRANSACTION_COUNT | Blocked transactions |
| INDEXSERVER_STATEMENT_COUNT | Statements executed |
| INDEXSERVER_MVCC_VERSION_COUNT | MVCC version count |
| INDEXSERVER_PENDING_SESSION_COUNT | Pending sessions |
| INDEXSERVER_RECORD_LOCK_COUNT | Record lock count |
| INDEXSERVER_CS_READ_COUNT | Column store read count |
| INDEXSERVER_CS_WRITE_COUNT | Column store write count |
| INDEXSERVER_CS_MERGE_COUNT | Column store merge count |
| INDEXSERVER_CS_UNLOAD_COUNT | Column store unload count |
| INDEXSERVER_ACTIVE_THREAD_COUNT | Active threads |
| INDEXSERVER_WAITING_THREAD_COUNT | Waiting threads |
| INDEXSERVER_TOTAL_THREAD_COUNT | Total threads |
| INDEXSERVER_ACTIVE_SQL_EXECUTOR_COUNT | Active SQL executors |
| INDEXSERVER_WAITING_SQL_EXECUTOR_COUNT | Waiting for SQL executors |
| INDEXSERVER_TOTAL_SQL_EXECUTOR_COUNT | Total SQL executors |
| INDEXSERVER_MUTEX_COLLISION_COUNT | Mutex collision count |
| INDEXSERVER_READ_WRITE_LOCK_COLLISION_COUNT | Read/write lock collision count |
| INDEXSERVER_ADMISSION_CONTROL_ADMIT_COUNT | Admission control admit count |
| INDEXSERVER_ADMISSION_CONTROL_REJECT_COUNT | Admission control reject count |
| INDEXSERVER_ADMISSION_CONTROL_QUEUE_SIZE | Admission control queue size |
| INDEXSERVER_INTERNAL_CONNECTION_COUNT | Internal connections |
| INDEXSERVER_EXTERNAL_CONNECTION_COUNT | External connections |
| INDEXSERVER_IDLE_CONNECTION_COUNT | Idle connections |
| INDEXSERVER_INTERNAL_TRANSACTION_COUNT | Internal transactions |
| INDEXSERVER_EXTERNAL_TRANSACTION_COUNT | External transactions |
| INDEXSERVER_USER_TRANSACTION_COUNT | User-initiated transactions |
IndexServer Workload Data Processing (query_id = 3) – `M_LOAD_HISTORY_SERVICE`#
| KPI Identifier | Description |
|---|---|
| INDEXSERVER_DATA_WRITE_SIZE | Data written (MB) |
| INDEXSERVER_LOG_WRITE_SIZE | Log written (MB) |
| INDEXSERVER_DATA_READ_SIZE | Data read (MB) |
| INDEXSERVER_LOG_READ_SIZE | Log read (MB) |
| INDEXSERVER_DATA_BACKUP_WRITE_SIZE | Backup data written (MB) |
| INDEXSERVER_LOG_BACKUP_WRITE_SIZE | Backup log written (MB) |
IndexServer Workload Response Time (query_id = 4) – `M_LOAD_HISTORY_SERVICE`#
| KPI Identifier | Description |
|---|---|
| INDEXSERVER_DATA_WRITE_TIME | Data write time (avg) |
| INDEXSERVER_LOG_WRITE_TIME | Log write time (avg) |
| INDEXSERVER_DATA_READ_TIME | Data read time (avg) |
| INDEXSERVER_LOG_READ_TIME | Log read time (avg) |
| INDEXSERVER_DATA_BACKUP_WRITE_TIME | Backup data write time |
| INDEXSERVER_LOG_BACKUP_WRITE_TIME | Backup log write time |
| INDEXSERVER_ADMISSION_CONTROL_WAIT_TIME | Admission control wait time |
XSEngine Workload Count (query_id = 5) – `M_LOAD_HISTORY_SERVICE`#
Same 28 metrics as IndexServer Workload Count, but prefixed with `XSENGINE_`.
XSEngine Workload Data Processing (query_id = 6) – `M_LOAD_HISTORY_SERVICE`#
Same 6 metrics as IndexServer Data Processing, but prefixed with `XSENGINE_`.
XSEngine Workload Response Time (query_id = 7) – `M_LOAD_HISTORY_SERVICE`#
The same 7 metrics as IndexServer Response Time, but prefixed with `XSENGINE_`.
NSE Buffer (query_id = 8) – Group KPI –`SYS.M_BUFFER_CACHE_STATISTICS`#
| KPI Identifier | Sub-key | Description |
|---|---|---|
| Current_Size_in_GB | VOLUME_ID-<id> | Current NSE buffer size per volume (GB). |
| Max_Buffer_Size_in_GB | VOLUME_ID-<id> | Maximum NSE buffer size per volume (GB). |
Data Schema (query_id = 9) – Group KPI – `M_TABLE_PERSISTENCE_STATISTICS` etc.#
| KPI Identifier | Sub-key | Description |
|---|---|---|
| SIZE_GB | <schema_name>-TOTAL | Total disk size per schema (GB) per top table. |
| TOTAL_SIZE_GB | TOTAL_SIZE_GB-<table_name> | Total size of each large table across all schemas (GB). |
Creating Custom KPIs#
To monitor custom metrics (if any), create the metrics and category via the CC UI. Refer to the Control Center Guide.
Map dummy producer to the newly created custom KPIs.
a. host_service_mapper table (No need to update). The values will be auto-populated after the adapter is started.
| DB Column | Description |
|---|---|
| port | Port of the service (IndexServer and XsEngine). |
| host | The hostname of the server on which the HANA server is installed. |
| service_name | Service name (IndexServer and XsEngine). |
b. sql_file_path_mapper table:
| DB Column | Description |
|---|---|
| query_id | Unique identifier of the row. |
| File_name | Name of the query file. |
| File_path | Path of the query file. |
| Chain_id | Chain ID in which the data needs to be extracted for the query (minutes). |
| Service_name | The service name of the query to be executed. |
| query_status | 1 or 0. 1 — If the query is to be executed. 0 — Disable if you do not want to execute the query. |
c. Update the below query on the worker_parameters:
UPDATE `dataadapter_saphana`.`worker_parameters` SET `value` = '<JDBC URL to connect to HANA DB>' WHERE (`id` = '5');
UPDATE `dataadapter_saphana`.`worker_parameters` SET `value` = '<Username to connect to HANA DB>' WHERE (`id` = '6');
UPDATE `dataadapter_saphana`.`worker_parameters` SET `value` = '<Password to connect to HANA DB>' WHERE (`id` = '7');
Note:
The password should be in an encrypted format. Use Base64 encoding to encrypt the password.
UPDATE `dataadapter_saphana`.`worker_parameters` SET `value` = '<IP of the HANA DB>:<Port>' WHERE (`id` = '8');
UPDATE `dataadapter_saphana`.`worker_parameters` SET `value` = '<HANA DB instance>' WHERE (`id` = '9');
UPDATE `dataadapter_saphana`.`worker_parameters` SET `value` = '<HAProxy host name>' WHERE (`id` = '16');
UPDATE `dataadapter_saphana`.`worker_parameters` SET `value` = '<HAProxy port>' WHERE (`id` = '17');
Note:
If the adapter is not sending data through the specified HAproxy host and port, follow the below steps:
- Create the dummy hostname in vi /etc/hosts as “appnomic” in the server where the data-receiver service is running.
- Specify the data-receiver port as grpc- (11202 – Cross verify in the data receiver nomad file).
- Create the certificate in the Data receiver server using these host addresses and ports (refer the Import HEAL certificate to the Keystore).