KBI 311380 Enhancement: New Rule Category Custom MBeans Attributes Rules In Argent for Java
Version
Argent Advanced Technology 3.1A-1601-T6 and later
Date
Tuesday, 19 April 2016
Summary
Argent for Java has been enhanced with a new Rule category ‘Custom MBeans Attributes Rules’ to monitor the Java applications runs in following Application/Web servers
- Apache Tomcat
- Jboss
- Glassfish
- WebLogic
- WebSphere
Technical Background
Argent for Java uses Java Management Extensions (JMX) technology to monitor an application running in a Java Virtual Machine (JVM)
The Managed Bean or MBean is the fundamental concept of the JMX API
The MBeans are Java objects that represent the manageable resources in the application running in the Java Virtual Machine
Each MBean is a collection of named and typed attributes that can be read and written
We can read the values of required attributes on concerns like performance, resources usage or problems
The ‘Custom MBeans Attributes Rules’ in Argent for Java enables you to monitor the JVMs running in different Application/Web servers
Each running application has its own collection of MBean objects
The monitoring is achieved by reading the required attribute values of JMX MBean object
All you need is to specify the MBean object name and attribute name in the Rule screen
Following is the screenshot of the Rule:
There is an option to specify the Object, Counter and Instance name of Argent predictor data
Note: ‘Custom MBeans Attributes Rules’ monitors the values of numeric type MBean object attributes
How To Get JMX Object Name And Attribute Name:
It is important to specify the correct object name and attribute name in the Rule screen
We can use a tool named Jconsole to get JMX MBean object names and its attributes
Jconsole is a GUI tool and comes as part of Java Development Kit (JDK)
Jconsole lists all available JMX MBean object names, attribute names, attribute values etc
Jconsole can be started using “jconsole” command:
The Jconsole GUI will start as following:
Get the hostname and port in which JVM is running from the License Node property screen of Argent for Java
Specify the hostname and port number in Jconsole GUI shown below:
Select ‘MBeans’ tab, there you can see a list of MBean object categories
Some MBean object categories are specific for some platform
For example, the object category Catalena is specific for Apache Tomcat
Following highlighted object categories are specific for Jboss
You can get a particular object name from the category
For example, if you want to monitor the number of threads created on the Apache Tomcat container, go to category ‘Catalina -> ThreadPool – > Select object name’ as shown below:
Copy the value of field ‘ObjectName’ from the right pane and paste to the ‘JMX Object Name’ input box of Rule screen of Argent for Java
Select the attribute ‘currentThreadCount’ under ThreadPool object name as shown below:
Copy the attribute name from the right pane and paste to the ‘Attribute Name’ input box in the Rule screen of Argent for Java
Resolution
Upgrade to Argent Advanced Technology 1601-T6 or later