com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_link3' is unknown.

Publishing Data to BAM as tenant

 You can publish events to BAM in the tenant mode using WSO2 products or using the samples shipped with WSO2 BAM product packs.

Using a data agent

You can use any configured external data agent to publish data to BAM in the tenant mode. For example, by using the BAM tenant credentials as the data receiver credentials, you can use WSO2 products to publish data to BAM in the tenant mode. Follow the below instructions to publish service statistics to BAM tenant space from WSO2 Application Server.

  1. Configure a service data agent in WSO2 Application Server.  For instructions, on creating a tenant in WSO2 ESB, see Setting up Service Statistics Data Agent.

    When configuring the service data agent in WSO2 Application Server, replace the default admin credentials with the credentials of the respective BAM tenant, under Data Receiver Credentials.

  2. Log in to BAM Admin Console using the tenant credentials.

  3. In the Tools menu, click Connect to cluster, and log in to the Cassandra cluster using the tenant credentials.
  4. Click EVENT_KS and you can view published data column family under the defined stream name.

Using a sample

By modifying the credentials, you can use the samples shipped with the product pack, to publish data to BAM in the tenant mode. Through these samples, BAM will receive events as tenant, and will save them in tenant space in Cassandra. For an example, modifying the KPI sample to publish data as tenant to BAM is described below. 

  1. Navigate to <PRODUCT_HOME>/samples/kpi-definition/src/main/java/org/wso2/carbon/bam/kpiagent/KPIAgent.java file.

  2. Modify the default values of the url, username, and password parameters defined in the the KPIAgent.java file as per the below example:

            String url = getProperty("url", "tcp://" + host + ":" + "7611");
            String username = getProperty("username", "tenantusername@tenantadmin.com");
            String password = getProperty("password", "admin123");
    In the above example, tenantusername is the username of the created tenant, tenantadmin.com is the domain name you have registered for the tenant, and admin123 is the tenant password.
  3. Navigate to <PRODUCT_HOME>/samples/kpi-definition/ directory and run the Ant script by typing ant from the command line. This will publish the events to your tenant space.  

  4. Log in to BAM Admin Console using the tenant credentials.

  5. In the Tools menu, click Connect to cluster, and log in to the Cassandra cluster using the tenant credentials. For example:

    Connection URL = 9160 + <port-offsett>
    username = tenantusername@tenantadmin.com
    password = admin123
  6. Click EVENT_KS and you can view published data column family under the org_wso2_bam_phone_retail_store_kpi stream name as follows: 

com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.