com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

Web Application Statistics Monitoring with BAM

Configuring web application statistics monitoring with BAM

Carryout the following steps, to configure web application statistics monitoring:

Step 1: Start the Application Server

  1. Before starting AS carryout the following actions:

    • Go to {AS_HOME}/repository/conf/ and open carbon.xml
      Look for <offset>0</offset> and change it 1.
    • Go to {AS_HOME}/repository/conf/etc/ and open bam.xml.
      Look for <WebappDataPublishing>disable</WebappDataPublishing> and enable it.
  2. Start the Application Server. For more information, see Starting the server.

Step 2: Start the Business Activity Monitor

  1. Start BAM. For more information, see Starting the server.
  2. If you need to change databases which stores statistic data: 
    • Create a database.
    • Configure the database in {BAM_HOME}/repository/conf/datasources/master-datasources.xml as WSO2BAM_DATASOURCE.

Step 3: Configure the Application Server (AS)

  1. Log into the AS management console. 

    Webapp data publishing settings need to be configured separately for the tenants.

  2. On the Configure tab, click Webapp Data Publishing.

  3. Select the Enable webapp stats option.
     
  4. Leave the Stream Name, Version, Nick Name, Description as it is.
    If you need to change the latter fields, you will have to make some more changes in the tool box and hive script. 
  5. Enter the Receiver URL.
    This refers to the Thrift URL. This is normally tcp://{host}:7611. If you need to use SSL for this the URL will be tcps://{host}:7711. If you change the offset of the BAM server to 1, both ports will be incremented by 1 (7612, 7712)
  6. Enter the Cassandra Username. 
  7. Enter the Cassandra Password.
  8. Click Update to successfully configure the AS for Data publishing to BAM.

Step 4: Configuring the web application that need monitoring

Use either one of the following approaches to configure the web application before deploying any web application, to make AS ready to publish the data to BAM.

  1. Enabling monitoring via the UI
  2. Enabling monitoring via the  web.xml

The UI has the precedence over web.xml configurations. As a result, if you disable web apps statics monitoring from the UI configurations in the web.xml will not work.

Enabling monitoring via the UI
  1. On the Main tab, under the Applications menu, click List.
  2. Click the Context link of the respective web application.
    The selected application dashboard will appear. 
     
  3. Click Activate, to enable BAM statistics.


Enabling monitoring via the web.xml

Add the following context params to the application web.xml

<context-param>
	<param-name>enable.statistics</param-name>
	<param-value>true</param-value>
</context-param>

Step 5: Configure the Business Activity Monitor  (BAM)

  1. Log into the BAM management console.
  2. On the Main menu, under BAM Toolbox, click Add.

  3. Select the  ToolBox From URL option.

  4. Enter the URL of the WebApps_Stats_Monitoring toolbox.

  5. Click Install.
    Refresh after a few seconds to see if the toolbox is installed.

Step 6: Invoke the web application that has enabled statistics monitoring

  1. Access the AS management console.

  2. Main menu, under the Applications caption, click List.

  3. Click the respective web application context link.
    The application dashboard will appear.

  4. Click the web applications services link (e.g., /jaxrs_basic/services).

Step 7: Schedule or execute the webapp statistics

  1. Access the BAM management console.
  2. On the Main menu, under Analytics, click List.
    The webapp statistics will be displayed.
  3. Execute the webapp statistics or schedule its running sequence.

Viewing the web application statistics

  1. On the Main menu, click Dashboard.

  2. Login to the dashboard using "admin" as the username and password.

  3. Select the Server, Tenant and Web App to view web application  statistics via the BAM Dashboard.


com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.