11 Managing and Configuring EDRs, CDRs, and Alarms

This chapter provides an overview of, and explains how to manage and configure Oracle Communications Services Gatekeeper Event Data Records (EDRs), Charging Data Records (CDRs), and alarms. The overview applies to all Services Gatekeeper implementations. The section that follows applies to API management Services Gatekeeper implementations. If your Services Gatekeeper implementation uses communication services, also see ”Understanding Aspects, Annotations, EDRs, Alarms and CDRs” in Services Gatekeeper Extension Developer's Guide for information on EDRs generated by communication services.

About EDRs, CDRs, and Alarms

This section applies to all Services Gatekeeper implementations.

A key part of configuring Services Gatekeeper is configuring the event data records (EDRs), call data records (CDRs), and alarms that your implementation requires to capture the information you use to charge users, and alert you to traffic processing problems.

Tip:

Consider enabling EDR partitioning to prevent duplicate EDRs from going to all EDR listeners. See "Directing EDRs to Specific JMS Listeners (Partitioned EDRs)" for details.

You can change the content of these records, and specify more listeners to collect them, and decide whether to use partitioned mode, which eliminates redundant EDRs.

Event data records (EDRs) capture specific events that occur while traffic is running between applications, Services Gatekeeper, and any resources or network nodes the application is using. EDRs collect information that you can use to charge users for specific events that they consume, or alert you to traffic processing problems.

EDRs are the base component of both charging data records and alarms. Unaltered EDRs are referred to as pure EDRs. EDRs that you have contain the information that you use to charge users are referred to as charging data records, or CDRs. The consumption can be volume-based, time-based, event-based, or any other combination of EDR fields that you choose. EDRs that are configured to warn you of traffic processing problems are referred to as alarms. When referring to record that could be a pure EDR, CDR, or alarm, this document uses the term EDR.

You use the Administration Console or the domain_home/config/custom/wlng-edr.xml configuration file to specify what EDR fields that your CDRs and alarms contain. In the wlng_edr.xml file:

  • The <edr-config> element defines pure EDRs.

  • The <alarm-config> element defines alarms.

  • The <cdr-config> element defines CDRs.

EDRs are generated:

  • Automatically, using aspects at various locations in a network protocol plug-in.

  • Manually, anywhere in the code using EDRServiceMBean directly.

You capture EDRs, CDRs, and alarms using Java Management System (JMS) listeners. By default, listeners capture all EDRs that they process. You also have the option to configure JMS listeners to filter the types of EDRs that they capture. See "Directing EDRs to Specific JMS Listeners (Partitioned EDRs)" for more information.

EDRs and alarms do not persist in the database, instead they are captured by JMS listeners. See "Understanding EDRs" and "Understanding Alarms" for details.

See ”Aspects, Annotations, EDRs, Alarms, and CDRs” in Services Gatekeeper Extension Developer's Guide for more information on Aspects, EDRs, CDRs, and Alarms, such as:

  • How to add data to EDRs.

  • More details on the EDR format.

  • How to generate EDRs from communication services

  • How to generate CDRs and alarms.

See Services Gatekeeper Alarms Handling Guide for details on the individual alarms organized by tagalarm number.

See the ”All Classes” section of Services Gatekeeper OAM Java API Reference for details on EDRServiceMBean.

Minimizing EDRs Sent to JMS

You configure which EDRs, CDRs, and alarms that you want to emit through XML. Because Services Gatekeeper does not publish unknown EDRs to JMS, you can dramatically reduce the number of EDRs, CDRs, and alarms sent to JMS by creating a configuration that does not match any EDRs, CDRs, or alarms and causes them to be unknown. This can be especially beneficial for asynchronous telco services that might have as many as fifteen EDRs for an SMS with a delivery receipt. Figure 11-1 illustrates a minimal configuration that will not match any known EDRs, CDRs, or alarms.

Figure 11-1 Minimal EDR, CDR, and Alarm Configuration

Surrounding text describes Figure 11-1 .

Understanding EDRs

By default, all EDRs:

  • Pass through the EDRServiceMBean.

  • Are dispatched to a JMS-distributed topic so external clients can receive them over JMS.

  • Are not persisted in the database. Instead, you use JMS listeners to capture them.

See "Managing EDR, CDR, and Alarm Processing" for information on using the EdrServiceMBean.

See ”The EDR Descriptor” in Services Gatekeeper Extension Developer's Guide for information on the <filter> element in the EDR descriptor.

