References > Template Reference > JBoss (JMX)

JBoss (JMX)

This template monitors JBoss server statistics by using the JMX protocol. You can use the Orion agent for Linux or SNMP agentless to monitor.

Important: JMX polling is not supported using an agent.

Prerequisites

Target server configured to allow JMX queries.

Template configuration changes

The following settings in the component monitors should be changed from defaults:

  • The template is configured to send JMX requests on port 8686. For this template, you should change the port to 9999.
  • The URL is set to /jmxrmi by default. For this template, you should change the URL to service:jmx:remoting-jmx://${IP}:${PORT}.

Credentials

Dependent on the JMX configuration.

JMX Configurations for Orion agent for Linux

For JMX configurations, you need to install and configure WebSphere per your Linux distribution. For details, see the IBM WebSphere documentation site.

The overall steps include:

  1. Get and install WebSphere. You may require credentials for the installation.
  2. During installation, you can turn off the secure storage option as this is not needed. You may need to create a new package group. Make sure to select the Application Server during installation. You may also need to create an administrator account.
  3. Start and stop the WebSphere AppServer.
  4. Access the WebSphere AppServer console to continue configurations. You can access by pointing a browser to http://<websphere-host>:9060/ibm/console. You may need to open a port to 9060 on the websphere host. Use the credentials for the account created during installation.
  5. You need to expose the JMX platform mbeans in the WebSphere AppServer using the console. Click Servers > Server Types > WebSphere application servers and select the listed application server.
  6. Locate the Java and Process Management > Process definition. In the dialog box titled "Generic JVM arguments" enter the following:

    Djavax.management.builder.initial=

    There is nothing after the = sign.

    Dcom.sun.management.jmxremote=true

    Dcom.sun.management.jmxremote.port=8686

    Dcom.sun.management.jmxremote.ssl=false

    Dcom.sun.management.jmxremote.authenticate=false

  7. Restart the AppServer.

Monitored Components

For details on monitors, see SAM Component Monitor Types.

All components may vary in a running environment. You can add your own threshold limits as needed.

Classes Loaded Count

This monitor returns the number of classes that are currently loaded in the Java virtual machine.

Classes Total Loaded Count

This monitor returns the total number of classes that have been loaded since the Java virtual machine has started execution.

Classes Unloaded Count

This monitor returns the total number of classes unloaded since the Java virtual machine has started execution.

Memory Pending Final Count

This monitor returns the approximate number of objects for which finalization is pending.

Memory Heap Init Size (B)

This monitor returns the initial amount of memory in bytes that the Java virtual machine allocates; or -1 if undefined.

Memory Heap Used (B)

This monitor returns the amount of used memory in bytes. The amount of used memory in the returned memory usage is the amount of memory occupied by both live objects and garbage objects that have not been collected, if any.

Memory Heap Committed (B)

This monitor returns the amount of committed memory in bytes.

Memory Heap Max Size (B)

This monitor returns the maximum amount of memory in bytes that can be used; or -1 if undefined.

Memory Non Heap Init Size (B)

This monitor returns the initial amount of memory in bytes that the Java virtual machine allocates; or -1 if undefined.

Memory Non Heap Used (B)

This monitor returns the amount of used memory in bytes.

Memory Non Heap Committed (B)

This monitor returns the amount of committed memory in bytes.

Memory Non Heap Max Size (B)

This monitor returns the maximum amount of memory in bytes that can be used; or -1 if undefined.

Memory Garbage Collections Count

This monitor returns the approximate accumulated collection elapsed time in milliseconds.

You should set the correct Object Name. You can see which names are available by running the Find Processes, Services, and Performance Counters wizard. In the wizard, expand java.lang, and GarbageCollector and check which names are available. By default, this counter uses: name=Copy.

Memory Garbage Collection Time (ms)

This monitor returns the approximate accumulated collection elapsed time in milliseconds.

You should set the correct Object Name. You can see which names are available by running the Find Processes, Services, and Performance Counters wizard. In the wizard, expand java.lang, and GarbageCollector and check which names are available. By default, this counter uses: name=Copy.

Memory Pool Init Size (B)

This monitor returns the initial amount of memory (in bytes) that the Java virtual machine requests from the operating system for memory management during startup. The Java virtual machine may request additional memory from the operating system and may also release memory to the system over time. The value of init may be undefined.

