SevOne logo
You must be logged into the NMS to search.

Table of Contents (Start)

JMX Quick Start Guide - SevOne NMS 5.7

SevOne Documentation

All SevOne user documentation is available online from the SevOne Support customer portal.

Copyright © 2005-2020 SevOne Inc. All rights reserved worldwide.

All right, title, and interest in and to the software and documentation are and shall remain the exclusive property of SevOne and its respective licensors. No part of this document may be reproduced by any means nor modified, decompiled, disassembled, published or distributed, in whole or in part, or translated to any electronic medium or other means without the written consent of SevOne.

In no event shall SevOne, its suppliers, nor its licensors be liable for any damages, whether arising in tort, contract, or any other legal theory even if SevOne has been advised of the possibility of such damages, and SevOne disclaims all warranties, conditions, or other terms, express or implied, statutory or otherwise, on software and documentation furnished hereunder including without limitation the warranties of design, merchantability, or fitness for a particular purpose, and noninfringement.

All SevOne marks identified or used on the SevOne website, as updated by SevOne from time to time, may be, or are, registered with the U.S. Patent and Trademark Office and may be registered or pending registration in other countries. All other trademarks or registered trademarks contained and/or mentioned herein are used for identification purposes only and may be trademarks or registered trademarks of their respective companies.

Introduction

JMX stands for Java Management Extensions. It's a nifty technology for application monitoring. But that's not all. It's also great for monitoring other resources, such as devices, services, and Java virtual machines (JVMs). You can monitor all these resources as they're created, installed, and implemented. What's more, when you use SevOne NMS for JMX monitoring, you can perform historical analyses on JMX data as well as set up baselining and alerting.

The JMX architecture can be broken down into three layers, or levels. On one side, we have the Instrumentation Level, which includes the things that you want to manage or monitor.

The Agent Level represents the middle layer. The main component of this level is the MBean server, where Managed Beans (MBeans) are registered. These magic beans expose management interfaces on the resources from the Instrumentation Level, making it possible for them to be monitored.

Lastly, we have the Remote Management Level. This layer is made up of connectors and adaptors that enable remote applications, such as SevOne NMS, to access the MBean server. The Remote Management Level sends requests and commands to the Agent Level.

This document will get you set up for monitoring with JMX. First, we'll walk through the necessary steps to enable the JMX plugin within SevOne NMS. Then we'll take a close look at managing JMX Object Types and Indicator Types.

Why JMX?

JMX has a number of selling points, including the following:

  • It can run on almost all devices enabled with Java technology.

  • It's protocol-independent.

  • It can be be used to monitor a large number and wide variety of resources.

  • It provides access to real-time information about resources.

Last, but not least, it's useful for monitoring Minecraft servers. You can use it for all kinds of important information, such as player statistics and number of blocks placed, for example.

Prerequisites

In this section, we'll cover the information you'll need before getting started. We'll also look at enabling devices to send JMX data to SevOne NMS.

Things You'll Need

Make sure to have the following ready:

  • JMX server host name or IP address

  • User name and password to authenticate onto the JMX server (only necessary if you plan to use authentication)

Enable Devices to Send Data to SevOne NMS

You'll need to enable your devices to send JMX data before going on to the next section. The subsections below include instructions for a number of devices. This workflow is outside of SevOne NMS and may not include all of the steps that your network requires to enable devices to send JMX data. You may need to refer to your device manufacturer's documentation for specific instructions.

The port numbers and IP addresses included in the commands below are examples. If necessary, replace them with the appropriate port numbers and IP addresses for your specific devices.

Tomcat

For Tomcat servers, you'll need to enter the following commands in the startup script.

JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=8007"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"
JAVA_OPTS="$JAVA_OPTS -Djava.rmi.server.hostname=192.168.50.213"

WebLogic

For WebLogic, enter the following commands in the startup script.

