Documentation forServer & Application Monitor

Configure Java application servers and JVMs for SAM monitoring

SAM includes several out-of-the-box application monitor templates that you can use to monitor Java application servers and Java Virtual Machines (JVMs) via:

The predefined SAM templates include a JMX Monitor that communicates with Java servers to poll available managed beans (MBeans) and return results. You can also create custom JMX Monitors to poll specific MBeans.

Note the following details about configuring Java application servers and JVMs:

  • Set the JAVA_HOME environment variable for the server, as directed in vendor documentation. Otherwise, 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. (© 2021 Slashdot Media, available at jconsole.sourceforge.net, obtained on March 8, 2021.)

  • The following Orion Platform features do not support JMX monitoring:
  • If SSL is enabled on a target server, include parameters to indicate KeyStore and TrustStore locations in the JMX Bridge config file, SolarWinds\Orion\APM\jmxbridge\jsl\jsl.ini.

Configuration steps vary, based on the type of target, as described in:

Additional resources include:

Oracle links in this topic are attributed to © 2020 Oracle, as obtained on January 9, 2020.

Scripts provided outside of the Orion Web Console are not supported under any SolarWinds support program or service. Scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.

Configure a standalone Java application server or JVM for remote monitoring

Windows

  1. Download and install the Java Development Kit (JDK) you want to use:.
  2. Add a JAVA_HOME environment variable to the system with its path pointing to the Java installation folder.
    1. On the Advanced tab of the System Properties dialog box for Windows, click Environment Variables.

    2. Edit the JAVA_HOME variable to point to the JDK folder. For example, C:\Program Files\Java\jdk-16.0.0

  3. Navigate to the %JAVA_HOME%\jre\lib\management folder to configure authentication.
  4. If you want to use SNMP authentication:
    1. Rename the snmp.acl.template file to snmp.acl. Edit snmp.acl by replacing its content with:
      acl = {
      {
      communities = public, private
      access = read-only
      managers = localhost, orion-server
      }
      }
      Where orion-server is the hostname of the Orion server.
    2. Grant access to the snmp.acl file only for the Administrator.
  5. If you want to use JMX authentication:
    1. Rename the jmxremote.password.templatefile to jmxremote.password.
    2. Edit jmxremote.password by replacing/adding its content with the following: samuser somepasswd
      where samuser is the user for the monitored JVM and somepasswd is the password.
    3. Edit jmxremote.access by replacing/adding its content with the following: samuser readonly
      where samuser is user for the monitored JVM, provided with read only permission.
    4. Copy jmxremote.access and jmxremote.password to a folder, for example c:\jmxremote\.
    5. Grant access to the jmxremote.password file only for the Administrator.

Linux

  1. Download and install the JDK you want to use. See this Success Center article for details.
  2. Unpack and run Java SE. In this case, Java SE is installed in /usr/java/jdk-16.0.0.
  3. Move this folder to /usr/local.
  4. In the /usr/local/directory, create a symbolic link to jdk-16.0.0 named Java if Java SE is installed in /usr/local/jdk-16.0.0 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, place it in the .profile file.
    • To make it system-wide, 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 following command: $ export PATH=$PATH:/usr/local/java/bin
  7. Add a variable to the system with the path pointing to the Java SE installation folder.
  8. Add the following lines to the /etc/profile file.

    Syntax dependencies may differ in various Linux distributions. This example is for a CentOS system.


    export JAVA_HOME=/usr/java/jdk-16.0.0
    export PATH=$PATH:/usr/java/jdk-16.0.0
  9. To set this immediately, run the export commands in your shell, or log out then log back into your system.
  10. If you want to use SNMP authentication:
    1. Go to the $JAVA_HOME/jre/lib/management folder and rename the snmp.acl.template file to snmp.acl.
    2. Edit snmp.acl by removing all lines and writing the following:
      acl = {
      {
      communities = public, private
      access = read-only
      managers = localhost, orion-server
      }
      }
      Where orion-server is the hostname of the Orion server.
    3. 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
  11. If you want to use JMX authentication:
    1. Go to the $JAVA_HOME/jre/lib/management folder and rename the jmxremote.password.template file to jmxremote.password.
    2. Edit jmxremote.password by replacing/adding the content with the following:
      samuser somepasswd
      where samuser is the user for the JVM monitored by SAM and somepasswd is the password.
    3. Edit jmxremote.access by replacing/adding the content with the following:
      samuser readonly
      where samuser is user for the JVM monitored and readonly - gives this read only permissions.
    4. Copy jmxremote.access and jmxremote.password to a folder, for example /jmxremote/.
    5. Grant access to the jmxremote.password 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/jmxremote.password
      # chmod 600 $JAVA_HOME/jre/lib/management/jmxremote.password

    Agentless and Orion Agent for Windows polling use the JMX Bridge Service but the Linux agent does not use that service. Linux-based JMX queries run locally through the Orion agent itself.