See ”Managing Application Traffic EDRs” in Services Gatekeeper API Management Guide for EDR information on how API EDRs are generated and processed.

See "Directing EDRs to Specific JMS Listeners (Partitioned EDRs)" for information on capturing EDRs.

Understanding CDRs

You map EDRs as CDRs in the wlng-edr.xml configuration file. See "Changing EDR, CDR, and Alarm Content" for details.

By default, CDRs are not persisted in the database. However, you can configure CDRs to persist by setting the storeCDRs parameter of EdrServiceMBean to yes by:

  • Using the Administration Console.

  • Using a Java program. See the ”All Classes” section of Services Gatekeeper OAM Java API Reference for information on EdrServiceMBean.

CDRs are then stored in the SLEE_CHARGING database table.

See ”CDR Content” in Services Gatekeeper Extension Developer's Guide for a list of the fields that only exist in CDRs.

See "About Cleaning Database Tables" for advice on cleaning out this database table.

See "Managing EDR, CDR, and Alarm Processing" for information on using the EdrServiceMBean.

Understanding Alarms

You map EDRs to alarms in the wlng-edr.xml configuration file. See "Changing EDR, CDR, and Alarm Content" for details.

By default alarms are not persisted to the database. However, you can configure Alarms to persist by setting the storeAlarms parameter of EdrServiceMBean to yes by:

  • Using the Administration Console.

  • Using a Java program. See the ”All Classes” section of Services Gatekeeper OAM Java API Reference for information on EdrServiceMBean.

Alarms are then stored in the SLEE_ALARMS database table.

See "About Cleaning Database Tables" for advice on cleaning out this database table.

See ”Alarm Content” in Services Gatekeeper Extension Developer's Guide for a list of the fields that only exist in alarms.

See "Managing EDR, CDR, and Alarm Processing" for information on using the EdrServiceMBean.

See the ”All Classes” section of Services Gatekeeper OAM Java API Reference. for information on EdrServiceMBean.

See Alarms Handling Guide for lists all alarms by tagalarm number, and information on how to solve individual problems.

Understanding External EDR listeners

You use EDR listeners to capture EDRs generated by Services Gatekeeper. EDR listeners are JMS topic subscribers. See ”Creating EDR Listeners” in Services Gatekeeper Extension Developer's Guide, for code examples for creating EDR listeners, and "Generating SNMP MIB Files" for more information.

Changing EDR, CDR, and Alarm Content

You can change the default EDR, CDR, and Alarm descriptors using either the Administration Console, or by editing the domain_home/config/custom/wlng-edr.xml file. This changes the definition of what constitutes a pure EDR, alarm, or CDR.

Using the Administration Console: 

  1. Start the Administration Console.

    The default URL is IP_addr:7001/console

    Where IP_addr is the IP address of the system running Services Gatekeeper. 7001 is the default port.

  2. Navigate to Domain Structure, then OCSG, then EDR Configuration.

    The Oracle Communications Services Gatekeeper EDR Configuration screen appears.

  3. In the Change Center, click Lock and Edit

  4. Make your changes to the EDR Descriptor, CDR Descriptor, and Alarm Descriptor fields.

    Tip:

    Inside the individual descriptor fields you can use Ctrl-f to search for fields.
  5. Click Save

  6. In the Change Center, click Release Configuration.

Using the configuration file:

Open the domain_home/config/custom/wlng-edr.xml file for editing, and make your changes.

  • The <edr-config> element contains the <edr> elements that describe pure EDRs.

  • The <alarm-config> element contains <alarm> elements that describe EDRs that are considered to be alarms.

  • The <cdr-config> element contains the <cdr> elements that describe CDRs.

The default Services Gatekeeper installation comes with a set of predefined descriptors. Change and adapt the descriptors as part of an integration project.

Example 11-1 shows the structure of an EDR in wlng-edr.xml. See the discussion on ”Creating EDR Listeners” and Services Gatekeeper Extension Developer's Guide and "Generating SNMP MIB Files" for more information.

Example 11-1 Sample EDR Definition from wlng-edr.xml

<edr-config xsi:schemaLocation="http://www.bea.com/ns/wlng/30 edr-config.xsd">
<edr id="ID" description="description">
   <filter>
      <method>
         <name>message response message</name>
         <class>fully_qualified_class_name</class>
      </method>
   </filter>
</edr>
.....
</edr-config>