/opt/Oracle/Middleware/wlserver_10.3/samples/domains/wl_server/bin/startWebLogic.sh
JAVA_OPTIONS="$JAVA_OPTIONS -Dcom.sun.management.jmxremote"
JAVA_OPTIONS="$JAVA_OPTIONS -Dcom.sun.management.jmxremote.port=8007"
JAVA_OPTIONS="$JAVA_OPTIONS -Dcom.sun.management.jmxremote.authenticate=false"
JAVA_OPTIONS="$JAVA_OPTIONS -Dcom.sun.management.jmxremote.ssl=false"
JAVA_OPTIONS="$JAVA_OPTIONS -Djava.rmi.server.hostname=192.168.30.251"
JAVA_OPTIONS="$JAVA_OPTIONS -Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder"

You'll also need to enable this on the Administrative page. Navigate to Domain > Configuration > General page > Advanced options. Then select usePlatformMBean and exportPlatformMBean.

JBoss

Enter the following commands to enable JBoss to send JMX data. Change the host name and IP address to /etc/hosts to connect. The server name can't be listed under 127.0.0.1.

In /opt/jboss/bin/run.sh add #Setup jmx remoting

JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=8007"

Use the JBoss MBeanServerBuilder.

JAVA_OPTS="$JAVA_OPTS -Djboss.platform.mbeanserver"
JAVA_OPTS="$JAVA_OPTS -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl"

Use the jboss logmanager.

JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
JAVA_OPTS="$JAVA_OPTS -Dorg.jboss.logging.Logger.pluginClass=org.jboss.logging.logmanager.LoggerPluginImpl"
JBOSS_CLASSPATH="../lib/jboss-logmanager.jar"

GlassFish

First, increase the monitoring to HIGH on the Web Admin page. Then enter the following commands to enable GlassFish version 3.1 to send JMX data.

In the domain configuration file /glassfish/domains/domain1/config/domain.xml find <java-config> and add the following:

-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false

Find <admin-service> and add/modify:

<jmx-connector accept-all="true" port="8007" address="0.0.0.0" security-enabled="false" name="system" auth-realm-name="admin-realm" />

WebSphere 6.1

  1. In the command line interface (CLI), enter the following commands.

    1. Install the server.

      yum install compat-libstdc++-* libXp libXmu
    2. Run the server.

      /etc/init.d/webspherejmxserverNode01_was.init start
  2. Log in via the admin console and make sure that the JMX RMI connection is established.

    1. Use the Python script ListPorts to get the admin port.

      ./wsadmin.sh -conntype none -lang jython -profileName AppSrv01 -f /opt/ListPorts.py
    2. Log on to the server.

      admin:admin
  3. Return to the CLI and disable security.

    ./wsadmin.sh -conntype NONE
    wsadmin>securityoff
    wsadmin>$AdminConfig save
  4. Connect with the following script.

    #!/bin/bash
    HOST=
    PORT=
    WAS_HOME=/home/dkozlowski/IBM/WebSphere/AppServer
    CLIENTSAS="-Dcom.ibm.CORBA.ConfigURL=file:`pwd`/sas.client.props"
    PROVIDER="-Djava.naming.provider.url=corbaname:iiop:$HOST:$PORT"
    PROPS=
    #PROPS="$PROPS $CLIENTSAS"
    #PROPS="$PROPS $PROVIDER"
    CLASSPATH=
    CLASSPATH="$CLASSPATH:$WAS_HOME/java/lib/tools.jar"
    CLASSPATH="$CLASSPATH:$WAS_HOME/runtimes/com.ibm.ws.admin.client_7.0.0.jar"
    CLASSPATH="$CLASSPATH:$WAS_HOME/runtimes/com.ibm.ws.ejb.thinclient_7.0.0.jar"
    CLASSPATH="$CLASSPATH:$WAS_HOME/runtimes/com.ibm.ws.orb_7.0.0.jar"
    CLASSPATH="$CLASSPATH:$WAS_HOME/java/lib/jconsole.jar"
    URL=service:jmx:iiop://$HOST:$PORT/jndi/JMXConnector
    java -classpath $CLASSPATH $PROPS sun.tools.jconsole.JConsole $URL