Test a standalone Java application server or JVM

To test that a target server can respond to SNMP queries, add the following command to the Java command line:

-Dcom.sun.management.snmp.port=1161 -Dcom.sun.management.snmp.interface=0.0.0.0

For example:

java -Dcom.sun.management.snmp.port=1161 -Dcom.sun.management.snmp.interface=0.0.0.0 some_java_applet

In another window/shell, run the following command to test SNMP and the Java SE configurations:

snmpwalk -v 2c -c public 127.0.0.1:1161 1.3.6.1.4.1.42.2.145.3.163.1.1.2.11

The command should return a value similar to:

SNMPv2-SMI::enterprises.42.2.145.3.163.1.1.2.11.0 = Counter64: 4803352

To test if a target server can respond to JMX queries, add the following command to the Java command line to enable JMX on port 8686 using authentication:

-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8686 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.password.file="c:\jmxremote\jmxremote.password" -Dcom.sun.management.jmxremote.access.file="c:\jmxremote\jmxremote.access"

For example:

java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8686 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.password.file="c:\jmxremote\jmxremote.password" -Dcom.sun.management.jmxremote.access.file="c:\jmxremote\jmxremote.access"some_java_applet

In a separate window or shell, run the following command to test JMX and the Java SE configurations:

%JAVA_HOME%\jdk16.0.0_3\bin\jconsole

In the jconsole window, select Remote Process, type 127.0.0.1:8686 and provide Username: sam and Password: somepasswd. After a successful connection, monitoring statistics should appear.

For reference, see Java arguments for remote JMX monitoring.

Configure JBoss EAP or WildFly servers for JMX monitoring

This section describes how to set up the following types of target servers for JMX monitoring:

  • JBoss Enterprise Application Platform (EAP)
  • WildFly
  • JBoss AS

Note the following details:

  • (Recommended) Use the Orion agent for Linux to monitor JBoss EAP or WildFly servers.
  • The JMX Bridge on the Orion server can be configured to monitor either JBoss EAP or WildFly target servers, but not both types simultaneously.
  • If running WildFly in domain mode, note that the default setting for JMX collection only allows JMX collection through the host collector using unique ports for each JVM. This default setting won't work with SAM, but you can configure WildFly to allow the collection of JMX from each JVM. See JMX Security, available at docs.wildfly.org.

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 the JBoss Application Server service.
  5. Click Properties.
  6. Switch to the Log On tab, and then click Log on as this account.
  7. Click Browse to locate the "Administrator" user, and then type the Administrator password twice.
  8. Click OK.
  9. Start the JBoss service.

See also:

Windows Command Line for JBoss EAP or WildFly

  1. Open %JBOSS_HOME%\bin\standalone.bat and navigate to the following section:

  2. Add the following lines immediately before the JBoss.Bootstrap.Environment section shown in the previous step, where:
    • %JBOSS_HOME% is the path to your JBoss installation,
    • ###.###.#.### is the IP address of the target server, and
    • X.X.X is a version of jar files for a specific JBoss server.
    set "JAVA_OPTS=%JAVA_OPTS% -Djboss.platform.mbeanserver"
    set "JAVA_OPTS=%JAVA_OPTS% -Djava.rmi.server.hostname=###.###.#.###"
    set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.port=8686"
    set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.ssl=false"
    set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.authenticate=true"
    set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.password.file="c:\jmxremote\jmxremote.password"" 
    set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.access.file="c:\jmxremote\jmxremote.access""
    set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.logmanager"
    set "JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
    set "JAVA_OPTS=%JAVA_OPTS% -Xbootclasspath/p:%JBOSS_HOME%\modules\system\layers\base\org\jboss\logmanager\main\jboss-logmanager-X.X.X.Final-redhat
    
  3. For WildFly 13.0.0 or later, or JBoss EAP 7.2 or later, add the following line to the parameters above.

    set "JAVA_OPTS=%JAVA_OPTS% -Xbootclasspath/p:%JBOSS_HOME%\modules\system\layers\base\org\wildfly\common\main\wildfly-common-X.X.X.Final.jar"
  4. Start JBoss EAP by running %JBOSS_HOME%\bin\standalone.bat.

