JBoss monitoring: revision of its theoretical base for its implementation
JBoss, the application server developed in Java EE, has become one of the most use free software alternatives for tools such as IBM Websphere and Oracle WebLogic. Hence, the growing interest among administrators and developers to establish a JBoss monitoring scheme.
Monitoring of JBoss is due to the same objectives that motivate the monitoring of any application server, among which we can highlight the following:
- Ensuring that application performance is not affected by server behavior.
- Anticipating problems in servers that can put applications at risk
- Contributing to minimize application downtime.
To achieve these goals, the monitoring tools develop pieces of software that allow us to have an integral visualization of the servers.
Understanding how these monitoring pieces are developed for the case of JBoss, and the theoretical basis behind them, will give the reader the tools to evaluate the capabilities and limitations offered by different monitoring platforms.
So, with the monitoring of JBoss, we must start by asking the following question:
How do we communicate the monitoring tool in question with the JBoss server so that the values of the parameters we want to measure can be extracted efficiently?
The answer focuses on the understanding and use of two key elements:
- The implementation in JBoss of JMX (Java Management eXtensions) which is in itself, a management and monitoring scheme of Java.
- The use of the JConsole tool that allows interaction with the elements defined by the JMX architecture.
In this article we will review these elements and then discuss possible development strategies for JBoss monitoring.
JMX is implemented through a three-layer model that can be reviewed as follows:
1. Instrumentation layer
Let’s start from a resource in the JBoss server from which it is necessary to obtain information for its management and/or monitoring. These resources, in the JMX field, are called “manageable resources”.
In this layer, JMX implements a Java object known as MBean (Managed Bean) which is in charge of implementing the management and monitoring that will be done on the manageable resource.
To simplify things, we can see MBeans as programs that provide us with a group of actions on the resource, record data associated with it and establish the mechanisms for communicating that data.
The MBean capabilities are suited to the nature of the manageable resource, therefore one MBean may differ greatly from another. However, the JMX architecture proposes to establish a standard implementation scheme for MBeans in order to facilitate the work of the higher levels.
2. Agent Layer
To organize the interaction of external systems with MBeans and in an effort to decouple MBeans from the tools that will use them, JMX implements a MBean Server.
The MBean server will then be responsible for providing the methods to perform the following actions on the MBeans:
Another responsibility of the MBean Server is to define the access methods to MBeans. Each MBean that is integrated into the MBean server begins to be manageable, meaning, it begins to be remotely accessible through the connectors and adapters associated with the MBean server.
We will better understand the usefulness of these connectors and adapters in the next layer.
3. Distributed Services Layer
This layer defines the interaction schemes with MBeans, ensuring that this interaction is flexible, secure and that it generates the lightest possible communication.
This is achieved by implementing different adapters that offer a varied range of connection options. Here we have a classification according to the protocols used:
- RMI (Remote Method Invocation) Adapter
- HTTP Adapter
- SNMP adapter
JConsole is a graphical Java monitoring tool that complies with the JMX architecture specifications and is part of the JDK (Java Development Kit), therefore being a free tool.
JConsole allows us to access the MBean Server from the agent layer and has proven to be widely used by both JBoss server administrators and monitoring tool developers.
Having the JMX architecture fundamentals clear and the JConsole tool introduced, let’s now think of a monitoring software that wants to implement a JBoss monitoring scheme.
Monitoring tools that require access to information about JBoss server behavior must interact with the JMX architecture they deploy.
Considering the types of adapters in the distributed services layer, we can mention at least three types of strategies:
1. Creating one or more Add-ons
This option starts from the interaction with the RMI Adapter and is developed by installing the JConsole, regularly on a different server than the one you want to monitor. With JConsole you can identify the MBeans that are of interest, from which a program is created to collect the MBean information and then transfer it to a format that can be interpreted by the monitoring system.
2. Interpreting MBean information through SNMP traps
In this strategy, there is interaction with the SNMP adapter and the main challenge is to translate the data provided by the MBean into SNMP traps, which the system can recognize and manipulate.
3. Develop a WEB solution to extract information from MBeans
Here, the idea is to use the HTTP adapter to establish communication between the JMX architecture and a WEB application, which after obtaining the data, adequates them to be recognized and manipulated by the monitoring system.
As the reader will be able to infer, given the flexibility of the JMX architecture and the potential of JConsole, other strategies are feasible in this interesting world of JBoss monitoring.
About Pandora FMS
Pandora FMS is a flexible monitoring system, capable of monitoring devices, infrastructures, applications, services and business processes.
Of course, one of the things that Pandora FMS can control is the hard disks of your computers.
Would you like to know more about what Pandora FMS can offer you? Discover it by entering here: https://pandorafms.com
If you have more than 100 devices to monitor, you can contact us through the following form: https://pandorafms.com/en/contact/
Also, remember that if your monitoring needs are more limited you have at your disposal the OpenSource version of Pandora FMS. Find more information here: https://pandorafms.org