Where ID is the numerical identifier shown in the TagEdr field in the EDR, description is an informal description of the EDR action, method message is the name of the class method generating the EDR, and fully_qualified_class_name is the name of the plugin generating the EDR.

Example 11-2 shows the definition of the PlayTextMessage EDR, which has a TagEdr value of 1000. See "Example Default API Management EDRs" for some example EDRs.

Example 11-2 Sample EDR Definition

<edr-config xmlns="http://www.bea.com/ns/wlng/30"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://www.bea.com/ns/wlng/30 edr-config.xsd">
 
  <!-- =================================================================== -->
  <!-- Audio Call -->
  <!-- =================================================================== -->
 
  <!-- North interface methods -->
  <edr id="1000" description="PlayTextMessage">
    <filter>
      <method>
        <name>PlayTextMessageResponse playTextMessage</name>
        <class>com.bea.wlcp.wlng.px21.plugin.AudioCallPlugin</class>
      </method>
    </filter>
  </edr>

Capturing EDR Statistics with EDRAnalyticMBean

EdrAnalyticMBean provides you with a statistical picture of the number of EDRs between the EDR processor and the data store writer.

You have these options for using these statistics:

  • Connect the WebLogic JMS Monitor to a Services Gatekeeper NT server and view these statistics. You can inspect the total messages published by EdrService. The number of current message indicates how many message are buffered by JMS service before they are delivered to users. If this number gets very large or continuously increases then you know you have a problem.

  • View the EdrService statistics from the Services Gatekeeper Administration Console. This metric shows you the total number of EDRs published by EdrService and a snapshot of the number of EDRs being queued between the EDR publisher and the JMS server.

  • View the EdrAnalytics statistics in the Services Gatekeeper Administration console. This metric shows you the total accumulation of EDRs received by each EdrListener, and the snapshot of the usage of queue between EdrProcessor and data store writer.

Working with EdrAnalytic

Managed object: EdrAnalytic

MBean: oracle.ocsg.edr.analytic.management.EdrAnalyticMBean

Operation: listEdrListenerStatistics

Scope: Cluster

Retrieves the number of EDR messages received and written to the database by the EdrAnalyticMBean.

Signature:

listEdrListenerStatistics()

Managing EDR, CDR, and Alarm Processing

This section explains how to configure EDR processing.

Persisting EDRs Until You Configure JMS Listeners

When you first start Services Gatekeeper, any EDRs generated by the network tier (NT) server are lost by default. They start getting captured after you configure and start the JMS listeners. The instructions in this section explain how to configure Services Gatekeeper to persist these first EDRs long enough to recover them in the JMS listeners.

To configure EDR persistence you need to:

  • Set the EdrService MBean DeliverMode attribute to 2 to persist EDRs.

  • Set the WLNGEDRResource Time-to-Live Override setting to 0, which directs the domain Java Message Service (JMS) servers to persist EDRs until the JMS listeners are started.

  • Add the JMS server name and a unique client ID to the wlng.jar file.

Once you configure these settings, Services Gatekeeper startup EDRs are stored and later delivered to JMS listeners once those listeners are available. These instructions explain how to use the Administration Console to configure EDR persistence. You can set the DeliverMode attribute programmatically using the EdrServiceMbean. However you must use the Administration Console to set the Time-to-Live Override. See the ”All Classes” section of the OAM Java API Reference documentation for details on the EdrServiceMBean.

This section assumes that you have already installed Services Gatekeeper, and defined a JMS server inherited from com.bea.wlcp.wlng.api.edr.jms.JMSListener on the NT server to capture the EDRs. You need the JMS server name and a unique JMS client ID to complete this task. To obtain the JMS server name, open the Administration Console, and navigate to domain_name, then Services, then Messaging, then JMS servers.

To configure EDR persistence:

  1. Start the Services Gatekeeper servers.

  2. Start the Administration Console.

  3. In the Change Center, click Lock and Edit.

  4. Navigate to domain_name, then OCSG, then servername, then Container Services, then EdrService.

  5. Set the DeliverMode attribute to 2.

  6. Navigate to domain_name, then Services, then Messaging, then JMS Modules, then WLNGEDRResource, then Configuration, then EdrTopic, then Overrides.

  7. Change the Time-to-Live Override setting to 0.

  8. Click Save.

  9. In the Change Center, click Activate Changes.

  10. Open the Oracle_home/ocsg/server/lib/wlng/wlng.jar file for editing.

  11. Add these parameters to your JMS Listener startup script:

    -DJMS_SERVER_NAME=JMSservername 
    -DJMS_CLIENT_ID=clientIDname
    

    Where JMSservername is the name of the JMS server to listen on, and clientIDname is a unique client ID for the listener.