Windows Command Line for JBoss AS

  1. Navigate to the following section of %JBOSS_HOME%\bin\run.bat:

  2. Add the following lines immediately before the JBoss.Bootstrap.Environment section shown in the previous step, where:
    • %JBOSS_HOME% is the path to your JBoss installation, and
    • ###.###.#.### is the IP address of the target server.
    set "JAVA_OPTS=%JAVA_OPTS% -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl"
    set "JAVA_OPTS=%JAVA_OPTS% -Djboss.platform.mbeanserver"
    set "JAVA_OPTS=%JAVA_OPTS% -Djava.rmi.server.hostname=###.###.#.###"
    set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.port=8686"
    set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.ssl=false"
    set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.authenticate=true"
    set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.password.file="c:\jmxremote\jmxremote.password""
    set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.access.file="c:\jmxremote\jmxremote.access""
  3. Start JBoss by running %JBOSS_HOME%\bin\run.bat.

Linux for JBoss EAP or WildFly

  1. Open $JBOSS_HOME/bin/standalone.sh and navigate to the following section:

  2. Add the following lines immediately before the JBoss.Bootstrap.Environment section shown in the previous step, where
    • $JBOSS_HOME is the path to your JBoss installation,
    • ###.###.#.### is the IP address of the target server, and
    • X.X.X is a version of jar files for specific JBoss server.
      JAVA_OPTS="$JAVA_OPTS -Djboss.platform.mbeanserver"
      JAVA_OPTS="$JAVA_OPTS -Djava.rmi.server.hostname=###.###.#.###" 
      JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=8686" 
      JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false" 
      JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=true" 
      JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.password.file="/jmxremote/jmxremote.password"" 
      JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.access.file="/jmxremote/jmxremote.access""
      JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=org.jboss.logmanager"
      JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
      JAVA_OPTS="$JAVA_OPTS -Xbootclasspath/p:$JBOSS_HOME/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-X.X.X.Final.jar"
  3. For WildFly 13.0.0 or later, or JBoss EAP 7.2 or later, add the following line to the parameters above.

    JAVA_OPTS="$JAVA_OPTS -Xbootclasspath/p:$JBOSS_HOME/modules/system/layers/base/org/wildfly/common/main/wildfly-common-X.X.X.Final.jar"
  4. Start JBoss EAP by running $JBOSS_HOME/bin/standalone.sh.

Linux for JBoss AS

  1. Open $JBOSS_HOME/bin/run.sh, and navigate to the following section:
    # Display your environment
    echo "========================================================================="
    echo ""
    echo "  JBoss Bootstrap Environment"
    echo ""
    echo "  JBOSS_HOME: $JBOSS_HOME"
    echo ""
    echo "  JAVA: $JAVA"
    echo ""
    echo "  JAVA_OPTS: $JAVA_OPTS"
    echo ""
    echo "  CLASSPATH: $JBOSS_CLASSPATH"
    echo ""
    echo "========================================================================="
    echo ""
  2. Add the following lines to $JBOSS_HOME/bin/run.sh immediately before the JBoss Bootstrap Environment section shown in the previous step, where:
    • $JBOSS_HOME is the path to your JBoss installation,
    • ###.###.#.### is the IP address of the target server.
    JAVA_OPTS="$JAVA_OPTS -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl"
    JAVA_OPTS="$JAVA_OPTS -Djboss.platform.mbeanserver"
    JAVA_OPTS="$JAVA_OPTS -Djava.rmi.server.hostname=###.###.#.###"
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=8686"
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=true"
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.password.file=" /jmxremote/jmxremote.password""
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.access.file=/jmxremote/jmxremote.access""
  1. When finished, start JBoss by running $JBOSS_HOME/bin/run.sh.

Configure a standalone Java application server or JVM for GlassFish monitoring