WebSphere 8.5

  1. Log on to the WebSphere Admin Console.

  2. On the left, click + next to Servers to expand the options.

  3. Click + next to Server Types to display the Server Types options.

  4. Click the WebSphere application servers link to display the application servers on the right.

    images/download/attachments/33033015/websphereApplicationServers.png
  5. Click on the server to administer.

    images/download/attachments/33033015/selectServerToAdminister.png
  6. On the right side of the page, under Server Infrastructure, click Administration services to display the Administration Services options.

    images/download/attachments/33033015/administrationServices.png
  7. In the Additional Properties section, click JMX Connectors.

    images/download/attachments/33033015/jmxConnectors.png
  8. Select the SOAPConnector check box, if needed.

    images/download/attachments/33033015/soapConnector_checkbox.png
  9. Return to the previous page.

  10. In the General Properties section, click the Remote connector drop-down and select SOAPConnector.

    images/download/attachments/33033015/soapConnector_dropdown.png
  11. Click Apply.

  12. Return to the Servers page to find the port for SevOne NMS to use to monitor the device.

    images/download/attachments/33033015/serversPage_findPort.png
  13. In the Communications section, click + next to Ports to expand the Ports list.

  14. Make a note of the SOAP_CONNECTOR_ADDRESS port number. This port number is used for the device on the Edit Device page, which we'll look at in the next section (Enable JMX Plugin).

Configuration Steps

In the following subsections, we'll walk through the steps to configure the JMX plugin and manage JMX object types and indicator types.

Enable JMX Plugin

The JMX plugin enables you to monitor Java Management Extensions (JMX) systems. It's disabled on new devices by default because it requires device-specific configuration.

Perform the following steps to enable the JMX plugin for devices .

  1. From the navigation bar, click Devices and select Device Manager.
    images/download/attachments/33033015/deviceMgr.png

  2. Perform one of the following actions.

    • To add a new device, click Add Device under Devices to display the New Device page. For information on adding new devices, please see our documentation on the topic.

    • To edit an existing device, select the device and click images/download/attachments/18554274/icon_wrench_blueBackground.png to display the Edit Device page.

  3. The plugin section appears in the lower half of the page. It's set to SNMP by default.
    images/download/attachments/33033015/editDevice.png

  4. Next to SNMP, click the drop-down and select JMX.
    images/download/attachments/18554274/image2015-11-16-16_26_26.png

  5. Select the JMX Capable check box.
    images/download/attachments/18554274/image2015-11-16-16_24_42.png

  6. In the Hostname field, enter the host name or IP address of the JMX server.

  7. In the Port field, enter the port number on the JMX server that you want SevOne NMS to use.

  8. Click the Connection Type drop-down and select one of the following options.

    • JSR160 - to connect to most JMX servers via JSR160.

    • AdminClient - to use the IBM AdminClient protocol.

  9. Click the Authentication Method drop-down and select one of the following options.

    • None - to not use any authentication method to access the device.

    • Username/Password - to have SevOne NMS use a user name and password to access the device. If you choose this option, two additional fields will appear where you can enter the credentials for authenticating onto the device.

      images/download/attachments/18554274/image2015-11-16-16_30_59.png
  10. If you use WebSphere v8.5, select the Use Keystore check box and perform the following actions to select the Keystore and to enter the SSL credentials that enable you to use the JMX Keystore feature. Leave the check box clear if you don't use WebSphere v8.5.

    images/download/attachments/18554274/image2015-11-16-16_33_50.png

    1. Click Upload Keystore to display the Import New Keystore pop-up.

      images/download/attachments/18554274/image2015-11-16-16_34_41.png
    2. Click images/download/attachments/33033015/icon_folder.png to navigate your file system and select the Keystore.

    3. In the Keystore Password field, enter the password that SevOne NMS needs to authenticate onto the device.

    4. Click Save.

  11. If you use WebSphere v8.5, select the Use Truststore check box and perform the following actions to select the Truststore and to enter the SSL credentials that enable you to use the JMX Truststore feature. Leave the check box clear if you don't use WebSphere v8.5.

    images/download/attachments/18554274/image2015-11-16-16_37_56.png

    1. Click Upload Truststore to display the Import New Truststore pop-up.

      images/download/attachments/18554274/image2015-11-16-16_39_18.png
    2. Click images/download/attachments/33033015/icon_folder.png to navigate your file system and select the Truststore.

    3. In the Truststore Password field, enter the password SevOne NMS needs to authenticate onto the device.

    4. Click Save.

  12. In the Connection Suffix field, enter the JMX server suffix that SevOne NMS needs to gain access to the JMX server.

    This is set to jmxrmi by default and shouldn't be changed.

  13. In the Name Filter field, enter the name of the filter to use to generate the names for the JMX objects.

  14. In the Object Filter field, enter the filters to use to limit the discovery of JMX objects. To separate filters, use the ; character.

  15. If you're on the New Device page, click Save As New to display the Edit Device page for this device. Otherwise–if you're editing an existing device–click Save.

  16. Click Edit Indicator Types to Monitor to display the JMX Poller Indicator Type Mapping page, where you can enable or disable the JMX indicator types to poll. For more information on indicator type mapping, please see SevOne's documentation on the topic.
    images/download/attachments/33033015/image2016-1-27-14_42_8.png

  17. Click Save Changes to save any changes that you made. To return to the Edit Device page, click Device Editor.

