Configuring the API Gateway for API Gateway Analytics


This topic explains how to configure the API Gateway to store message metrics in the same reports database used by Oracle API Gateway Analytics. It also includes how to configure database logging and monitoring settings.

[Important] Important

To view API Gateway metrics in Oracle API Gateway Analytics, you must configure the API Gateway for use with Oracle API Gateway Analytics.


This topic assumes that you have already installed and configured Oracle API Gateway Analytics using the steps described in the Oracle API Gateway Installation and Configuration Guide.

Connecting to the API Gateway

To connect to the API Gateway in Policy Studio, perform the following steps:

  1. Ensure the Admin Node Manager and API Gateway are running. For more details, see Startup Instructions.

  2. On the Policy Studio welcome page, click the Admin Node Manager server session to make a connection.

  3. Specify your connection details (host, port, user name, and password). The default connection URL is:


    where HOST points to the IP address or hostname of the machine on which the API Gateway is running. For more details, see Connection Details.

  4. In the API Gateway topology view, double-click the API Gateway instance to load its configuration.

Configuring the Database Connection

To configure the database connection, perform the following steps:

  1. Expand the External Connections -> Database Connections node in the Policy Studio tree.

  2. Right-click the Default Database Connection tree node, and select Edit.

  3. Configure the database connection to point to the same reports database created when API Gateway Analytics was installed. For more details, see Database Connection.

You can verify that your database connection is configured correctly by clicking the Test Connection button on the Configure Database Connection dialog. You can also view the contents of your server .trc file in the INSTALL_DIR/trace directory. For more details on tracing, see Troubleshooting.

Configuring the Database Logging

To configure the database logging settings, perform the following steps:

  1. In the Policy Studio tree view, select the Settings node.

  2. Select the Audit Log tab at the bottom, select the Database tab, select Enable logging to database.

  3. Select the Default Database Connection from the drop-down list if appropriate. Alternatively, select a database connection that you have configured. You must ensure that your database connection points to the same reports database configured when API Gateway Analytics was installed. For more details, see Database Connection.

[Note] Note

If you wish to write the contents of message requests and responses to the database, you must configure the Log Message Payload filter for the relevant policies (for example, at the start and end of the policy). For more details, see Log Message Payload.

Configuring Monitoring Settings

To configure the API Gateway to monitor traffic and store message metrics in the reports database, perform the following steps:

  1. In the Policy Studio tree, select the Settings node, and select the Metrics tab at the bottom of the screen.

  2. Ensure Enable real time monitoring is selected.

  3. In the Reports settings panel, select Store real time monitoring data for charts/reports, and specify the database connection that points to the reports database.

  4. If you wish to enable monitoring of traffic per API Gateway, select the Traffic Monitor tab at the bottom of the screen, and ensure Enable Traffic Monitor is selected.

[Important] Important

Enabling traffic monitoring has a negative impact on performance. If you wish to maximize performance, do not enable this setting. For more details, see Configuring Traffic Monitoring.

Deploying to the API Gateway

You must deploy these configuration changes to the API Gateway. Click the Deploy button in the toolbar, or press F6. The API Gateway now sends audit trail and message metrics data to the reports database. This database is then queried by API Gateway Analytics to produce reports showing system health, service usage, clients, message size and volume, and so on.

[Note] Note

These monitoring settings are API Gateway instance-wide. You can also send metrics data to the database at the interface level. Right-click the HTTP Services Group (for example, Default Services), and select Edit. To monitor traffic for this Services Group, ensure that Include in real-time monitoring is selected. Similarly, you can disable monitoring for this Services Group by unselecting this setting.