Gateway operation

Use this information to learn how the Gateway for CEM interacts with Cloud Event Management.

The Gateway for CEM forwards alerts to Cloud Event Management. For each alert successfully processed by CEM, the gateway receives an event ID returned by the HTTP OK response. The gateway stores the data field value in the column specified by the Gate.TargetidField property.

Table 1 identifies some of the operations related to how the gateway interacts with CEM, including those related to event operations. For each operation, the table lists the properties you use to control how the gateway performs the operation, and the section of the guide that provides details about the operation and the valid values for the associated properties. For each operation, set the properties to the correct values or verify that their default values are suitable for your environment.

Note: The table references the following categories of properties that are defined in the G_CEM.props properties file:
  • Gateway Framework properties
  • CEM gateway specific properties

For reference information and command line options on these properties, see Properties and command line options.

Table 1. Configuring gateway operation
Configure gateway operation tasks Properties See

Controlling when and how many times the gateway should retry an operation that fails

Gate.CEM.RetryLimit

Gate.CEM.RetryWait

Controlling when and how many times the gateway should retry an operation that fails

Controlling where the gateway stores error codes

Gate.CEM.ErrorCodeColumn

Controlling where the gateway stores error codes

The topics that follow make use of the following terms:

  • Outbound -- Specifies the data flow sent from the gateway to CEM.
  • Inbound -- Specifies the data flow received by the gateway from CEM.

Controlling when and how many times the gateway should retry an operation that fails

Following successful completion of the initial REST GET requests during the gateway startup sequence, you can control how the gateway handles failed operations by using the Gate.CEM.RetryLimit and Gate.CEM.RetryWait properties as follows:

  • Use the Gate.CEM.RetryLimit property to specify the maximum number of retries the gateway should make on an operation that failed. The default value of 0 (zero) means there is no limit to the number of retries that the gateway makes on a failed operation.
  • Use the Gate.CEM.RetryWait property to specify the number of seconds the gateway should wait before retrying an operation that failed. The default value is 7 seconds.

The following example shows that the Gate.CEM.RetryLimit property is set to its default value of 0 and the Gate.CEM.RetryWait property is set to the value of 5 seconds:

.
.
.
Gate.CEM.RetryWait    : 5
Gate.CEM.RetryLimit   : 0
.
.
.

Given the above settings, if the gateway operation to forward an event to the Event Source instance fails, the gateway waits five seconds and then retries the event forwarding operation. The gateway waits five seconds each time it performs the event forwarding operation until it succeeds.

Controlling where the gateway stores error codes

When the gateway encounters an error during some operation, it writes a gateway specific error code to a column in an ObjectServer alerts.status table. You can specify the name of the column in the ObjectServer alerts.status table where the gateway stores these error codes using the Gate.CEM.ErrorCodeColumn property.

The default name of the column is CEMErrorCode.

Note: The column in the ObjectServer alerts.status table is created when you run the default cem.sql that is provided with the gateway.

Table 2 identifies some of the possible gateway specific error codes.

Table 2. Gateway specific error codes
Gateway error code Description Action

1

The gateway reported a transient error when performing the specified operation. The following list identifies some of these operations:

  • The gateway was unable to perform a check on the pre-create operation.
  • A CREATE operation fails and an HTTP error gets generated (that is, there is a communication problem). In this case, the CREATE operation should be attempted again when the communication is restored.

No action required. The next time the gateway resynchronizes with the ObjectServer the gateway attempts the action again.

2

The gateway reported an unrecoverable error when performing the specified operation. The following list identifies some of these operations:

  • The gateway was unable to update the specified event because it could not locate the event in the Cloud Event Management.

For this particular operation, if you want to discard further updates on the original alert, update the FILTER BY clause in the cem.rdrwtr.tblrep.def table replication definition file to filter out events on alerts when the CEMErrorCode is set to the value 2.