You should set the correct Object Name. You can see which names are available by running the Find Processes, Services, and Performance Counters wizard. In the wizard, expand java.lang and MemoryPool and check which names are available. By default, this counter uses: name=Code Cache.

Memory Pool Used (B)

This monitor returns the amount of memory currently used (in bytes).

You should set the correct Object Name. You can see which names are available by running the Find Processes, Services, and Performance Counters wizard. In the wizard, expand java.lang and MemoryPool and check which names are available. By default, this counter uses: name=Code Cache.

Memory Pool Committed Size (B)

This monitor returns the amount of memory (in bytes) that is guaranteed to be available for use by the Java virtual machine. The amount of committed memory may change over time (increase or decrease). The Java virtual machine may release memory to the system and committed could be less than init. committed will always be greater than or equal to used.

You should set the correct Object Name. You can see which names are available by running the Find Processes, Services, and Performance Counters wizard. In the wizard, expand java.lang and MemoryPool and check which names are available. By default, this counter uses: name=Code Cache.

For IBM WebSphere, this counter is unavailable and you should disable it.

Memory Pool Max Size (B)

This monitor returns the maximum amount of memory (in bytes) that can be used for memory management. Its value may be undefined. The maximum amount of memory may change over time if defined. The amount of used and committed memory will always be less than or equal to max if max is defined. A memory allocation may fail if it attempts to increase the used memory such that used > committed even if used <= max would still be true (for example, when the system is low on virtual memory).

You should set the correct Object Name. You can see which names are available by running the Find Processes, Services, and Performance Counters wizard. In the wizard, expand java.lang and MemoryPool and check which names are available. By default, this counter uses: name=Code Cache.

For IBM WebSphere, this counter is unavailable and you should disable it.

Memory Pool Peak Used (B)

This monitor returns the peak amount of memory currently used (in bytes).

You should set the correct Object Name. You can see which names are available by running the Find Processes, Services, and Performance Counters wizard. In the wizard, expand java.lang and MemoryPool and check which names are available. By default, this counter uses: name=Code Cache.

For IBM WebSphere, this counter is unavailable and you should disable it.

Memory Pool Peak Committed (B)

This monitor returns the peak amount of memory (in bytes) that is guaranteed to be available for use by the Java virtual machine. The amount of committed memory may change over time (increase or decrease). The Java virtual machine may release memory to the system and committed could be less than init. committed will always be greater than or equal to used.

You should set the correct Object Name. You can see which names are available by running the Find Processes, Services, and Performance Counters wizard. In the wizard, expand java.lang and MemoryPool and check which names are available. By default, this counter uses: name=Code Cache.

Memory Pool Peak Max Size (B)

This monitor returns the maximum peak amount of memory (in bytes) that can be used for memory management. Its value may be undefined. The maximum amount of memory may change over time if defined. The amount of used and committed memory will always be less than or equal to max if max is defined. A memory allocation may fail if it attempts to increase the used memory such that used > committed even if used <= max would still be true (for example, when the system is low on virtual memory).

You should set the correct Object Name. You can see which names are available by running the Find Processes, Services, and Performance Counters wizard. In the wizard, expand java.lang and MemoryPool and check which names are available. By default, this counter uses: name=Code Cache.

Threads Total Started Count

This monitor returns the total number of threads created and also started since the Java virtual machine started.

Current Thread Count

This monitor returns the current number of live threads including both daemon and non-daemon threads.

Current Thread Cpu Time

This monitor returns the total CPU time for the current thread in nanoseconds.

Current Thread User Time

This monitor returns the CPU time that the current thread has executed in user mode in nanoseconds.

Runtime Uptime (ms)

This monitor returns the uptime of the Java virtual machine in milliseconds.

Compiler Time (ms)

This monitor returns the approximate accumulated elapsed time (in milliseconds) spent in compilation.

Active Thread Count

This monitor returns the number of active threads in the JVM.

Active Thread Group Count

This monitor returns the number of active thread groups in the JVM..

Free Memory

This monitor returns the amount of free memory for the JVM this app server instance is running on. This counter should be as high as possible.

Available Processors

This monitor returns the number of available processors.

Total Memory

This monitor returns the total memory for the JVM this app server instance is running on.