The JMX agent of WSO2 DAS monitors JMX attributes of a required JMX-enabled server (e.g. Carbon-based servers), and stores monitored data in WSO2 DAS. It uses the Thrift API of WSO2 DAS to send monitored data to DAS server. You can create a JMX monitoring profile to monitor a set of attributes from a single JMX server.
...
- Log in to the management console using admin/admin credentials and the following URL:
https://<DAS_HOST>:<DAS_PORT>/carbon/
- Click Configure, and then click JMX Agent.
- Click Add JMX Server Profile, to add a new monitoring profile.
Enter the required details as shown below.
The details you enter in the above screen are described below.Field Description Example Name Unique name of the server profile. testProfile
Schedule CROn expression defining how often the attributes should be monitored. once every 2 seconds (0/2**?**)
Server URL The JMX server URL. service:jmx:rmi://localhost:11111/jndi/rmi://localhost:9999/jmxrmi
(Use this example to monitor DAS by itself).Note Change all occurrences of the host and port (if you have set a port offset on the server) accordingly in the JMX server URL.
User Name The username of the JMX server. admin
Password The password of the JMX server. admin
- Click Load MBeans. You see the loaded MBeans of the JMX server as shown below.
- Click an MBean on the list that loads to view its attributes list.
- Select the attributes that you require to monitor by this profile as shown below. You can set an alias to easily identify the data in the Data Access Layer of WSO2 DAS.
Click Save . You view the new server profile added to the list of existing profiles as shown below.
Info You can enable/disable monitoring of JMX attributes, and also edit or delete the monitoring profiles using the options provided in this screen.
Info After you edit the server profile, click No in the below pop-up message, to add the changes to the existing version of the server profile, or click Yes to save the changes by incrementing the version of the server profile as shown below.
...
WSO2 DAS is shipped with a sample C-App for the JMX Agent. This includes all the artifacts which you need to publish data to the JMX agent which you enabled above, and to persist that data. Follow the steps below to upload this sample Carbon Application (c-App) file to the DAS. For more information, see Carbon Application Deployment for DAS .
- Log in to the DAS management console using the following URL: https
https://<DAS_HOST>:<DAS_PORT>/carbon/
- Click Main, and then click Add in the Carbon Applications menu.
- Click Choose File, and upload the
<DAS_HOME>/samples/capps/JMX_Agent.car
file as shown below.
- Click Main , then click Carbon Applications, and then click List view, to see the uploaded Carbon application as shown below.
Viewing the output
You may use the Data Explorer of the WSO2 DAS Management Console to browse published events.
Using the Data Explorer
Follow the steps below to use the Data Explorer to view the output.
- Log in to the DAS management console if you are not already logged in.
- Click Main, and then click Data Explorer in the Interactive Analytics menu.
- Select
JMX_AGENT_TOOLBLX
for the Table Name as shown below.
- Click Search. You view the published data as shown below.