Monitoring Services

Overview

This topic explains how to monitor example services using the API Gateway Manager monitoring tools. It assumes that you have already performed the steps in the following topics:

Enabling Monitoring

You must first ensure that traffic monitoring and real-time monitoring are enabled:

  1. In the Policy Studio tree, select the Settings node, and select the Traffic Monitor tab at the bottom.

  2. On the Traffic Monitor tab, ensure Enable Traffic Monitor is selected.

  3. Select the Metrics tab at the bottom, and ensure Enable real time monitoring is selected.

  4. Click the Deploy icon in the Policy Studio toolbar to deploy these settings to the API Gateway. Alternatively, press F6.

[Important] Important

Traffic monitoring is required for the purposes of this demo. However, enabling traffic monitoring may have a negative impact on performance. If you wish to maximize performance, you can disable these settings. For more details, see Configuring Traffic Monitoring.

Viewing Real-time Monitoring

You can view a wide range of monitoring data in the API Service Manager. For example, this includes message status, message traffic, filter execution path, message content, system, services, and remote hosts. You can view real-time traffic monitoring summary data on the main Dashboard tab in the TRAFFIC section. The following example shows the number of messages that have been passed by the API Gateway on to a service:

Real-time Monitoring

Each time you send test messages through the API Gateway to an example service (for example, using API Gateway Explorer or the Send Request (SR) tool), the message status is displayed in the TRAFFIC section.

Viewing Message Traffic

You can use the traffic monitoring tools in API Gateway Manager for operational diagnostics and root cause analysis. The Traffic view provides a web-based message log of the HTTP, HTTPS, JMS, and FTP traffic processed by the API Gateway. You can perform tasks such as the following:

  • Filter messages on a range of criteria (for example, transaction ID, service name, or remote host)

  • Drill down to view message contents

  • View performance statistics (for example, number of requests, average bytes sent, or average duration)

For example, you can click the Traffic button in the API Service Manager to view summary information for each message sent to the API Gateway. Alternatively, you can click one of the summary charts displayed on the Dashboard (for example, Messages passed or Messages failed). This displays the message traffic automatically filtered according to your selection. The following simple example shows the details displayed on the Traffic tab for Messages passed by the API Gateway:

Message Monitoring

Filtering Message Traffic

In the SELECTION pane on the left of the Traffic tab, you can click the Apply button to filter the messages displayed based on a range of criteria. For example, the default filters include REQUEST FROM (Client or API Gateway), MAX RESULTS PER SERVER, TRANSACTION STATUS, and TIME INTERVAL.

You can click Add Filter to search on different criteria (for example, Service Name, Remote Host, Authentication Subject, Transaction ID, and Operation). The API Gateway inserts a transaction ID in all HTTP and HTTPS traffic in a header named X-CorrelationID. When you have selected your search criteria, click the Apply button.

Viewing Message Content

When you click a selected message listed on the Traffic tab, this displays the message filter execution path and the contents of each request message and response message. The following example displays the message path for a simple Google Search message:

Message Path

The following example shows the corresponding message content for the selected message displayed below:

Message Path

You can click Save Request or Save Response to download the message contents and save them to a file.

Viewing Performance Statistics

The Performance tab displays performance statistics for the HTTP and HTTPS traffic processed by the API Gateway. For example, these include the number of requests, average bytes sent, and average duration. For example, the Performance page is displayed as follows:

Performance Statistics

Filtering Performance Statistics

You can click the Apply in the left pane to filter the performance statistics displayed based on different criteria. By default, the statistics are grouped by path name, with a time interval of 1 day. You can select different criteria from the GROUP BY and TIME INTERVAL lists. When you have selected your search criteria, click the Apply button.

Detecting Malformed Messages

Messages with malformed content or an incorrect relative path are blocked by the API Gateway and displayed on the Dashboard tab in the TRAFFIC section as follows:

Message Blocked

You can click the chart to display the list of failed messages automatically filtered on the Traffic tab. Click a message in the list to display the filter execution path and message content. The following example shows the execution path of a malformed message that has been blocked by the API Gateway:

Message Blocked

Monitoring System Data

The Monitoring view enables you to monitor System, API Services, and Remote Host statistics. For example, on the System tab, when you click a panel in the ALL SYSTEMS section at the top of the screen, a graph for the selected setting is displayed below. The following example shows the graph displayed for the System CPU Avg (Max) setting selected on the right:

System Data

Configuring Trace and Log Settings

You can click the Settings button in the toolbar to configure trace, logging, and monitoring settings on-the-fly. These are dynamic settings, so you do not need to refresh or deploy to the API Gateway. For example, the top-level SYSTEM SETTINGS enable you to specify whether inbound and outbound transactions, the policy path, and message trace are recorded. You can also select an HTTP interface in the tree on the left to configure the INTERFACE SETTINGS, TRAFFIC MONITORING SETTINGS, and interface trace level.

Select the API Gateway process on the left to configure the process trace level. Finally, you can also select a Relative Path or Service on the left, and select the SERVICE SETTINGS, LOGGING LEVEL, or PAYLOAD LOGGING on the right.

For more details on how to configure tracing for the API Gateway and logging for specific message filters. For details, see the topic on Troubleshooting.

Using Oracle API Gateway Analytics

This tutorial shows how to monitor an example service using the monitoring tools provided with the API Gateway. Oracle API Gateway Analytics is a separately installed component that enables you to monitor services and to generate reports on the stored message traffic history in your domain. For more details, see Using Oracle API Gateway Analytics.