Processing EDRs Using EdrServiceMBean

EdrServiceMBean configures some EDR processing options, and runs EDR processing operations. You can access this MBean from the Administration Console by selecting OCSG, then servername, then Container, then EdrService. Alternately, use a Java application. For information on the methods and fields of the supported MBeans, see the ”All Classes” section of Services Gatekeeper OAM Java API Reference.

This MBean controls EDR processing options such as:

  • Whether to use the partitioned EDRs feature

  • Whether to store EDRs, CDRs, and Alarms

  • Whether to publish EDRs to JMS

  • Whether to enable EDR statistics

  • Setting the batchTimeout and batchSize options for EDR listeners.

  • Whether to persist EDRs, CDRs, and alarms in the database

It also provide operations such as:

  • displayStatistics

  • loadEdrParamaterXml

  • resetStatistics

and so on.

Table 11-1 describes EdrServiceMBean attributes that allow you to log EDRs, CDRs, and alarms to files that are configurable by type (EDR, CDR, alarm) and to globally set which attributes to log.

Table 11-1 EdrServiceMBean Publishing Attributes

Attribute Default Value

PublishCdrToFile

false

Specifies whether CDRs will be published to the file {domain}/servers/ServerX/cdr_log/cdr.json. Edit the log4j configuration file to control logging format, rollover settings, and so on.

PublishEdrToFile

false

Specifies whether EDRs will be published to the file {domain}/servers/ServerX/edr_log/edr.json. Edit the log4j configuration file to control logging format, rollover settings, and so on.

PublishAlarmToFile

false

Specifies whether alarms will be published to the file {domain}/servers/ServerX/alarm_log/alarm.json. Edit the log4j configuration file to control logging format, rollover settings, and so on.

PublishCdrToJms

true

Specifies whether CDRs will be published to JMS.

PublishEdrToJms

true

Specifies whether EDRs will be published to JMS.

PublishAlarmToJms

true

Specifies whether Alarms will be published to JMS.

AvailableEdrAttributes

[attributes]

Lists in CSV format the attributes known to the OCSG installation. The list is generated from EDRs flowing through OCSG. To reset the known attributes, set this attribute to an empty string.

PublishedEdrAttributes

[attributes]

A list in CSV format of the attributes to include in published EDRs, CDRs, and alarms. Applies to both JMS and file output. Setting to an empty string causes all attributes to be included.


The PublishToJMS attribute is set to true if any of the type-specific publish-to-JMS attributes are true. For example, if PublishCdrToJms is set to true, PublishToJMS also is set to true. Furthermore, if you set PublishToJMS to true or false, without setting type-specific-publish-to-JMS attributes, the type-specific publish-to-JMS attributes likewise will be set to the same value.

Publishing Statistics

EDR statistics include statistics about how many EDRs, CDRs, and alarms have been published to file.

For example, the following displayStatistics operation shows how many EDRs, CDRs, and alarms were published to JMS and how many to files:

Gets EDR statistics
To use this operation the statisticsEnabled attribute must be set to true.
<p>The following information is returned:</p>
<ul>
<li>Number of EDRs</li>
<li>Smallest EDR message size in bytes</li>
<li>Largest EDR message size in bytes</li>
<li>Average EDR message size in bytes</li>
<li>Number of EDR messages pubished to JMS</li>
</ul>
<p><strong>Scope</strong>: Cluster</p>
@return Number of EDRs generated, and max/min/average size of the EDRs.

RESULT:

Number of EDRs: 0
          Smallest EDR: 2147483647 bytes
   Biggest EDR: 0 bytes
   Average EDR: -1 bytes
**Published to queue:
   Total: 1823
   Total:1823
   Rejected: 0

     Current Queue size [0]: 0
     Current Queue size [1]: 0
     Current Queue size [2]: 0
     Current Queue size [3]: 0
     Current Queue size [4]: 0
     Current Queue size [5]: 0
     Current Queue size [6]: 0
     Current Queue size [7]: 0
     Current Queue size [8]: 0
     Current Queue size [9]: 0
** Published internally:
    Total: 1823
    Error: 0
** Published to JMS:
    Total: 846
    Error: 0
** Internal Publisher:
    Edr: 1699
    Cdr: 846
    Alarm: 116
** Database:
    Cdr: 0
    Alarm: 0
