Configuring Oracle API Gateway Analytics

Overview

This topic describes the steps involved in setting up Oracle API Gateway Analytics. For example, this includes configuring the API Gateway Analytics port, database connection, and user credentials. The recommended way to configure Oracle API Gateway Analytics is to use the configureserver script to guide you through all the required steps. You can also use the Policy Studio to configure the Oracle API Gateway Analytics configuration file.

Prerequisites

The prerequisites for configuring Oracle API Gateway Analytics are as follows:

API Gateway Analytics Installation

For details on how to install Oracle API Gateway Analytics, see Installing Oracle API Gateway Analytics.

API Gateway Installation

Because API Gateway Analytics reports on transactions processed by the API Gateway in real time, you must ensure that the API Gateway is also installed. For more details, see Installing the API Gateway.

[Important] Important

To view API Gateway metrics in Oracle API Gateway Analytics, you must also configure the API Gateway to record metrics in the database for Oracle API Gateway Analytics to read. For more details, see the Oracle API Gateway User Guide.

JDBC Database Installation

The API Gateway stores and maintains the monitoring and transaction data read by API Gateway Analytics in a JDBC-compliant database. For more details, see Configuring the Database for Oracle API Gateway Analytics.

Configuring API Gateway Analytics

By default, API Gateway Analytics is configured to read message metrics from a MySQL database stored on the local machine. Typically, you may wish to use an alternative database, change the user credentials on the default database connection, or use a different listening port. This section explains how to configure API Gateway Analytics using the configureserver command.

Configuring API Gateway Analytics on the Command Line

Perform the following steps to run configureserver in interactive mode:

  1. Change to the following directory:

    Windows INSTALL_DIR\oaganalytics\Win32\bin
    Linux/UNIX INSTALL_DIR/oaganalytics/posix/bin


  2. Run the configureserver command.

  3. Enter the port on which the API Gateway Analytics server will listen. Defaults to 8040. If you have another process already using this port on the machine on which API Gateway Analytics is installed, configure API Gateway Analytics to listen on different port.

  4. Enter the database connection URL. Defaults to dbc:mysql://127.0.0.1:3306/reports.

    The following table lists examples of connection URLs for the supported databases, where reports is the name of the database and DB_HOST is the IP address or host name of the machine on which the database is running:

    Database Example Connection URL
    Oracle jdbc:oracle:thin:@DB_HOST:1521:reports
    Microsoft SQL Server jdbc:sqlserver://DB_HOST:1433;DatabaseName=reports;integratedSecurity=false;
    MySQL jdbc:mysql://DB_HOST:3306/reports
    IBM DB2 jdbc:db2://DB_HOST:50000/reports


  5. Enter the database user name. Defaults to root.

  6. Enter the database password.

  7. Enter whether API Gateway Analytics generates PDF-based reports. Defaults to N, which means that PDF reports are not generated. When set to Y, API Gateway Analytics generates PDF reports that include the same metrics displayed in the API Gateway Analytics screen (for example, number of client requests, requests per service, and so on). For more details on generated PDF reports, see the Oracle API Gateway User Guide.

  8. Enter the user name to connect to the API Gateway Analytics process that generates PDF reports. Defaults to an admin user.

    [Note] Note

    This is not the operating system user. This is the user that connects to the API Gateway Analytics web server process, which generates the PDF reports. You can add new users on the Users and Groups tab in the Policy Studio.

  9. Enter the password to connect to the API Gateway Analytics process that generates PDF reports.

  10. Enter the directory to which generated PDF reports are output (for example, c:\reports).

  11. Enter whether to send generated PDF reports to email recipients. You will require an SMTP account with which to send the reports. Defaults to N.

The following command shows some example output in interactive mode:

C:\Oracle\oaganalytics\Win32\bin>configureserver.bat
Connecting to configuration at : federated:file:///C:\Oracle\oaganalytics/conf/fed/
configs.xml

