Unknown macro: {next_previous_links}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »

The Application Server previously had the capability of only monitoring statistics through WSO2's Business Activity Monitor (BAM). However, now the Application Server 5.2.0 has the capability of monitoring web application statistics as well using BAM 2.3.0.

Configuring web application statistics monitoring

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

Step 1: Configure the Application Server (AS)

  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.
  3. Log into the AS management console. 

    Please note that the webapp data publishing settings need to be configured separately for the tenants.

  4. On the Configure menu, click Webapp Data Publishing.

  5. Select the Enable webapp stats option.
     
  6. 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. 
  7. 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)
  8. Enter the Cassandra Username. 
  9. Enter the Cassandra Password.
  10. Click Update to successfully configure the AS for Data publishing to BAM.

Step 2: 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. Web Application Statistics Monitoring
  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 menu, under the Applications menu, click List.
  2. Click the Context link of the respective web application.
    The selected application dashboard will appear. 
     
  3. Select the Enable BAM statistics checkbox.
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 3: Configure the Business Activity Monitor  (BAM)

  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.
  3. Log into the BAM management console.

  4. On the Main menu, under BAM Toolbox, click Add.

  5. Select the  ToolBox From URL option.

  6. Enter the URL of the WebApps_Stats_Monitoring toolbox.

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

  8. Send a few request from AS (Invoke any web application that has enabled statistics monitoring).
  9. On the Main menu, under  Analytics, click List.
    The webapp statistics will be displayed.
  10. 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 to view web application statistics via the BAM Dashboard.


  • No labels