||
Skip to end of metadata
Go to start of metadata

WSO2 BAM is a monitoring tool, which performs the task of  aggregating, analyzing and presenting information about business activities. Thereby, BAM can be used with SS in order to effectively monitor Cassandra statistics.

To use BAM with SS for Cassandra monitoring, you must first configure the SS to publish Cassandra information to BAM. In BAM, the cassandra_stat_monitoring_toolbox.tbox toolbox should be installed. With this toolbox, the BAM dashboard will graphically display the statistics published from Storage Server.

Note that this functionality is only applicable if you have Cassandra environments set up in your system using SS embedded Cassandra clusters.

Follow the steps given below.

Enabling the Cassandra statistics publisher in SS

  1. Stop the Storage Server if it is already started.
  2. To start the Cassandra statistics publisher, open the cluster-monitor-config.xml file in the <SS_HOME>/repository/conf/etc/ directory and set the <monitoring_enable> setting to true (default setting is false).

    You may have multiple SS embedded Cassandra clusters in multiple environments of your system. Please note that this statistics publisher should be enabled in only one SS node of each Cassandra cluster. If you enable the publisher in multiple SS nodes, duplicate data will be published to BAM.

  3. Set <bam_secure_url> and <bam_receiver_url> as well.
  4. Provide the cron expression in <cron_expression> to schedule the publisher.
  5. Provide the BAM admin credentials.
  6. Start the Storage Server.

Setting up the BAM toolbox

  1. Stop the BAM server if it is already started.
  2. Open the master-datasources.xml in the <BAM_HOME/repository/conf/datasources/ directory and add the WSO2SS_STAT_DATASOURCE data source as shown below. This datasource connects to the default H2 database in BAM. Therefore, the summarized Cassandra information published to BAM from SS will be stored in this database.

    The maser-datasources.xml file, consists of the datasource connection to the default, internal database (H2) that is shipped with every WSO2 product. This database maybe replaced as explained in the Working with Databases section. Thereby, the datasource information in the master-datasources.xml file should be changed accordingly.

    <datasource>
               <name>WSO2SS_STAT_DATASOURCE</name>
               <description>The datasource used for ss stat analyzer</description>
               <definition type="RDBMS">
                   <configuration>
    					<url>jdbc:h2:repository/database/samples/WSO2SS_STAT_DB;AUTO_SERVER=TRUE</url>
                       	<username>wso2carbon</username>
                       	<password>wso2carbon</password>
                       	<driverClassName>org.h2.Driver</driverClassName>
                       	<maxActive>50</maxActive>
                       	<maxWait>60000</maxWait>
                       	<testOnBorrow>true</testOnBorrow>
                       	<validationQuery>SELECT 1</validationQuery>
                       	<validationInterval>30000</validationInterval>
                   </configuration>
               </definition>
    </datasource>
  3. Start the BAM server to install the toolbox.

    Port offset may need to be changed. Open the carbon.xml file from the <BAM_HOME>/repository/conf/ folder and change the <offset>0</offset> to an appropriate value.

  4. Go to the Main menu in the navigator and click Add in the BAM Toolbox menu. 
  5. You can now add the Cassandra statistics monitoring toolbox (cassandra_stat_monitoring_toolbox.tbox), which is stored in the <SS_HOME>/resources/bam-toolboxes/ folder as a custom toolbox. Use the ToolBox from File System option as shown below.
  6. Click Install. The toolbox will now be added to BAM.

Viewing Cassandra statistics in BAM

  1. In BAM,  go to the Dashboard sub menu under the Main navigator menu.
  2. Log in to the dashboard. The published and summarized Cassandra statistics are shown in the dashboard under the following types:
  • No labels