This documentation is for WSO2 API Manager 1.7.0 View documentation for the latest release.
Page Comparison - Quick Start Guide (v.86 vs v.87) - API Manager 1.7.0 - WSO2 Documentation

All docs This doc

Versions Compared


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


  1. Do the following changes in <APIM_HOME>/repository/conf/api-manager.xml file:

    • Enable API usage tracking by setting the <APIUsageTracking> element to true
    • Set the Thrift port to 7614
    • Set <BAMServerURL> to tcp://<BAM host IP>:7614/ where <BAM host IP> is the machine IP address. Do not use localhost unless you're in a disconnected mode.

    Code Block
        <!-- Enable/Disable the API usage tracker. -->
        <BAMServerURL>tcp://<BAM host IP>:7614/</BAMServerURL>
        <!-- JNDI name of the data source to be used for getting BAM statistics. This data source should
            be defined in the master-datasources.xml file in conf/datasources directory. -->
  2. Specify the datasource definition in <APIM_HOME>/repository/conf/datasources/master-datasources.xml file as follows. 

    Code Block
              <description>The datasource used for getting statistics to API Manager</description>
              <definition type="RDBMS">
                     <!-- JDBC URL to query the database -->
                     <validationQuery>SELECT 1</validationQuery>

    Next, prepare BAM to collect and analyze statistics from API manager.

  3. Download WSO2 BAM 2.4.1 or later from location:
  4. Change port offset of BAM to 3 by editing the file <BAM_HOME>/repository/conf/carbon.xml file (search for the offset node).

    Code Block

    This increments all ports used by the server by 3, which means the BAM server will run on port 9446. Port offset is used to increment the default port by a given value. It avoids possible port conflicts when multiple WSO2 products run in same host.

  5. Do the following changes in <BAM_HOME>/repository/conf/datasources/bam_datasources.xml file:
    • Copy/paste WSO2_AMSTATS_DB definition from API Manager's master-datasources.xml file. You edited in it in step 2.
    • Replace the port of WSO2BAM_CASSANDRA_DATASOURCE in URL (jdbc:cassandra://localhost:9163/EVENT_KS). Note that localhost is used here; not the machine IP.

      • Do not edit the WSO2BAM_UTIL_DATASOURCE, which is using the offset
      • Cassandra is bound by default on localhost, unless you change the data-bridge/data-bridge-config.xml file
  6. Copy the file <APIM_HOME>/statistics/API_Manager_Analytics.tbox to directory <BAM_HOME>/repository/deployment/server/bam-toolbox.

    If this folder is not in the BAM installation directory by default, create it. The toolbox describes the information collected, how to analyze the data, as well as the location of the database where the analyzed data is stored.
  7. Open <BAM_HOME>/repository/conf/etc/hector-config.xml file and change the port to localhost:9163. You must add the other nodes too when configuring a clustered setup.

    Code Block
  8. Restart the BAM server by running <BAM_HOME>/bin/wso2server.[sh/bat].