This documentation is for WSO2 Private PaaS 4.0.0. View documentation for the latest release.
Configuring Metering Statistics - WSO2 Private PaaS 4.0.0 - WSO2 Documentation
||
Skip to end of metadata
Go to start of metadata

Stratos Manager (SM) and Cloud Controller (CC), which are products used in Private PaaS, publish events to WSO2 Business Activity Monitor (BAM). Stratos Manager publishes events when a user subscribes to a cartridges or unsubscribes to a cartridge. The following screenshot  displays the details that are sent to BAM with every event:

Cloud Controller publishes events when an instance is going through a state transition. The following screenshot displays the values that are sent to BAM:

Enabling publishing in SM

To enable publishing in SM, add the following configurations to the cartridge-config.properties  file, which is in the < SM_HOME>/repository/conf/   directory.

bam.publisher.enabled=true
bam.admin.username=admin
bam.admin.password=admin

Enabling publishing in CC

To enable publishing in CC, follow the steps below:

  1. Update the dataPublisher enable property to to <dataPublisher enable=”true”> in the cloud-controller.xml file, which is in the <CC_HOME>/repository/conf/ directory.
  2. Edit the carbon.xml file, which is in the <CC_HOME>/repository/conf/ directory, as follows:
    1. Set the IP address and BAM port.
    2. Uncomment <BamServerURL> and replace it with the following and set the IP_ADDRESS and PORT as the BAM IP and Thrift port.
      <BamServerURL>IP_ADDRESS:PORT</BamServerURL>

Configuring metering statistics in BAM

The following configurations need to be done on WSO2 Business Activity Monitor (BAM):

  1. Edit the master-datasources.xml file, which is in the <BAM_HOME>/repository/conf/datasources/ directory, as follows:
    1. Add WSO2MYSQL_DATASOURCE to connect to an external MySQL database.
    2. Replace MYSQL_HOSTNAME, MYSQL_PORT, MYSQL_USERNAME and MYSQL_PASSWORD with relevant values.

      <datasource>
         <name>WSO2MYSQL_DATASOURCE</name>
         <description>The datasource used for BAM Statistics dashboard</description>
         <definition type="RDBMS">
            <configuration>
               <url>jdbc:mysql://MYSQL_HOSTNAME:MYSQL_PORT/StratosStats</url>
               <username>MYSQL_USERNAME</username>
               <password>MYSQL_PASSWORD</password>
               <driverClassName>com.mysql.jdbc.Driver</driverClassName>
               <maxActive>50</maxActive>
               <maxWait>60000</maxWait>
               <testOnBorrow>true</testOnBorrow>
               <validationQuery>SELECT 1</validationQuery>
               <validationInterval>30000</validationInterval>
            </configuration>
         </definition>
      </datasource>
  2. Copy the MySQL connector JAR into <BAM_HOME>/repository/components/lib directory.
  3. Install Private_PaaS_Statistics_Monitoring.tbox.

    The Toolbox includes a Hive analytic script and a jaggery application. The Hive script is used to retrieve data from the Cassandra column family and insert it into an external MySQL database. 
    The Jaggery application is designed in order to display metering information for each tenant. Single tenant and multi-tenant cartridge information are displayed separately via the WSO2 Private PaaS dashboard, which can be accessed via the UI.

     
  • No labels