Non-Windows OS and monitoring concepts are sometimes difficult for Windows and Operations Manager 2012 (OpsMgr) administrators working mostly the Windows OS. Crossing over into the UNIX and Linux world, the new Java Enterprise Edition (JEE) application performance monitoring feature extends OpsMgr 2012 monitoring capabilities into world of JEE applications on both Windows and UNIX / Linux computers. In this post, I’ll try to provide some clarification into JEE monitoring concepts and draw some parallels to Windows monitoring I think may be helpful.
In this Installment
Some questions we’ll explore and concepts we’ll clarify in this installment include:
- What is the Java Management Extension (JMX)?
- What is an MBean?
- What is BeanSpy?
- Do I need to install Beanspy on every Java application server?
What is the Java Management Extension (JMX)?
Java Management Extension (JMX) is a Java technology that supplies tools for managing and monitoring applications, system objects, devices (e. g. printers) and service oriented networks. Those resources are represented by objects called Managed Beans (MBeans).
What is an MBean?
“Managed Bean” (or MBean for short) is a Java approach for application monitoring and management, which has multiple named attributed (properties) that can be read or written. It may help to think of MBeans as the equivalent of Windows performance counters, exposing server and application performance metrics. MBeans are registered to an MBean Server. An MBean Server is a repository (store) of MBeans. Each MBean is registered with a unique name within the MBean Server. Usually the only access to the MBeans is through the MBean Server. There are actually 5 different types of MBeans, but this is not important for purposes of this discussion.
For anyone familiar with Windows and Windows performance counters, it may help to think of MBeans this way
- MBean = Performance Object (like Processor or Memory objects on a Windows computer)
- MBean Property = Performance Counter (like ‘% Processor Time’ or ‘% Committed Bytes in Use’ counters on a Windows computer)
What is BeanSpy?
BeanSpy is a lightweight java component designed by Microsoft (pictured in figure 1 below) to to retrieve information from MBeans via JMX and report the data to Operations Manager 2012. The resource footprint of BeanSpy is virtually undetectable and impact to application throughput is zero. BeanSpy must be installed on the Java application server and security configured…a topic we’ll cover in another blog post.
Figure 1. JEE APM architecture on Windows
Do I need to install Beanspy on every Java app server?
Only if you want to monitor it! Just the other day, I heard the question Can I install BeanSpy on ServerX, but use it to retrieve information from ServerY? The short answer is “no”, the data is retrieved from the local MBean store.
Every Java application server has local registered MBeans accessible through the local MBean Server. Trying to query information about an MBean on ServerY using BeanSpy on ServerX would be like querying an IIS Server named ServerA for “Web Service\Current Anonymous Users” and expecting to get the last value of this counter for ServerB. It just wouldn’t work.
Figure 2. JEE APM architecture on UNIX / Linux
In the next installment on JEE Application Performance Monitoring, I’ll talk about BeanSpy installation and security for those server when authentication is enabled…a topic somewhat lacking in coverage at this time.
In addition to the master list of System Center PowerShell, here are some Operations Manager 2012 PowerShell resources you may find useful.