The following information was created based on Glassfish 3.1.

  1. Run the GlassFish Application Server.
  2. In a web browser, navigate to: http://hostname:4848 where hostname which is the name of your GlassFish server.
  3. In the left panel, click Configurations: server-config.
  4. In the main window, click JVM settings.
  5. Click the JVM Options tab.
  6. Use the Add JVM Option to enter the following values, one by one:
    • Dcom.sun.management.jmxremote
    • Djava.rmi.server.hostname=###.###.#.###, where ###.###.#.### is IP address of GlassFish server.
    • Dcom.sun.management.jmxremote.port=8686
    • Dcom.sun.management.jmxremote.ssl=false
    • Dcom.sun.management.jmxremote.authenticate=true
    • Dcom.sun.management.jmxremote.password.file="c:/jmxremote/jmxremote.password"
    • Dcom.sun.management.jmxremote.access.file=" c:/jmxremote/jmxremote.access"
  7. Click Save.
  8. Restart the GlassFish server.

Configure a standalone Java application server or JVM for IBM WebSphere monitoring

The following information was created based on IBM WebSphere 8.0. Note that WebSphere uses its own JDK, installed at %WEBSHERE_HOME%\java, where %WEBSHERE_HOME% is the path to your WebSphere installation.

  1. Run the IBM WebSphere Application Server.
  2. In a web browser, navigate to: https://hostname:9043 where hostname is the name of the WebSphere server.
  3. In the left panel, click Expand Servers and Server types.
  4. Click WebSphere Application Servers.
  5. In the main window, click your server.
  6. In the Server Infrastructure section, expand Java and Process Management.
  7. Click Process Definition.
  8. In the Additional Properties section, click Java Virtual Machine.
  9. In Generic JVM Arguments, add the following commands, where ###.###.#.### is the IP address of the WebSphere server:

    This command enables JMX monitoring without authentication.

    -Djavax.management.builder.initial= -Djava.rmi.server.hostname=###.###.#.### -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8686 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false

  10. Save your changes.
  11. Restart the IBM WebSphere Application Server.

If errors occur, you can manually change/restore the configuration, as stored in the following file:

%WEBSPHERE_HOME%\profiles\your_profile\config\cells\your_cell\nodes\your_node\servers\your_server\server.xml

Configure a standalone Java application server or JVM for Oracle WebLogic monitoring

The following information was created based on Oracle WebLogic 8.0. Note that WebLogic uses its own JDK, installed at %MIDDLEWARE_HOME%\jdk*, where %MIDDLEWARE_HOME% is the path to your WebLogic installation.

Windows

Edit the following file:
%MIDDLEWARE_HOME%\user_projects\domains\<your_domain>\bin\startWebLogic.cmd,
where %MIDDLEWARE_HOME% is the path to your WebLogic installation. Add the following lines:

set "JAVA_OPTIONS=%JAVA_OPTIONS% -Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder"
set "JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote"
set "JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.port=8686"
set "JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.ssl=false"
set "JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.authenticate=true"
set "JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.password.file="c:\jmxremote\jmxremote.password""
set "JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.access.file=" c:\jmxremote\jmxremote.access""

The result should resemble this example:

…
call "%DOMAIN_HOME%\bin\setDomainEnv.cmd" %*
set "JAVA_OPTIONS=%JAVA_OPTIONS% -Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder"
set "JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote"
set "JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.port=8686"
set "JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.ssl=false"
set "JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.authenticate=true"
set "JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.password.file=" c:\jmxremote\jmxremote.password""
set "JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.access.file=" c:\jmxremote\jmxremote.access""
set SAVE_JAVA_OPTIONS=%JAVA_OPTIONS%
…

This file is created by the Orion Configuration Wizard so any changes to this script will be lost the next time you use the wizard.

Restart the WebLogic Server.

Linux

Edit the following file:
$MIDDLEWARE_HOME/user_projects/domains/<your_domain>/bin/startWebLogic.sh,
where $MIDDLEWARE_HOME is the path to your WebLogic installation. Add the following lines:

JAVA_OPTIONS="$JAVA_OPTIONS-Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder"
JAVA_OPTIONS="$JAVA_OPTIONS -Dcom.sun.management.jmxremote"
JAVA_OPTIONS="$JAVA_OPTIONS-Dcom.sun.management.jmxremote.port=8686"
JAVA_OPTIONS="$JAVA_OPTIONS-Dcom.sun.management.jmxremote.ssl=false"
JAVA_OPTIONS="$JAVA_OPTIONS-Dcom.sun.management.jmxremote.authenticate=true"
JAVA_OPTIONS="$JAVA_OPTIONS-Dcom.sun.management.jmxremote.password.file="/jmxremote/jmxremote.password""
JAVA_OPTIONS="$JAVA_OPTIONS-Dcom.sun.management.jmxremote.access.file="/jmxremote/jmxremote.access""

