Table of Contents

ABAP Gateway monitoring

This monitor is dedicated to the RFC gateway of the ABAP application servers, as shown in transaction SMGW.
For each instance of the system it reports the number of connections, of connected clients and of
remote gateways. When the gateway statistics are active, it also reports the timeouts, the request
overflows, the TCP errors and the CPIC errors that occurred since the previous run. It can also raise
an alarm when the gateway of an instance cannot be read.

Note: this monitor is about the RFC gateway (SMGW), not about the SAP Gateway OData framework (/IWFND). Each application server has its own gateway. The monitor opens one connection per instance and reads the local gateway of that instance.

Prerequisites

Configuration hints

Global parameters

Parameter Default Description
Send metrics enabled If enabled, the metrics described below are sent to the configured plugins/integrations, one series per instance.
Collection failure severity MINOR Defines the severity of the alarm raised for each instance whose gateway cannot be read, completely or partly: gateway monitoring disabled, missing authorization, instance not reachable, function module failing.
One alarm is raised per failing instance, independently of the surveillance table. It is cleared as soon as the instance can be read again.
Inactive gateway statistics are not a failure and raise no alarm.
Disabled turns the alarm off.

Surveillance table

Parameter Description
Active Use this field to activate or deactivate a line of configuration.
Instance A filter to match only a given application server instance.
Metric The figure watched by this line: Connections, Clients, Remote gateways, Timeouts, Request overflows, TCP errors or CPIC errors.
Threshold The threshold for the figure. An alarm is sent when the figure reaches this value. Several levels can be set with the multi level syntax, such as G2W:10 W2M:30. Leave at 0 to disable the line.
Severity The severity of the alarm. A line with severity Disabled raises no alarm.
Auto clear If checked, the alarm is cleared automatically once its condition is no longer met.
Prefix A custom text added to the alarm message of this line. The variable %MSG% holds the generated message: my_prefix %MSG% my_suffix.
Alarm If checked, this line of surveillance will be used for alarm generation.

Note: Connections, Clients and Remote gateways are the current numbers at the time of the run. Timeouts, Request overflows, TCP errors and CPIC errors are the increase since the previous run of the monitor, so their threshold is a number of events per run.

Note: the Instance filter matches any instance name containing the text, case insensitive. * matches every instance and a leading ! excludes the instances containing the text.

Note: an instance can match several lines, and each matching line is evaluated. To alarm on one instance with a different threshold, add a line for that instance and exclude it from the general line with !.

Note: a line on Timeouts, Request overflows, TCP errors or CPIC errors raises no alarm for an instance whose gateway statistics are inactive, and none during the first run.

Error counters

Alarm content

Examples

Example 1

Active Instance Metric Threshold Severity Auto clear Prefix Alarm
true * Connections 400 MAJOR true true

Effect: Sends a MAJOR alarm for each instance whose gateway holds 400 connections or more. Compare the threshold with the maximum number of connections of the gateway (profile parameter gw/max_conn).

Example 2

Active Instance Metric Threshold Severity Auto clear Prefix Alarm
true * TCP errors 1 WARNING true true
true * CPIC errors 1 WARNING true true
true * Timeouts 10 MAJOR true true
true * Request overflows 1 MAJOR true true

Effect: Sends a WARNING alarm for each instance with at least one TCP error or one CPIC error since the previous run, and a MAJOR alarm for each instance with 10 timeouts or more, or with at least one request overflow, since the previous run. The alarms are cleared on the first run without a new breach.

Example 3

Active Instance Metric Threshold Severity Auto clear Prefix Alarm
true sapprd_PRD_00 Connections 800 CRITICAL true true
true !sapprd_PRD_00 Connections 400 MAJOR true true

Effect: The first line sends a CRITICAL alarm when the central instance holds 800 connections or more. The second line sends a MAJOR alarm for each other instance holding 400 connections or more.

Generated metrics

metricId metricUnit metricTarget metricDescription
GATEWAY_CONNECTIONS Count [INSTANCE] Sends the number of connections held by the gateway of the instance.
GATEWAY_CLIENTS Count [INSTANCE] Sends the number of clients connected to the gateway of the instance.
GATEWAY_REMOTE_GATEWAYS Count [INSTANCE] Sends the number of remote gateways connected to the gateway of the instance.
GATEWAY_TIMEOUT_COUNT Count [INSTANCE] Sends the number of gateway timeouts since the previous run.
GATEWAY_OVERFLOW_COUNT Count [INSTANCE] Sends the number of request overflows since the previous run.
GATEWAY_TCP_ERROR_COUNT Count [INSTANCE] Sends the number of TCP errors since the previous run.
GATEWAY_CPIC_ERROR_COUNT Count [INSTANCE] Sends the number of CPIC errors since the previous run.

Note: the INSTANCE target holds the name of the application server instance.

Note: the metrics are sent for every instance, whether a surveillance line matches it or not.

Note: an instance with no value for a metric is not sent, rather than being sent as zero. This applies to the four error counters during the first run, after a restart of the gateway, and as long as the gateway statistics of the instance are inactive. It also applies to any figure the monitor could not read.

Note: the three numbers of connections, clients and remote gateways correspond to the SAP Cloud ALM health monitoring metrics hm.abap.gateway.connections, hm.abap.gateway.clients and hm.abap.gateway.remote_gateway. The gateway memory usage is not reported by this monitor.