** File
    Edr: 1694
    Cdr: 846
    Alarm: 122

Log4j Loggers

The following three loggers have been created for logging the types EDR, CDR, and alarm to files:

<RollingFile name="edr" fileName="servers/${sys:weblogic.Name}/edr_log/edr.json"
filePattern="servers/${sys:weblogic.Name}/edr_log/edr-%d{MM-dd-yyyy}.json">
  <PatternLayout>
    <Pattern>%m%n</Pattern>
  </PatternLayout>
  <Policies>
    <TimeBasedTriggeringPolicy interval="1"/>
  </Policies>
  <DefaultRolloverStrategy max="7" />
</RollingFile>

<RollingFile name="cdr" fileName="servers/${sys:weblogic.Name}/cdr_log/cdr.json"
filePattern="servers/${sys:weblogic.Name}/cdr_log/cdr-%d{MM-dd-yyyy}.json">
  <PatternLayout>
    <Pattern>%m%n</Pattern>
  </PatternLayout>
  <Policies>
    <TimeBasedTriggeringPolicy interval="1"/>
  </Policies>
  <DefaultRolloverStrategy max="7" />
</RollingFile>
 
<RollingFile name="alarm" fileName="servers/${sys:weblogic.Name}/alarm_log/alarm.json"
filePattern="servers/${sys:weblogic.Name}/alarm_log/alarm-%d{MM-dd-yyyy}.json">
  <PatternLayout>
    <Pattern>%m%n</Pattern>
  </PatternLayout>
  <Policies>
    <TimeBasedTriggeringPolicy interval="1"/>
  </Policies>
  <DefaultRolloverStrategy max="7" />
</RollingFile>
 
<Logger name="OCSG.EdrLogger" level="info" additivity="false">
  <AppenderRef ref="edr" />
</Logger>
 
<Logger name="OCSG.CdrLogger" level="info" additivity="false">
  <AppenderRef ref="cdr" />
</Logger>
 
<Logger name="OCSG.AlarmLogger" level="info" additivity="false">
  <AppenderRef ref="alarm" />
</Logger>

To store EDRs, CDRs, or alarms to a file, you must first enable file publishing in the MBean. You must also specify Log4j configuration to control how to log, for example, what kind of file rotation to use. The default is to rotate the files every midnight while keeping seven backup files.

Note:

Invoking the rollOver operation in the trace service also rolls over these files.

Managing EDRs in an API Management Implementation

This section provides more information on EDRs specific Services Gatekeeper API management implementations. For information on how Services Gatekeeper manages EDRs generated by communication services, see ”Understanding Aspects, Annotations, EDRs, Alarms and CDRs” in Services Gatekeeper Extension Developer's Guide.

Tip:

Be sure to read the "Directing EDRs to Specific JMS Listeners (Partitioned EDRs)" section. This feature can be particularly useful for diagnosing problems with traffic processing.

Understanding EDR Fields for API Management

The list of fields that an EDR contains are determined by the type of Services Gatekeeper implementation that you use, and the context of individual requests.

Table 11-2 lists all of the possible EDR fields. Individual value fields in an EDR are retrieved by name using a key in a name/value pair.

Also see ”EDR Content” in Services Gatekeeper Extension Developer's Guide for more information on these fields, and how they are used with communication services.

Table 11-2 API Management EDR Field Descriptions

EDR Field Description

AppAuth

String type that holds the outcome of HTTP application authentication:

  • FAILED - Authentication application failed.

  • SUCCESS - Authentication application succeeded.

  • NONE - No authentication was performed because the API allows anonymous requests

ApiId

The API ID. This is the name of the API. Generated by the network tier (NT).

ApplicationId

Application account ID. Generated by the NT

AppInstanceId

Application account identifier

AppKey

String type that is available to all APIs protected by appkey authentication and holds one of these values:

  • INVALID - invalid appkey provided

  • VALID - valid appkey provided

  • NOT_FOUND - no appkey was provided

ContainerTransactionId

WebLogic Server transaction ID (if available)

Class

Name of the class that logged the EDR

CurrLoad

String type that shows the current load level. When the load changes on the server, an EDR is generated that contains this attribute. The value is one of: NORMAL, LIGHT_OVER_LOAD, MEDIUM_OVERLOAD, HIGH_OVERLOAD.

DenyCode

Numeric type that is present if a non-telco API request has been denied with a reason. The value can be an OCSG or customer-defined deny code. See details about deny codes in DefConfigurationsMBean.DenyCodeDefinitions

