Documentation forServer & Application Monitor

Create a custom JMX Monitor in SAM

Similar to how SAM provides out-of-the-box (OOTB) templates, SAM also includes predefined component monitors that you can use to start monitoring your environment quickly. As you get to know SAM, you can customize templates and component monitors to gather the exact information you need.

For example, SAM includes an OOTB JMX Monitor and some templates (for example, JBoss (JMX)) also include JMX monitors that communicate with JMX application servers to poll available managed beans (MBean) and return results. You can also create your own JMX monitors to pull specific data from target JMX servers, which may have large amounts of variables.

To learn more about the JMX Monitor included in SAM, see JMX Monitor in SAM online help.

There are several ways to create a custom JMX monitor, including:

  • Edit an existing template or application monitor that already includes the OOTB JMX Monitor. Expand the component monitor row on the Edit Template page and adjust the JMX settings (for example, Object Name and Attribute Name), as necessary.
  • Use the Component Monitor Wizard, as described next. The wizard-driven interface can simplify the creation of JMX component monitors by walking you through the process and providing a list of available MBeans.

Note the following details about the OOTB JMX Monitor:

  • The JMX Monitor supports the Orion agents for Windows, Linux, and AIX.
  • Agentless and Orion Agent for Windows polling use the JMX Bridge Service but the Linux agent does not. Linux-based JMX queries run locally through the Orion agent itself. For details, see this THWACK post.
  • 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

  • Set the JAVA_HOME environment variable for the server, as directed in vendor documentation. If the value is not set, the following message may appear in Orion agent Python logs: "Exception: Unable to determine JAVA_HOME."

    Download a free GUI-based JVM environment monitoring tool, JConsole, here. (© 2019 Slashdot Media, available at http://jconsole.sourceforge.net, obtained on November 27, 2019.)

  • To monitor Tomcat, SolarWinds recommends using the Tomcat Server monitor.
  • SolarWinds recommends testing JMX components individually for best agent performance and results. When testing a large number or all JMX component monitors in the Edit Application page, the agent is put under heavy load and could return incorrect results.

Prerequisites

The JMX connector is enabled on the Java application server. See Configure Java Virtual Machines for JMX monitoring in SAM.

Credentials

You may need either JMX credentials or none at all, depending on the credentials required by your Java application server.

To create a JMX monitor in the Component Monitor Wizard:

  1. Click Settings > All Settings > SAM Settings > Component Monitor Wizard.
  2. On the Select Monitor Type tab of the wizard, select Java JMX Monitor as the component monitor type and click Next.
  3. On the Select Target tab, provide server configuration details for the target JMX server, and then click Next.
  4. 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.

  5. When finished selecting MBeans to monitor, click Next and complete the other tabs in the wizard.
  6. Insert this argument in the Java command that publishes the platform MBean server to your local environment: Dcom.sun.management.jmxremote

Following is an illustration of how polled MBeans look when successfully added and implemented within SAM:

If you choose not to use the wizard, manually enter values for each JMX monitor, 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.