Table of Contents
HANA merge statistics monitoring
This monitor is dedicated to the delta merge operations of the HANA column store tables. It raises an alarm when a merge takes too long, waits too long for resources or fails, with the cause of the failure read from the HANA error code. It also watches the tables whose disk size comes close to the indexserver memory limit, as such a table may no longer merge.
Note: the monitor reads M_DELTA_MERGE_STATISTICS for the merges, M_TABLE_PERSISTENCE_STATISTICS for the table disk sizes and M_SERVICE_MEMORY for the indexserver effective allocation limit. The delta store size and growth, and the automatic merge settings, are watched by the HANA delta storage monitor.
Prerequisites
- The monitoring user needs the
CATALOG READsystem privilege, included in theMONITORINGrole.
Configuration hints
- Use the two surveillance tables to adjust the monitoring settings:
- The merge table for long, waiting and failed merges
- The size ratio table for the tables too large compared to the memory limit
- The merges are read once per run and shared by all lines of the merge table. Each line only filters them, so adding a line does not add any load on the database.
- Each run reads the merges of type
MERGEandSPARSEthat ended between the start of the previous successful run and the start of this run, both rounded down to 5 minutes, or within the longest Period of the active lines when it is longer. HANA records a merge when it ends, so a long merge is read once it is over, even when it started before the previous run. At most the 5000 most recent merges are read. - Each partition of a partitioned table is evaluated on its own for the resource wait and the failed merges.
Global parameters
| Parameter | Default | Description |
|---|---|---|
| Send metadata | enabled | If enabled, the failed merges matched by the merge table are sent as metadata to the configured plugins/integrations. It can usually be retrieved as logs or tabular data within the corresponding integrations. Only the failed merges that need an action are sent: smart merge disabled, out of memory or internal error. Skipped merges are never sent. Each row carries the host, port, schema, table, partition, start time, merge type and motivation, failure category, HANA error codes and description, merge time, resource wait and whether the old main store is still in use. |
| Size ratio collection limit | 100 | Defines the maximum number of tables read for the size ratio, the largest disk size first. Only the tables reaching the lowest Max size ratio of the active lines are read. A line with Max size ratio at 0 makes the monitor read the largest tables whatever their ratio. |
| Ignore benign skips | enabled | If enabled, the merges skipped by HANA for a harmless reason are not counted as failed merges: codes 2480 (table already merging), 2481 (smart merge queued) and 2482 (delta empty). |
Merge table
| Parameter | Description |
|---|---|
| Active | Use this field to activate or deactivate a line of configuration. |
| Host | A filter to match only a given host. |
| Schema | A filter to match only the tables of a given schema. |
| Table | A filter to match only a given table. |
| Min failed merges | The number of failed merges of a table, after its last successful merge, within the period that raises the failed merge alarm. 0 and 1 alarm on the first failure. Default is 0. |
| Max resource wait (sec) | The threshold for the time a merge waited for resources, in seconds. A merge waiting at least this long breaches the line. Leave at 0 to disable this check. |
| Threshold (sec) | The threshold for the merge time, in seconds. A merge lasting at least this long breaches the line. Leave at 0 to disable this check. |
| Period (min) | How far back the merges are evaluated, in minutes. Leave at 0 to evaluate the merges ended since the previous run. A merge counts in the period when it ended in it. |
| Aggregate | If checked, one alarm per check gives the number of merges reaching the threshold. If not checked, one alarm is sent per merge. |
| Severity | The severity of the merge time and resource wait alarms. Disabled excludes the matched merges from the lines below. |
| Failed merge severity | The severity of the failed merge alarm. Disabled or Clear turns the failed merge check off for this line. |
| Auto clear | If checked, the alarm is cleared automatically once its condition is no longer met. |
| Alarm tag | A text used as a prefix of the alarm message of this line. |
| Alarm | If checked, this line of surveillance will be used for alarm generation. |
| Metric | If checked, the merge time and resource wait of each merge matched by the line are sent as metrics. No metric is sent when Aggregate is checked. |
Note: the lines are evaluated from top to bottom, and a merge can match several lines. A line with severity Disabled removes the merges it matches from the lines below it: put it first to exclude a schema or a table from a catch-all line.
Note: filters match any value containing the text, case insensitive. * matches any value and a leading ! excludes the values containing the text. To exclude several unrelated values, join them with +: !ZSTAGING+!ZTEMP. Do not use a comma for this: !ZSTAGING,!ZTEMP only excludes the first one.
Note: a failed merge counts only when no merge of the same table succeeded after it. A table that failed once and then merged again raises no alarm. To count more than one failure, set a Period longer than the schedule of the monitor.
Note: Threshold and Max resource wait support the severity syntax, for example G2W:300 W2M:900 for WARNING from 300 seconds and MAJOR from 900. The letters are G (clear), I (informational), W (warning), m (minor), M (major) and C (critical). With a plain number the alarm takes the Severity of the line. In aggregate mode the alarm takes the highest severity reached by a merge, and the message shows the lowest threshold reached.
Size ratio table
| Parameter | Description |
|---|---|
| Active | Use this field to activate or deactivate a line of configuration. |
| Schema | A filter to match only the tables of a given schema. |
| Table | A filter to match only a given table. |
| Max size ratio (%) | The threshold for the table disk size as a percent of the indexserver effective allocation limit. A table reaching this value breaches the line. Default is 50. At 0 the line raises no alarm, and with Metric checked it sends the metric of every table it matches. |
| Aggregate | If checked, one alarm per line gives the number of tables reaching the threshold. If not checked, one alarm is sent per table. |
| Severity | The severity of the alarm. Disabled excludes the matched tables from the lines below. |
| Auto clear | If checked, the alarm is cleared automatically once its condition is no longer met. |
| Alarm tag | A text used as a prefix of the alarm message of this line. |
| Alarm | If checked, this line of surveillance will be used for alarm generation. Default is checked. |
| Metric | If checked, each table matched by the line and reaching its threshold gets its size ratio metric. Default is checked. |
Note: the lines are evaluated from top to bottom, and a table can match several lines. A line with severity Disabled removes the tables it matches from the lines below it: put it first to exclude a schema or a table from a catch-all line.
Note: the size ratio threshold supports the severity syntax, for example G2W:50 W2M:70 for WARNING from 50% and MAJOR from 70%. The letters are G (clear), I (informational), W (warning), m (minor), M (major) and C (critical). In aggregate mode the alarm takes the highest severity reached by a table.
Note: Metric and Alarm are independent, and Aggregate only changes the alarm. A line with Metric checked and Alarm unchecked only sends metrics, so a line with a low threshold can feed the metrics while another line with a higher threshold raises the alarms. With the severity syntax, the metric is sent from the lowest threshold. A table matched by several lines is sent once.
Note: on lines saved before the Alarm and Metric columns existed, Alarm is checked and Metric takes the value of the former Send size ratio metrics option. That global option no longer exists.
Note: the disk size and the allocation limit are rounded to whole gigabytes, and the ratio to a whole percent.
Alarm content
- Without Aggregate, one merge time alarm is raised per table, and one resource wait alarm per table and partition. The message contains the value and the threshold reached, the table, the host and the start time of the merge:
Merge time is 420s (>=300s) for table SAPABAP1.ACDOCA on host hana01 at 2026-11-16 08:12:45Merge resource wait is 95s (>=60s) for table SAPABAP1.ACDOCA part 3 on host hana01 at 2026-11-16 08:12:45
- With Aggregate, one alarm is raised per line and check, with the number of merges and the filters of the line that are not
*:4 merge operation(s) over 300 s[SAPABAP1]2 merge operation(s) waited over 60 s[SAPABAP1]
- A failed merge alarm is raised per table and partition, with the number of failures, the window and the last failure. The last failure gives its category, the HANA error code and its description:
3 failed merges for SAPABAP1.ACDOCA on host hana01 in the last 60 min, last: RESOURCE 2484 out of memory at 2026-11-16 08:12:45
- The failure categories are:
CONFIG: smart merge disabled (2483), checksmart_merge_enabledRESOURCE: processing error or out of memory (2450, 2484), check the OOM dumps and the memoryERROR: any other code, check the indexserver tracesBENIGN_SKIP: table already merging, smart merge queued or delta empty (2480, 2481, 2482), only counted when Ignore benign skips is disabled
- A size ratio alarm is raised per table, or per line with Aggregate:
Disk used space of table SAPABAP1.ACDOCA is 62% of effective alloc memory size (40 GB vs 64 GB)3 tables (SAPABAP1.*) have disk used space over 50% of effective alloc memory size (64 GB)
- In integrations that show the metric of an alarm, an aggregate merge time alarm is reported under
MERGE_STATISTICS_TIMEand an aggregate resource wait alarm underMERGE_STATISTICS_WAIT_TIME_SEC.
Examples
Example 1
| Active | Host | Schema | Table | Min failed merges | Max resource wait (sec) | Threshold (sec) | Period (min) | Aggregate | Severity | Failed merge severity | Auto clear | Alarm tag | Alarm | Metric |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| true | * | * | * | 0 | 0 | G2W:300 W2M:900 | 0 | false | WARNING | MAJOR | true | true | false |
Effect: Sends a WARNING alarm for each table with a merge of 5 minutes or more since the previous run, raised to MAJOR from 15 minutes, and a MAJOR alarm for each table whose last merge failed with an error that needs an action.
Example 2
| Active | Host | Schema | Table | Min failed merges | Max resource wait (sec) | Threshold (sec) | Period (min) | Aggregate | Severity | Failed merge severity | Auto clear | Alarm tag | Alarm | Metric |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| true | * | ZSTAGING | * | 0 | 0 | 0 | 0 | true | Disabled | Disabled | true | true | false | |
| true | * | SAPABAP1 | * | 3 | 60 | 0 | 60 | true | WARNING | CRITICAL | true | MERGE | true | false |
Effect: The first line excludes the tables of schema ZSTAGING. The second line sends one WARNING alarm with the number of merges of schema SAPABAP1 that waited 60 seconds or more in the last hour, and a CRITICAL alarm for each table of SAPABAP1 with 3 failed merges or more in the last hour and no successful merge since.
Example 3
| Active | Schema | Table | Max size ratio (%) | Aggregate | Severity | Auto clear | Alarm tag | Alarm | Metric |
|---|---|---|---|---|---|---|---|---|---|
| true | * | * | G2W:50 W2M:70 | false | MAJOR | true | true | false |
Effect: Sends a WARNING alarm for each table whose disk size reaches 50% of the indexserver effective allocation limit, raised to MAJOR from 70%.
Example 4
| Active | Schema | Table | Max size ratio (%) | Aggregate | Severity | Auto clear | Alarm tag | Alarm | Metric |
|---|---|---|---|---|---|---|---|---|---|
| true | * | * | 10 | true | MAJOR | true | false | true | |
| true | * | * | 50 | true | MAJOR | true | true | false |
Effect: The first line sends the size ratio of each table reaching 10% of the indexserver effective allocation limit as a metric, without any alarm, so the growth of the large tables can be followed before they become a problem. The second line sends one MAJOR alarm with the number of tables reaching 50%.
Generated metrics
| metricId | metricUnit | metricTarget | metricDescription |
|---|---|---|---|
| MERGE_STATISTICS_TIME | Seconds | [HOST][TABLE][PARTITION] | Sends the time of each merge matched by a line with Metric checked. |
| MERGE_STATISTICS_WAIT_TIME_SEC | Seconds | [HOST][TABLE][PARTITION] | Sends the resource wait of each merge matched by a line with Metric checked. |
| MERGE_STATISTICS_TABLE_SIZE_RATIO | Percent | [TABLE] | Sends the table disk size as a percent of the indexserver effective allocation limit, for the tables selected by a line with Metric checked. |
Note: the TABLE target holds SCHEMA.TABLE. The PARTITION target is only present for a partition of a partitioned table.
Note: the merge metrics are only sent by a line with Metric checked and Aggregate unchecked, one value per merge. Without a table filter, a busy system sends many values per run.
Note: the size ratio metric is only sent for a table matched by a size ratio line with Metric checked and reaching the threshold of that line, among the tables read up to the Size ratio collection limit. A table excluded by a line with severity Disabled placed above gets no metric. A table below the threshold sends nothing, so a monitor built on this metric in an integration must treat missing data as normal.
Note: the former MERGE_STATISTICS_COUNT metric is no longer sent: it was tagged with the filters of the line rather than with a real table.