DestAddress

The destination address, or addresses, with scheme included

Direction

Direction of the message. The choices are north (from network to application) or south (from application to network)

edr_content

String type that can contain one of the following:

  • "Issue access token"

  • "Issue authorization code"

  • "Refresh access token"

  • "Resource protection by OAuth2"

  • "OAuth2 module started"

  • "OAuth2 module stopped"

ErrCat

The error category. This field is omitted if the Status field contains a value of Success. This error is generated by the NT, and the values are:

  • ActionErr - The request action chain generated the error

  • ServiceErr - The southbound HTTP server generated the error

  • PeerErr - All other errors

Exception

Name of the exception that triggered the EDR

Facade

Facade (REST or SOAP)

HttpMethod

HTTP method, such as POST, or GET

HttpStatusCode

The HTTP status code, such as 200 or 404. Generated by the AT

Interface

Interface where the EDR is logged

Method

Name of the method that logged the EDR

OrigAddress

The originating address with scheme included. For example: tel:1212771234

PlanIds

A JSON array that is available when a request is associated with one or more plans. If the request is not associated with a plan, this attribute is not available in the EDR. The array has the following structure:

[{
  "id":"<PLAN_ID>",
  "status":"<STATUS>"
},
{ ... }]

The array has the following values:

  • PLAN_ID

    String type that contains the plan ID.

  • STATUS

    The status of the plan, which has the following available values:

    ACTIVE - Plan is active and will be enforced

    INACTIVE - Plan is inactive and will not be enforced

Position

Position of the EDR relative to the method that logged the EDR, before or after

PrevLoad

String type that shows the previous load level. When the load changes on the server, an EDR is generated that contains this attribute. The value is one of: NORMAL, LIGHT_OVER_LOAD, MEDIUM_OVERLOAD, HIGH_OVERLOAD.

ReqAction

A record for each of the actions executed in the actions chain for a request message. Generated by the NT. Uses this syntax:

seq=sequence_no, id=instance_id,  name=action_name, status= [ success | reject | error ], err=error_info 

Where sequence_no is the sequence number of the action in the action chain numbered 1...n, instance_id is the version number you gave the action in the Instance Id field of the API (if used), action_name is the name of the action as it appears in the Actions tab, and error_info is general error information. The err field is omitted if status=success. This example shows four actions in the action chain:

ReqAction = 
["seq=1, id=101, name=OAuth2Validator, status=Success",
"seq=2, id=100A, name=SLAEnforcement, status=Success",
"seq=3, id=566_2, name=Groovy, status=Success",
"seq=4, id=v1.5, name=Sender, status=Success"]

If the action does not have a value for Instance ID, the id= field is omitted from the EDR.The instance_id values of 0-7 are reserved for these Services Gatekeeper internal actions:

  • 0 - Basic security

  • 1 - ComServiceCaller

  • 2 - OAuth2Security

  • 3 - OAuth2Validator

  • 4 - Object to XML

  • 5 - Sender

  • 6 - SLA enforcement

  • 7 - XmlToObject

ReqMsgSize

The size of the request message body (in Kb; excluding headers). Generated by the AT

RspMsgSize

The size of the response message (in Kb). Generated by the AT

RspAction

A record for each of the actions executed in the actions chain for a response message. Generated by the NT. Uses the same syntax as "ReqAction"

ServiceProviderId

Service provider account ID

ServiceName

The name or type of the service.

ServerName

Name of server where the EDR was generated, for example WLNG_NT1

Source

The type of source that logged the EDR

State

Where the EDR was dispatched. The values are:

  • ENTER_AT - The EDR is being processed in the application tier.

  • ENTER_NT - The EDR is being processed in the network tier.

  • ENTER_NET - The EDR is being processed in a network node

Status

Reflects the final HTTP status from the response message. Can be one of:

  • Error - Mapped to HTTP 5xx status codes.

  • Success - Mapped to HTTP 2xx status codes

  • Reject - Mapped to HTTP 4xx status codes.

SubscriberID

Subscriber (user) identifier (using route address).

TagEdr

A numerical EDR identifier for each EDR. This value is read from the <edr id> element of the EDR definition in wlng-edr.xm. These are default values:

  • 48000 - EDRs for single-tier implementations.

  • 49000 - EDRs for traffic entering or leaving the NT server for a multi-tier implementation.

  • 49001 - EDRs for traffic entering or leaving the AT server for a multi-tier implementation.

