Configuring WSO2 ESB Server with Data Publishers
PS: Similarly, you can configure the other carbon server nodes as well (eg: WSO2 BPS, WSO2 DSS and WSO2 AS)
- Download WSO2 Enterprise Service Bus 4.0.2. Unzip the distribution to your preferred location. This directory will be referred as ESB_HOME.
- Remove the following jar from ESB_HOME/repository/components/plugins directory.
org.wso2.carbon.statistics-3.2.2.jar
- Place the following set of jars into ESB_HOME/repository/components/dropins directory. These jars will act as data publishers of WSO2 ESB.
- gson-2.1.jar
- org.wso2.carbon.bam.service.data.publisher.ui-3.2.3.jar
- libthrift-0.7.wso2v1.jar
- org.wso2.carbon.bam.services.stub-3.2.3.jar
- org.wso2.carbon.bam.activity.mediation.data.publisher.stub-3.2.3.jar
- org.wso2.carbon.eventbridge.agent.thrift-3.2.3.jar
- org.wso2.carbon.bam.data.publisher.util-3.2.3.jar
- org.wso2.carbon.eventbridge.commons-3.2.3.jar
- org.wso2.carbon.bam.mediationstats.data.publisher.stub-3.2.3.jar
- org.wso2.carbon.eventbridge.commons.thrift-3.2.3.jar
- org.wso2.carbon.bam.service.data.publisher-3.2.3.jar
- org.wso2.carbon.statistics-3.2.4.jar
- org.wso2.carbon.bam.service.data.publisher.stub-3.2.3.jar
- org.wso2.carbon.utils-3.2.3.jar
The above jars can be downloaded from the FTP Location
- Start up the WSO2 AS with the following command from the ESB_HOME/bin directory.
- Log into the management console with the credentials. Go to “Configure” tab. You will see a new feature has been listed in the menu named “Service Data Publishing”. When you clicked on the the feature, the UI will be as follows.
- Check the “Enable Service stats” check box under “Service Configuration”.
- Specify the Stream Definition Configuration parameters as preferred.
- Specify the “BAM URL” under “BAM Credential” in the following format.
tcp://<ip_address>:7611 (eg: tcp://10.10.12.79:7611)
- Click on “Update”.
PS: Similarly, you can configure the other carbon server nodes as well (eg: WSO2 BPS, WSO2 DSS and WSO2 AS)
Configure Standalone WSO2 BAM and Monitor Data
- Change the port offset of WSO2 BAM server, so that it will not get port clashes with earlier configured WSO2 ESB.
Change the <Offset> parameter in carbon.xml file that resides in BAM_HOME/repository/conf directory.
- Start up the server with the following command from the BAM_HOME/bin directory.
- Invoke the service/s deployed in WSO2 ESB.
- Login to the WSO2 BAM Management Console. Go to “Main” tab --> “Manage” menu --> “Cassandra Explorer” --> “Connect to Cluster”.
Provide the following inputs
Connection URL: localhost:9160
Username: admin
Password: admin
Click on “Connect”. - This will list the “Keyspaces”. Analyze the details of the respective Stream Name under “EVENT_KS” keyspace. A sample record will be as follows.
With these details, create a BAM Archive package and deploy as a “BAM Toolbox”.
- Create a Toolbox that contains the following components.
- Database script
- Gadget XMLs
- Jaggery scripts
The Toolbox should be packaged to a “.bar” package. The sample Toolbox can be found from the FTP location
- Deploy the Toolbox from “Main” tab --> “Manage” menu --> “BAM Toolbox” --> “Add” from the WSO2 BAM management console.
- From the Custom Toolbox table, browse for the created .bar package and hit on “Deploy”.
- Until the complete deployment, the status of the package will be shown as “Awaiting to Deploy”.
- Refresh the page until the status changes to “Deployed”.
- Go to “Main” tab --> “Manage” menu --> “Analytics” --> “List Scripts”.
- Click on “Edit”.
- This will open up the Script Editor and it will show the Database script that we have included in the deployed .bar package. Click on “Run”.
- With the successful execution of the script, it will show up the Results in the “Script Results” section below the “Script” editor section.
- Go to “Main” tab --> “Dashboard” menu --> “BAM Dashboard”. The deployed gadgets on the dashboard will be shown as follows.
No comments:
Post a Comment