JMX Object Types

In this section, we'll look at the Object Types page, where you can manage JMX object types. Object types let you determine which objects are discovered on a device. The JMX plugin discovers the JMX object types on the devices that you enable to send JMX data to SevOne NMS. JMX object types are disabled by default. The Object Rules page lets you define rules to disable polling of objects, and the Object Manager lets you manage the objects on each device.

JMX Object Types Best Practices

The following are best practices when managing JMX object types.

  1. For any JMX object types that you want to enable, make sure that they're enabled before discovering the applicable device. Otherwise, you will need to rediscover the device.

  2. Only enable the object types that you want for the applicable device–don't enable all object types. Enabling all object types can slow down discovery.

Manage JMX Object Types

Perform the following steps to add and edit JMX object types.

  1. From the navigation bar, click Administration and select Monitoring Configuration, then Object Types.

    images/download/attachments/18554274/image2015-11-16-17_46_37.png
  2. Click the Filter drop-down and select JMX Poller. In the Object Types hierarchy on the left, you'll see the object types that the JMX plugin can poll.

    images/download/attachments/18554274/image2015-11-16-17_48_11.png
  3. Click Add to display the Add JMX Object Type pop-up. To edit an existing object type, select the object type and click images/download/attachments/18554274/icon_wrench_blueBackground.png under Actions.

    images/download/attachments/33033015/popup_objectType_jmx.png
  4. In the Name field, enter the object type name.

  5. In the Domain field, enter the object type domain.

  6. In the Type field, enter the type of the object type.

  7. In the Class Name field, enter the class name of the object type.

  8. In the Alias field, enter the alias of the object type.

  9. Select the Enabled check box to enable the JMX plugin to poll the indicator types of the object type.

  10. Select the check box for the Note field to enable it for editing. Enter any additional information you would like to include.

  11. Click Save As New.

JMX Indicator Types

Indicator types define the kind of metrics an object can have. I n this section, we'll walk through the steps for adding (and editing) indicator types. Every indicator of an object needs an indicator type. SevOne NMS plugins–such as SNMP, JMX, etc.–use indicator types to collect data from indicators on the objects that you monitor. There are two categories of indicator types : atomic and synthetic. Atomic indicator types are measured directly by plugins. Synthetic indicator types , on the other hand, calculate values based on the values resulting from other indicator types .