Timestamp

The time at which the EDR was triggered, in milliseconds since midnight, January 1, 1970 UTC.

TransactionId

Transaction Id. Correlates completed traffic among all three EDR states

(Timestamp)

TsBeAT

TsAfAT

TsBeNET

TsAfNET

TsBeNT

TSAfNT

Used only for Action chain processing. Timestamps Before and After server processing with the syntax:

Ts [before/after ] [processing_location ]

Where:

  • Ts indicates a timestamp

  • Be/Af. Before or After server processing.

  • processing_location - One of

    • AT- processed in the Access Tier

    • NT - processed in the Network Tier

    • NET - processed in the external network

EDRs do no always arrive in chronological order. For example, for a southbound request, the NT must complete its response chain before issuing an TsAfAT timestamp. In that time, the AT may have completed its EDR processing and returned an earlier TsAfNT timestamp. So the TsAFNT (after NT) EDR may arrive before the TsAfAT (after AT) EDR.

URL

The URI of the current web service.


Example Default API Management EDRs

This section provides example EDRs.

Example 11-3 shows an AT EDR.

Example 11-3 Example Default AT EDR

AppInstanceId = user_linApp
Class = oracle.ocsg.daf.accesstier.AccessTierTrafficLogger
Direction = south
HttpMethod = GET
HttpStatusCode = 200
Position = after
ReqMsgSize = 0
RspMsgSize = 235
ServerName = WLNG_AT1
ServiceProviderGroup = usrGrp
ServiceProviderId = user
Source = method
State = ENTER_AT
TagEdr = 48001
Timestamp = 1454396477977
TransactionId = b709485c-3ec9-4dc7-9aa1-bfd9dc9ba3ad
TsAfAT = 1454396477977
TsBeAT = 1454396477112
URL = /daf/linApi/1/CUSTOMER/3

Example 11-3 shows the related NT EDR:

Example 11-4 Example NT EDR

ApiId = 9a6aa6d6-c7ae-4a3c-b3b9-ccb0fcf50496
AppInstanceId = user_App1
ApplicationId = 6d8a5379-e186-454d-8baa-d076a45e1b7e
Class = oracle.ocsg.daf.trafficlogger.OcsgTrafficLogger
Method = GET@/userApi/1/CUSTOMER/3
Position = after
ReqAction = ["seq=1, name=OAuth2Validator, status=Success",
             "seq=2, name=SLAEnforcement, status=Success",
             "seq=3, name=Groovy, status=Success",
             "seq=4, name=Sender, status=Success"]
ServerName = WLNG_NT1
ServiceName = /userApi/1
ServiceProviderGroup = userGrp
ServiceProviderId = user
Source = method
State = ENTER_NT
TagEdr = 48000
Timestamp = 1454396477975
TransactionId = b709485c-3ec9-4dc7-9aa1-bfd9dc9ba3ad
TsAfNET = 1454396477974
TsAfNT = 1454396477975
TsBeNET = 1454396477122
TsBeNT = 1454396477117
URL = /daf/linApi/1/CUSTOMER/3
status = Success

Understanding When EDRs are Generated

This section includes a lot of action chain-specific information which you can bypass if your implementation does not use action chain processing. Non-API management EDRs are generated in the same locations but do not include the actions chain-specific fields.

Figure 11-2 shows the default listeners where Services Gatekeeper creates EDRs. The Platform Test Environment (PTE) lists multi-tier EDRs as ”Multi-Tier DAV EDRs for NT.”

Single-tier Services Gatekeeper implementations generate the same EDRs as multi-tier implementations.

Figure 11-2 Understanding Where Services Gatekeeper Generates EDRs

Description of Figure 11-2 follows
Description of ''Figure 11-2 Understanding Where Services Gatekeeper Generates EDRs''

Table 11-3 lists the EDRs shown in Figure 11-2. For clarity the EDRs for mobile-terminated request and response messages have been numbered.

Table 11-3 Actions Chain EDR Origin and Syntax

EDR Figure Reference EDR Position EDR Syntax Trigger Mechanism

1

ENTER_AT:before

transactionId: uniqueId
url:/api_name/version

Actions back-end

2

ENTER_NT:before

transactionId: uniqueId
url:/api_name/version

Actions back-end

3

ENTER_NET:before

transactionId: uniqueId
url:/api_name/version
method:http_method@exposure_URL

Actions back-end/sender action

4

ENTER_NET:after

transactionId: uniqueId
url:/api_name/version