Listening port [8040]:
Configuring Database: Default Database Connection
Database URL [jdbc:mysql://127.0.0.1:3306/reports]:
Database user name [root]:
Database password []: *****
Enable report generation (Y, N) [N]: y
Report generation process connects as user name [admin]:
Report generation process connects using password []: ********
Report output directory []: c:\reports
Email reports (Y, N) [N]: y
Default email recipient []: joe@example.com
Email from []: apigateway@vordel.com
Choose SMTP connection type:
   0) None
   1) SSL
   2) TLS/SSL
Choice [0]:
SMTP host []: localhost
SMTP port [25]:
SMTP user name []: jbloggs
SMTP password []: *********
Delete report file after emailing (Y, N) [Y]:
Press enter to exit...

Configuring API Gateway Analytics using Command-Line Options

You can also run the configureserver command with various options (--port, --dburl, --emailfrom, --emailto, --smtphost, and so on). For example, the following command configures the database connection without emailing reports:

configureserver --dburl=jdbc:mysql://127.0.0.1:3306/631v2 --dbuser=root 
--dbpass=changeme --no-email

The following command specifies to email reports and the associated SMTP settings:

configureserver --dburl=jdbc:mysql://127.0.0.1:3306/reports --dbuser=root 
--dbpass=changeme –-email --emailto=joe@example.com --emailfrom=apigateway@vordel.com 
--smtptype=NONE --smtphost=192.168.0.174 --smtpport=25 --smtpuser=jbloggs 
--smtppass=changeme --generate --gpass=changeme --gtemp=c:\reports

For descriptions of all available options, enter the configureserver --help command.

Configuring API Gateway Analytics in the Policy Studio

The recommended way to configure API Gateway Analytics is using the configureserver command, which guides you through the required settings. However, you can also use the Policy Studio to configure specific settings in your API Gateway Analytics configuration file. For example, to configure the reports database, perform the following steps:

  1. In your Policy Studio installation directory, run the policystudio command.

  2. On the Policy Studio Home tab, click Open File, and browse to your API Gateway Analytics configuration file, for example:

    INSTALL_DIR/oaganalytics/conf/fed/configs.xml

  3. Click the External Connections button on the left of the Policy Studio, and expand the Default Database tree node.

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

  5. The Database Connection dialog enables you to configure the database connection details. By default, the connection is configured to read metrics data from the reports database. Edit the details for the Default Database Connection on this dialog. For example, you should enter a non-default database user name and password. If you wish to connect to a database other than the default local database, right-click Database Connections in the tree, and select Add a Database Connection. For more details, see the Oracle API Gateway User Guide.

[Note] Note

You can verify that your database connection is configured correctly by clicking the Test Connection button on the Configure Database Connection dialog.

Launching API Gateway Analytics

To launch API Gateway Analytics, perform the following steps:

  1. Start the API Gateway Analytics server using the oaganalytics script in the /bin directory of your API Gateway Analytics installation.

  2. Using the default port, connect to the API Gateway Analytics interface in a browser at the following URL:

    http://HOST:8040/

    where HOST points to the IP address or hostname of the machine on which API Gateway Analytics is installed.

  3. Log in using the default admin user with password changeme. You can edit this user in Policy Studio using the Users interface from the Policy Studio tree view.

[Note] Note

API Gateway Analytics produces reports based on metrics stored by the API Gateway when processing messages. To produce a graph showing the number of connections made by the API Gateway to a service, you must first configure a policy that routes messages to that service. When this policy is configured, send messages through the policy so they are routed to the target service.

If you change to another database that has a different set of remote hosts/clients configured, you must restart the API Gateway and API Gateway Analytics.

Further Information

For more details on topics such as using the Policy Studio to configure policies, scheduled reports, viewing monitoring data in API Gateway Analytics, or purging the reports database, see the Oracle API Gateway User Guide.