Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The API Manager Analytics provides reports, statistics and graphs on the APIs deployed in WSO2 Open Banking API Manager. You can then configure alerts to monitor these APIs and detect unusual activity, manage locations via geo-location statistics and carry out a detailed analysis of the logs. 

...

Note

By default, the API Management Analytics has a port offset of 1. This guide is instructed for a machine server that only runs API Management Analytics with the port offset set to 1.

...

Info

When using Oracle or MS SQL, download the database driver and include it within <WSO2_APIM_ANALYTICS_HOME>/lib directory.

  1. Create the ANALYTICS_DB database in your database server.

  2. Configure the worker profile.   

    Open the <WSO2_OB_API-M_ANALYTICS_HOME>/conf/worker/deployment.yaml file. Update the APIM_ANALYTICS_DB datasource with your database configurations.

    Code Block
    languagexml
    titledeployment.yaml
    - name: APIM_ANALYTICS_DB
    description: The Datasource used for APIM Analytics
    jndiConfig:
      name: jdbc/APIM_ANALYTICS_DB
    definition:
      type: RDBMS
      configuration:
        jdbcUrl: 'jdbc:<DB_TYPE>://<DB_HOST>:<DB_PORT>/ANALYTICS_DB?autoReconnect=true&useSSL=false'
        username: <DB_USERNAME>
        password: <DB_PASSWORD>
        driverClassName: <DB_DRIVER>
        maxPoolSize: 50
        idleTimeout: 60000
        connectionTestQuery: SELECT 1
        validationTimeout: 30000
        isAutoCommit: false
  3. Configure the dashboard profile.   

    Open the <WSO2_OB_API-M_ANALYTICS_HOME>/conf/dashboard/deployment.yaml file. Update the APIM_ANALYTICS_DB datasource with your database configurations.

    Code Block
    languagexml
    titledeployment.yaml
    - name: APIM_ANALYTICS_DB
    description: The Datasource used for APIM Analytics
    jndiConfig:
      name: jdbc/APIM_ANALYTICS_DB
    definition:
      type: RDBMS
      configuration:
        jdbcUrl: 'jdbc:<DB_TYPE>://<DB_HOST>:<DB_PORT>/ANALYTICS_DB?autoReconnect=true&useSSL=false'
        username: <DB_USERNAME>
        password: <DB_PASSWORD>
        driverClassName: <DB_DRIVER>
        maxPoolSize: 50
        idleTimeout: 60000
        connectionTestQuery: SELECT 1
        validationTimeout: 30000
        isAutoCommit: false
    Tip

    By default, the following datasource entries are configured to H2 databases. If required, you can create external databases and point these entries to them.

    Datasource NameFile
    BUSINESS_RULES_DB<WSO2_OB_API-M_ANALYTICS_HOME>/conf/dashboard/deployment.yaml
    WSO2_PERMISSIONS_DB<WSO2_OB_API-M_ANALYTICS_HOME>/conf/worker/deployment.yaml <WSO2_OB_API-M_ANALYTICS_HOME>/conf/dashboard/deployment.yaml
    Note

    The GEO_LOCATION_DATA datasource should be configured when you are using Geo-location based statistics

  4. Integrate third-party products when configuring databases.

    Note

    WSO2 Stream Processor is an OSGi-based product. Therefore, when you integrate third party products such as Oracle and MS SQL with WSO2 API-M Analytics, you need to check whether the libraries you need to add are OSGi based. If they are not, you need to convert them to OSGi bundles before adding them to the <WSO2_OB_API-M_ANALYTICS_HOME>/lib directory. 

    To convert the jar files to OSGi bundles, follow the steps below.

    1. Download the non-OSGi jar for the required third party product, and save it in a preferred directory in your machine.

    2. Go to the <API-M_ANALYTICS_HOME>/bin directory. Run the command given below, to generate the converted file in the <API-M_ANALYTICS_HOME>/lib directory.

    Code Block
    ./jartobundle.sh <PATH_TO_NON-OSGi_JAR> ../lib

...