The result should resemble this example:

${DOMAIN_HOME}/bin/setDomainEnv.sh $*
JAVA_OPTIONS="$JAVA_OPTIONS-Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder"
JAVA_OPTIONS="$JAVA_OPTIONS-Dcom.sun.management.jmxremote"
JAVA_OPTIONS="$JAVA_OPTIONS-Dcom.sun.management.jmxremote.port=8686"
JAVA_OPTIONS="$JAVA_OPTIONS-Dcom.sun.management.jmxremote.ssl=false"
JAVA_OPTIONS="$JAVA_OPTIONS-Dcom.sun.management.jmxremote.authenticate=true"
JAVA_OPTIONS="$JAVA_OPTIONS-Dcom.sun.management.jmxremote.password.file="/jmxremote/jmxremote.password""
JAVA_OPTIONS="$JAVA_OPTIONS-Dcom.sun.management.jmxremote.access.file="/jmxremote/jmxremote.access""
SAVE_JAVA_OPTIONS="${JAVA_OPTIONS}"

This file is created by the Configuration Wizard. Your changes to this script will be lost the next time you use the configuration wizard.

Restart the WebLogic Server.

Configure a standalone Java application server or JVM for Apache Tomcat monitoring

The following information was created based on Apache Tomcat 7.0.

Windows Service

  1. Open the Tomcat configuration by clicking Start > All Programs > Apache Tomcat > Configure Tomcat.
  2. Open the Java tab, and add the following lines to the Java Options box:
    -Dcom.sun.management.snmp.port=1161
    -Dcom.sun.management.snmp.interface=0.0.0.0
  3. Click Apply.
  4. Go to the Windows Services console.
  5. Right-click the Apache Tomcat service.
  6. Click Properties.
  7. Click the Log On tab, and then click Log on as this account.
  8. Navigate to the Administrator user and type the Administrator password twice.
  9. Click OK.
  10. In the Tomcat Configuration window, return to the General tab, and then start the service.

Windows Command Line

  1. Open the file %TOMCAT_HOME%\bin\catalina.bat, and add the following lines to the Debug, Run and Start sections, where %TOMCAT_HOME% is the path to your Tomcat 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"


    :doDebug
    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"
    shift

    :doRun
    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"
    shift

    :doStart
    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"
    shift
  2. Run %TOMCAT_HOME%\bin\startup.bat to start Tomcat.

Linux

  1. Open $TOMCAT_HOME/bin/catalina.sh and add the following lines into Debug, Run and Start sections, where %TOMCAT_HOME% is the path to your Tomcat installation:
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.snmp.port=1161"
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.snmp.interface=0.0.0.0"

    if [ "$1" = "debug" ] ; then
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.snmp.port=1161"
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.snmp.interface=0.0.0.0"
    if $os400; then

    elif [ "$1" = "run" ]; then
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.snmp.port=1161"
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.snmp.interface=0.0.0.0"
    shift

    elif [ "$1" = "start" ] ; then
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.snmp.port=1161"
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.snmp.interface=0.0.0.0"
    if [ ! -z "$CATALINA_PID" ]; then
  2. Run $TOMCAT_HOME/bin/startup.sh command to start Tomcat.

Java arguments for remote JMX monitoring

The following table describes Java arguments that you can use to enable remote JMX monitoring on standalone Java application server or JVMs:

Java argument Description
-Djava.rmi.server.hostname=###.###.#.### Indicates the IP address of the Remote Method Invocation (RMI) server.
-Dcom.sun.management.jmxremote Enables remote JMX monitoring.
-Dcom.sun.management.jmxremote.port=8686 Indicates which port the JMX module will use to accept JMX connections.
-Dcom.sun.management.jmxremote.ssl=false Indicates if SSL is used.
-Dcom.sun.management.jmxremote.authenticate=true Indicates if authentication is used (recommended).

If not using authentication, change the value to false.

-Dcom.sun.management.jmxremote.password.file=
c:\jmxremote.password
Indicates where the password file is stored.

Only add this line if using authentication.

-Dcom.sun.management.jmxremote.access.file=
c:\jmxremote.access
Indicates where the access file is stored.

Only add this line if using authentication.

To learn more about these arguments, see Java Documentation (© 2020 Oracle Corp., available at docs.oracle.com, obtained on October 13, 2020).