Actions back-end or HTTP asychronous clien call back

5

ENTER_NT:after

transactionId: uniqueId
url:/api_name/version

Actions back-end

6

ENTER_AT:after

transactionId: uniqueId
url:/api_name/version

Actions back-end


However depending on where an error occurred, not all 6 EDRs from Figure 11-2 may be generated.

Understanding Action Chain EDR Handling

At a minimum, error processing always generates EDRs with after ENTER_AT and after ENTER_NT states to ensure that you always get a certain minimum amount of debugging information for message handling.

The EDR TagEdr field helps identify where the EDR originated. See Table 11-2 for details.

Figure 11-2 shows the possible EDRs, numbered 1 to 6 for the two types of Services Gatekeeper implementations.

Error handling for traffic that uses the action chain has these characteristics. The numbers refer to the EDRs numbered in Figure 11-2:

  • If a request message exits the action chain and cannot connect with network's HTTP server, an exception is thrown and a third EDR is generated

  • Processing errors in the actions chain from a response message (from Network to Services Gatekeeper) does not generate an exception or an EDR. This is to ensure that actions chain processing continues in the event that one or more actions fail. However, status for individual actions are listed in ReqAction fields in each EDR.

  • EDRS generated before the message enters the action chain will at least generate a number 5 EDR. This is the only EDR generated from the NT.

  • Errors that occur inside the actions chain are typically runtime exceptions, and at a minimum will still generate EDRs number 2 and 5 in Figure 11-2. Runtime exceptions for an action do not stop the other actions from processing, and the event is recorded in EDRs.

  • Action chain errors:

    • Runtime exceptions for one action do NOT stop the other actions from processing, and the exception is recorded in EDRs. In this case the result of all actions are recorded in the RspAction field in the After ENTER_NT EDR.

    • ActionProcessingError exceptions for an action, however do stop action chain processing. In this case the status code of the remaining EDRs indicate ActionProcessingError. In some of these cases an HTTP 500 Internal Server Error and Incident ID is returned to the HTTP client. See "Problem: Receiving an Internal Server Error and Incident ID" for more information.

      In this case the results of any completed actions are recorded in the RspAction field in the After ENTER_NT EDR (EDR #5 in Figure 11-2).

    For both types of error, the Source field is set to Method. If processing is successful without errors, the HTTP code remains set to original value set by the HTTP server.

  • Errors generated by the network on the southbound side of Services Gatekeeper (typically server not running) will at least generate EDRs number 2, 3, and 5 from Figure 11-2.

Directing EDRs to Specific JMS Listeners (Partitioned EDRs)

By default, Services Gatekeeper sends every EDR to every JMS listener that is configured ("replicated EDRs"). This sends duplicate EDRs to all listeners which can cause confusion. You can configure Services Gatekeeper to send all related EDRs to a single JMS listener (”partitioned EDRs"). You do this by configuring Services Gatekeeper to add a JMS unit of order (UOO) number to the transactionId field of related EDRs so they can be grouped. EDRs with the same UOO are then collected and dispatched to JMS listeners you create in a ”round-robin” style.

Configuring Partitioned EDRs

This section explains how to configure EDR partitioning for your Services Gatekeeper implementation. These instructions explain how to configure EDR partitioning using the Administration Console. You can also use the EdrServiceMBean to select this option.

Before you start this process you must already have your JMS listeners configured. See "Understanding External EDR listeners" more information.

To configure EDR partitioning for an NT server:

  1. Start the Administration Console.

    See "Starting and Using the Administration Console" for details.

  2. Select Lock and Edit.

  3. Navigate to OCSG, then servername_NTn, then Container Services, then EdrServiceMBean, then the Attributes tab.

    Where servername is the name of one of your NT servers, and n is the server number. For example myserverNT3.

  4. In the BatchGroupingNumber attribute field, enter the number of EDR listeners you have configured.

    A value of 0 or 1 specifies that all EDRs are sent to all listeners (the default). A value of 2 or greater specifies EDR partitioning.

    Note:

    If you set BatchGroupingNumber lower than the number of JMS listeners, one or more JMS listeners do not receive any EDRs. Setting the number too high has no effect; all JMS listeners receive the correct EDRs.
  5. Navigate to Services, then Messages, then JMS Modules, then, WLNGEDRResource, then EdrTopic, then Configuration.

  6. Select the General tab.

  7. On the Forwarding Policy: menu select Partitioned.

  8. Save your changes.