Versions Compared

Key

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

WSO2 Business Activity Monitoring (WSO2 BAM) is a monitoring tool , which that performs the task of  aggregatingaggregating, analyzing and  analysing and presenting information about business activities. Thereby, BAM can be used with AS in order to effectively monitor the statistics of web applications in ASin AS.

To use BAM with AS, you must first configure the AS settings that allow web application data from AS to be published in BAM. Also, each web application in AS , which you want to monitor in BAM should be individually configured to allow publish data publishing in BAM. In BAM, the in BAM. The bam_webapp_statistics default toolbox  toolbox in WSO2 BAM is dedicated by default for monitoring the web applications.

...

Step 1: Start the Application Server

...

To start the application server for web application monitoring with BAM:

  1. Do the following changes to the given files before you start AS.

    1. Go to {AS_HOME}/repository/conf/ folder and
    open
    1. open carbon.xml.
      Look for <offset>0</offset> and change it to 1.
    2. Go to {AS_HOME}/repository/conf/etc/  folder and
    open
    1. 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

To start BAM and to setup databases for statistics:

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

Step 3: Configure the Application Server (AS)

...

To configure the AS for publishing statistics in BAM:

  1. Login and open the AS management console. 

    Info

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

  2. On Go to the Configure tab , and click Webapp Data Publishing.

  3. Select the Enable webapp stats option check box.
     
  4. Leave the Stream Name, Version, Nick Name, Description as it is. These are the default values from the bam_webapp_statistics toolbox.

    Info
    If you need to change the latter fields, you will have to make some more changes in the tool box and hive script. 

    Note that if you change any of the details relevant to the toolbox, e.g., stream name, version etc, you must accordingly modify the hive script of the toolbox in BAM.

  5. Enter the Receiver URL.
    This refers to the Thrift URL. This , which 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

...

needs monitoring

Once you have configured your AS with a BAM tool box for monitoring statistics, you must enable monitoring on each of the web applications that you want to monitor. 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 Enable monitoring via the UIEnabling
  2. Enable monitoring via the via web.xml
Info

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

...

Enable 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  to enable BAM statistics.

...

Enable monitoring via

...

web.xml

Add the following context params parameters to theapplication  web.xml file corresponding to your web application.

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

Step 5: Configure the Business Activity Monitor  (BAM)

...

In the previous steps, we have configured the web applications in AS as required for monitoring with BAM. Now, follow the steps given below to install and set up the toolbox in BAM.

  1. Login and open the management console of BAM.

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

  3. Select the the  ToolBox From URL option.

  4. Enter the URL of the WebApps_Stats_Monitoring toolbox.

  5. Click Install.
    Refresh URL option and enter the following URL: http://product-dist.wso2.com/downloads/business-activity-monitor/tool-boxes/2.5.0/WebApps_Stats_Monitoring.tbox.

    Info

    This is the URL of the WebApps_Stats_Monitoring toolbox (default toolbox for web application data monitoring). Note that all the toolboxes are hosted in the product web site for WSO2 BAM.

    If you have changed any details corresponding to the toolbox when you configured the AS (see the step on configuring AS), you must change the hive script of the toolbox according to those changes.

  6. 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

...

To invoke the web application in AS:

  1. Login and open the AS management console.

  2. On the 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 application services link (e.g.,  /jaxrs_basic/services ).

Step 7: Schedule or execute the webapp statistics

...

To execute the statistics on BAM:

  1. Login and open 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

To view the statistics with the web statistics on BAM:

  1. On the Main menu of the BAM management console, 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.