JBoss Application Server v4.x

Version 2

    JBoss 4

     

    This template assesses the overall performance of JBoss 4 by using SNMP protocol.


    Prerequisites: SNMP enabled on the operating system. Target JBoss server configured to allow SNMP queries. For more information, see "Configuring Java and JBoss for SNMP" on page 1.

    Note: This template is configured to send SNMP requests on port 1161.

    Credentials: None (uses the SNMP public string assigned to the node).

     

    Monitored Components

    Some components may not have preset warning or critical threshold values. You can add your own threshold limits as necessary. For more information, see http://knowledgebase.solarwinds.com/kb/questions/2415.

     

    Classes Loaded Count

    Indicates the number of classes currently loaded in the JVM.


    Classes Total Loaded Count

    Indicates the number of classes that have been loaded since the JVM was started.

     

    Classes Unloaded Count

    Indicates the number of classes that have been unloaded since the JVM was started.


    Memory Pending Final Count

    The approximate number of objects that are pending finalization. This should be as low as possible.

     

    Memory Heap Init Size (B)

    The amount of memory (in bytes) that the JVM initially requests from the operating system for memory management used for heap memory pools.

     

    Memory Heap Used (B)

    The amount of used memory (in bytes) from heap memory pools. This should be as low as possible.

     

    Memory Heap Committed (B)

    The amount of memory (in bytes) committed by heap memory pools.

     

    Memory Heap Max Size (B)

    The maximum amount of memory (in bytes) for all heap memory pools.

     

    Memory Non-heap Init Size (B)

    The amount of memory (in bytes) that the JVM initially requests from the operating system for memory management for non-heap memory pools.

     

    Memory Non-heap Used (B)

    The amount of used memory (in bytes) from non-heap memory pools. This should be as low as possible.

     

    Memory Non-heap Committed (B)

    The amount of memory (in bytes) committed by non-heap memory pools.

     

    Memory Non-heap Max Size (B)

    The maximum size of memory (in bytes) for all non-heap memory pools.

     

    Memory Garbage Collections Count

    The number of collections that have occurred, as returned by GarbageCollectorMXBean.getCollectionCount()

    If garbage collection statistics are not available, this object is set to 0.

     

    Memory Garbage Collection Time (ms)

    The approximate accumulated collection elapsed time (in milliseconds) since the Java virtual machine has started. This object is set to 0 if the collection elapsed time is undefined for this collector.

     

    Memory Pool Init Size (B)

    The initial size of the memory pool. This counter shows statistics for the first memory pool. If another pool needs monitoring, change the last digit of the OID.


    Memory Pool Used (B)

    The amount of used memory in the memory pool. This counter shows statistics for the first memory pool. If another pool needs monitoring, change the last digit of the OID. This should be as low as possible.

     

    Memory Pool Committed (B)

    The amount of committed memory in the memory pool. This counter shows statistics for the first memory pool. If another pool needs monitoring, change the last digit of the OID.

     

    Memory Pool Max Size (B)

    The maximum size of the memory pool. This counter shows statistics for the first memory pool. If another pool needs monitoring, change the last digit of the OID.

     

    Memory Pool Peak Used (B)

    The amount of used memory in the memory pool at the peak usage point. This counter shows statistics for the first memory pool. If another pool needs monitoring, change the last digit of the OID.


    Memory Pool Peak Committed (B)

    The amount of used memory in the memory pool at the peak usage point. This counter shows statistics for the first memory pool. If another pool needs monitoring, change the last digit of the OID.

     

    Memory Pool Peak Max Size (B)

    The maximum size of the memory pool at the peak usage point. This counter shows statistics for the first memory pool. If another pool needs monitoring, change the last digit of the OID.

     

    Threads Total Started Count

    The number of threads created and started since the Java Virtual Machine started. This counter shows statistics for the first thread. If another thread needs monitoring, change the last digit of the OID.

     

    Runtime Input Arguments Count

    This is the number of input arguments passed to the Java Virtual Machine.

     

    Runtime Uptime (ms)

    This is the uptime of the Java virtual machine (in milliseconds). This is equivalent to (System.currentTimeMillis() - jvmStartTimeMs).

     

    Compiler Time (ms)

    This gets the approximate accumulated elapsed time (in milliseconds) spent in compilation since the Java virtual machine has started. If multiple threads are used for compilation, this value is the summation of the approximate time that each thread spent in compilation. If compiler time monitoring is not supported, then this object remains set at 0.

     

    TCP Port: AJP13

    This component monitor tests the ability of a JBoss AJP13 (Apache JServ Protocol 1.3) service to accept incoming sessions. It monitors 8009 TCP port.

     

    TCP Port: JBoss Web

    This component monitor tests the ability of a JBoss Web service to accept incoming sessions. It monitors 8080 TCP port.

     

     

    Configuring Java and JBoss for SNMP

     

    Configuring Java

     

    Windows

    1. Download the JDK from the Oracle website: http://www.oracle.com/technetwork/java/javase/downloads/index.html (tested on JDK SE 6, update version 24).
    2. Install the JDK.
    3. On the license agreement page, read and accept the license and the click Next.
    4. Click Change to change the installation directory to C:\Program Files\Java\jdk1.6.0_24, and then click OK.
    5. Click Next.
    6. Click Finish to exit from the installer.
    7. Add a variable to the system with its path pointing to the JDK installation folder. For example:

      Variable name: JAVA_HOME
      Variable value:  C:\Program Files\Java\jdk1.6.0_24

      Note: If you want to run Java commands from the command line, you should add the JDK installation path to the PATH variable.
    8. Navigate to the %JAVA_HOME%\jre\lib\management folder.
    9. Rename the snmp.acl.template file to snmp.acl. Edit snmp.acl by replacing its content with the following:
      acl = {
      {
      communities = public, private
      access = read-only
      managers = localhost, apm-server
      }
      }

      Where apm-server is the hostname of your APM server.
    10. Grant access to the snmp.acl file only for the Administrator. To grant access only for the Administrator, refer to this topic at the following location: http://download.oracle.com/javase/6/docs/technotes/guides/management/security-windows.html

    Linux

    1. Download the JDK from the Oracle website: http://www.oracle.com/technetwork/java/javase/downloads/index.html (tested on JDK SE 6, update version 24).
    2. Unpack and run the JDK. In this case, the JDK was installed into the /usr/java/jdk1.6.0_24 folder.
    3. Move this folder to /usr/local.
    4. In the /usr/local/ directory, create a symbolic link to jdk1.6.0_24 named Java. Now the JDK is installed in /usr/local/jdk1.6.0_24 and linked to /usr/local/java.
    5. Add the /usr/local/java/bin folder to the system path. (If it is only for your account, add it in .bash_profile file in your home directory). In Slackware, it should be in the .profile file. To make it a system wide environment, add it in the /etc/profile.
    6. Edit a line in .bash_profile to be similar to: PATH=$PATH:$HOME/bin:/usr/local/java/bin. The path will be automatically set at boot time. To set the path immediately, use the command:
      $ export PATH=$PATH:/usr/local/java/bin
    7. You can call java directly in your shell:
      $ java –version
      java version "1.6.0_24"
      Java(TM) SE Runtime Environment (build 1.6.0_24-b04)
      Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01, mixed mode)
    8. Add a variable to the system with the path pointing to the JDK installation folder.
    9. Add the following lines to the /etc/profile file. Syntax dependencies may be different in various Linux distributions. This example is shown for the CentOS system:

    export JAVA_HOME=/usr/java/jdk1.6.0_24export PATH=$PATH:/usr/java/jdk1.6.0_24To set this immediately, run the export commands in your shell. Or, logout then log back in to your system.
    10 Go to the $JAVA_HOME/jre/lib/management folder and rename the snmp.acl.template file to snmp.acl. 11 Edit snmp.acl by removing all lines and writing the following:acl = {
    {
    communities = public, private
    access = read-only
    managers = localhost, apm-server
    }
    }

    Where apm-server is the hostname of your APM server.
    12 Grant access to the snmp.acl file only for the root user. Run the following commands as the root user in your shell:
    # chown root.root $JAVA_HOME/jre/lib/management/snmp.acl
    # chmod 600 $JAVA_HOME/jre/lib/management/snmp.acl


    Configuring JBoss 4

     

    Windows Service

    1. Edit %JBOSS_HOME%\bin\run.bat by adding the following lines (where %JBOSS_HOME% is the path to your JBoss installation):

      set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.port=1161"
      set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.interface=0.0.0.0"



      rem Setup JBoss specific properties
      set JAVA_OPTS=-Dprogram.name=%PROGNAME% %JAVA_OPTS%
      set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.port=1161"
      set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.interface=0.0.0.0"
    2. Register JBoss as a service by running: %JBOSS_HOME%\bin\service.bat –install
    3. Go to the Windows Services console
    4. Right-click JBoss Application Server service.
    5. Click Properties.
    6. Click the Log On tab and then select Log on as this account.
    7. Click Browse, find the user “Administrator,” and then type the Administrator password twice.
    8. Click OK.
    9. Start the JBoss service.


    Windows Command Line

    1. Edit %JBOSS_HOME%\bin\run.bat by adding the following lines (where %JBOSS_HOME% is the path to your JBoss installation):


    set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.port=1161"
    set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.interface=0.0.0.0"

    rem Setup JBoss specific properties
    set JAVA_OPTS=-Dprogram.name=%PROGNAME% %JAVA_OPTS%set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.port=1161"set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.interface=0.0.0.0"

       2.   Start JBoss by running %JBOSS_HOME%\bin\run.bat.

    Linux

    1. Edit $JBOSS_HOME/bin/run.sh by adding the following lines (where $JBOSS_HOME$ is the path to your JBoss installation):

      JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.snmp.port=1161"
      JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.snmp.interface=0.0.0.0"

      # Setup JBoss specific properties
      JAVA_OPTS="${JAVA_OPTS:+$JAVA_OPTS -Dprogram.name=$PROGNAME}"
      JAVA_OPTS="${JAVA_OPTS:--Dprogram.name=$PROGNAME}"
      JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.snmp.port=1161"
      JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.snmp.interface=0.0.0.0"
    2. Run JBoss by running $JBOSS_HOME/bin/run.sh.

     

    Last updated 3/24/2014