Create a custom JMX Monitor in SAM
In addition to out-of-the-box application monitoring templates, SAM includes predefined component monitors, including aJMX Monitor that's included in several templates, such as the JBoss (JMX) template.
Although you can customize JMX Monitors at the template level, that's not always practical because MBeans can vary so much in different environments.
Instead, consider using the Component Monitor Wizard to create a custom JMX Monitor that you can assign to a node to poll managed beans (MBeans) on target Java application servers and JVMs. The wizard walks you through each step of the process and provides a list of available MBeans.
Before proceeding, note the following details:
- To set up nodes for monitoring, see Configure Java application servers and JVMs.
- The JMX Monitor supports Orion agents for Windows, Linux, and AIX. Note that agentless and Orion agent for Windows polling use the JMX Bridge Service but Linux-based JMX queries run locally through the Orion agent itself. For details, see this THWACK post.
- The following Orion Platform features do not support JMX monitoring:
- Only numeric values are monitored. To monitor string data, consider using a custom script.
Supported data types include:- java.lang.Byte
- java.lang.Short
- java.lang.Integer
- java.lang.Long
- java.lang.Double
- java.lang.Float
- To monitor Apache Tomcat servers, SolarWinds recommends using the Tomcat Server monitor.
SolarWinds recommends testing JMX components individually. Testing large numbers of JMX component monitors can impose heavy loads on agents and return incorrect results.
Prerequisites
Target nodes are set up, as described in Configure Java Virtual Machines for JMX monitoring in SAM.
Credentials
You may or may not need JMX credentials or none at all, depending on the target server configurationcredentials required by your Java application server.
To create a custom JMX Monitor in the Component Monitor Wizard:
- Click Settings > All Settings > SAM Settings > Component Monitor Wizard.
- On the Select Monitor Type tab of the wizard, select Java JMX Monitor as the component monitor type and click Next.
- On the Select Target tab, provide details about the target server, and then click Next.
- On the Select Components tab, a list of available MBeans appears, as shown here. Expand the folders by clicking the arrows (or [+]) to expand the tree view folder structure. Drill down to select the attributes you want to monitor.
- After selecting MBeans to monitor, click Next to complete the remaining tabs in the wizard.
- When finished, click OK, Create to save your new component monitor.
The following figure shows how polled MBeans look when successfully monitored within SAM:
An alternative method: Customize a JMX Monitor manually
If you decide not to use the Component Monitor Wizard to build a custom JMX Monitor, you can adjust values for an JMX Monitor in a template or application monitor manually, as shown in the illustration below.
Entering the correct information can be complicated and cumbersome. This method is best suited for an administrator who is very familiar with the Java environment.