Manage JMX Atomic Indicator Types

Perform the following steps on the Object Types page to add and edit JMX atomic indicator types.

  1. In the Object Types hierarchy on the left, select the object type that you would like to create an indicator type for.

  2. On the right side of the page, under Indicator Types, click Add Atomic Indicator Type to display th e Add JMX Indicator Type pop-up . To edit an existing indicator type , select the indicator type and click images/download/attachments/18554274/icon_wrench_blueBackground.png under Actions .
    images/download/attachments/33033015/popup_atomicIndType_jmx.png

  3. In the Indicator Name field, enter the name of the indicator type.

  4. In the Description field, enter the name to display.

  5. Click the Indicator Type drop-down and select one of the following options:

    • GAUGE - for indicators that have specific values when polled.

    • COUNTER32 - for 32-bit indicators that continue to increment. If you select this option, you can select the Has Precalculated Deltas check box to total the delta/differences between polls. This provides the ability to graph things like the number of errors in a day, for example.

    • COUNTER64 - for 64-bit indicators that continue to increment. If you select this option, you can select the Has Precalculated Deltas check box.

  6. Click the Measure As drop-down and select a data unit to measure in.

  7. Click the Display As drop-down and select a display unit.

  8. Select the Maximum Value check box to indicate that the indicator type has a maximum value.

  9. Select the Default allowed for new devices check box to have the plugin poll this indicator type by default when the object type is enabled and when the plugin for a device is enabled.

  10. In the Note field, enter any additional information you would like to include.

  11. Click Save As New.

Manage JMX Synthetic Indicator Types

Using synthetic indicator types, you can create your own key performance indicators (KPIs) even when those KPIs–such as Percent Usage, Percent Loss, Percent Error, and Percent Idle–don't exist for a device. For example, let's say that you want to monitor voice gateways to find out which primary rate interface (PRI) is getting the most usage. Typical poll metrics can tell you the busy status of individual bearer channels, or B channels, but they can't tell you the sum of the statuses for all the B channels. This makes it difficult to find out the total usage of a particular PRI.

In SevOne NMS, you can create a single indicator type that tells you what percentage of a PRI is being used.

First, we need the following:

  • An existing indicator type that tells us how many busy B channels there are for a given PRI. Let's call this BChannelsBusy.

  • The total number of B channels for our PRI. That number is 23.

Using this information, we can create a synthetic indicator type with an expression to perform the following calculation:

(BChannelsBusy*23)/100

Now we have a new indicator type–a synthetic indicator type–that tells us what percentage of the PRI is being used. There's no need to look up the number of busy B channels and perform calculations manually.

Since synthetic indicator types are based on existing indicator types–either synthetic or atomic–there must already be at least one existing indicator type in order for you to create a new synthetic indicator type.

