Versions Compared

Key

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

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

Image Modified

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

Image Modified

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.

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

Enabling publishing in 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>

...

  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.

      Code Block
      <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 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.