Perform the following steps on the Object Types page to add and edit JMX synthetic indicator types.

  1. In the Object Types hierarchy on the left, c lick on an object type to display its indicator types on the right. If the object type doesn't have any indicator types, the Add Synthetic Indicator Type button won't appear.

    images/download/attachments/18554274/image2015-11-16-19_17_7.png
  2. Click Add Synthetic Indicator Type to display the Add Synthetic Indicator Type pop-up. To edit an existing synthetic indicator type, select the indicator type and click images/download/attachments/18554274/icon_wrench_blueBackground.png under Actions.

    images/download/attachments/33033015/popup_synthIndType_jmx.png
  3. In the Indicator Name field, enter the name of the synthetic indicator type.

  4. In the Description field, enter the name to display.

    You'll see the indicator description displayed in reports and elsewhere in the UI. Keep this in mind when creating the indicator type description. For example, when you look at an object's indicators, you'll notice that they're listed based on the first word of their description. If you have the two indicators Received Bytes and Sent Bytes , they may not appear together. However, if you use the descriptions Bytes Received and Bytes Sent , the indicators will appear in close proximity to each other.

  5. The Synthetic Indicator Expression field is where you define the calculation. Perform the following actions to create the expression for this field.

    A red border around the Synthetic Indicator Expression field indicates that your calculation is invalid. This also means that your graph results will be incorrect.

    1. In the Available Source Indicators field on the right, select an indicator type to use in the expression. Drag and drop it into the Synthetic Indicator Expression field.

      The Available Source Indicators field contains the indicator types for the object type that you selected a few steps ago.

    2. Next, enter the applicable operators to formulate your calculation in the Synthetic Indicator Expression field. For a list of available operators, see Acceptable Operators below.

    3. Drag any additional indicator types from the Available Source Indicators field and enter additional mathematical symbols to complete the expression in the Synthetic Indicator Expression field.

  6. The Maximum Value Expression field lets you define a maximum value calculation for the indicator type. Perform the following actions to create the expression for this field.

    1. In the Available Source Indicators field on the right, select an indicator type to use in the expression. Drag and drop it into the Maximum Value Expression field.

    2. Next, enter the applicable operators to formulate your calculation in the Maximum Value Expression field. For a list of available operators, see Acceptable Operators below.

    3. Drag any additional indicator types from the Available Source Indicators field and enter additional mathematical symbols to complete the expression in the Maximum Value Expression field.

  7. Click the Measure As drop-down and select a data unit.

  8. Click the Display As drop-down and select a display unit.

  9. Select the Default allowed for new devices check box to have the plugin poll this indicator type by default when the object type is enabled and when the plugin for a device is enabled.

  10. In the Note field, enter any additional information you would like to include.

  11. Click Save As New.

Acceptable Operators

Your expression formula can include the following characters:

  • + add

  • - subtract

  • * multiply

  • / divide

  • && logical AND

  • || logical OR

  • <= less than or equal to

  • >= greater than or equal to

  • ! not equal to

  • == equal to

  • > greater than

  • < less than

  • ^ raise x to the power of y

  • % modulus

  • ?: if...then...else

  • isnan is Not a Number. This evaluates to 1 if the value is not a number. Otherwise, it evaluates to 0.

  • isValid is valid. This evaluates to 1 if the value has been discovered and is not isnan. Otherwise, it evaluates to 0.

  • useIfValid use if valid. This evaluates to the value if it has been discovered and is not isnan. It evaluates to the second argument otherwise.

If your calculation results in either of the following invalid values, there will be a gap in your graph:

  • Not a Number (NAN)

  • Infinity (+/-INF).

The following describes how SevOne NMS attempts to prevent invalid values. These are listed in the order that they're processed.

  • Zero divided by zero results in NAN.

  • Any positive value divided by zero results in +INF.

  • Any negative value divided by zero results in -INF.

  • Zero multiplied by +/-INF results in NAN.

  • Any value added to, subtracted from, multiplied by, divided by, or divided from NAN results in NAN.

  • Any value compared to NAN (<, <=, ==, >=, >) results in 0. NAN != NAN.

  • Any value compared to +INF is less than +INF, except that +INF == +INF

  • Any value compared to -INF is greater than -INF, except that -INF == -INF

  • Any value added to or subtracted from +INF results in +INF

  • Any positive value multiplied by +/-INF results in +/-INF

  • Any value divided by +/-INF results in 0

Troubleshooting

If you're having trouble getting JMX data, make sure that you've entered the correct IP address (or host name) for your JMX server. If you're using authentication, double-check that the user name and password are correct.

Terms

Java

A high-level, object-oriented programming language. Java is platform-independent.

JavaBean

A reusable software component written in Java.

Managed Bean (MBean)

A JavaBean that represents a manageable resource.