Fortinet black logo

User Guide

Oracle Weblogic (Windows)

24.1.0
Copy Link
Copy Doc ID af1daa65-c273-11ec-9fd1-fa163e15d75b:734295
Download PDF

Oracle Weblogic (Windows)

You can use the JMX plugin for Windows to monitor several performance and availability metrics on your Oracle WebLogic application server.

Enable JMX for WebLogic

  1. To enable JMX for WebLogic monitoring, add the following lines to C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\bin\setDomainEnv.cmd.

set JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote

set JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.port=8888

set JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.ssl=false

set JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.access.file=%JRE_HOME%\lib\management\jmxremote.access

set JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.password.file=%JRE_HOME%\lib\management\jmxremote.password

set JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.authenticate=true

2. Create the jmxremote.access and jmxremote.password files in C:\Program files\Java\jdk1.8.0_241\jre\lib\management.

jmxremote.access – The file should be created as follows.

# The "monitor" role has readonly access.

# The "admin" role has readwrite access.

monitor readonly

admin readwrite

jmx.password – The file should be created as shown in the example below. Set permission to read-only.

# specify actual password instead of the text password

monitor password

admin password

3. Both files should appear in the directory as shown below:

4. Open PowerShell and run startWebLogic.cmd.

a. The path is C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain.

b. Review the command output for errors. If an error is encountered, resolve the error before continuing.

5. Check MBeans with JConsole.

a. Open JConsole from the command prompt.

b. Select Remote Process then enter the <hostname>:<port>. Use the port configured while enabling JMX in setDomainEnv.cmd.

c. Use the Username and Password set on the jmxremote.password file.

6. Click Connect. Once connected, click the MBeans tab and verify that the data values match the values in the following:

Agent configuration

After installing the Windows Agent, edit the Agent configuration file to add your JMX credentials. The steps are detailed in JMX (Windows) Agent configuration.

Control Panel configuration

The next step is to add and configure the JMX plugin.

  1. Add JMX from the Monitoring Catalog.

  2. Add the Custom JMX Metric.

  3. Enter the following information:
    FieldValuemBean stringEnter java.lang:type=Threading/ThreadCountMetric Name OverrideEnter Thread Count

  4. Click Save.

  5. Verify that the FortiMonitor Agent log has the following output.

[2020-02-02 22:43:48,807] [MetricLogger] [INFO] [123] - <JMX> First Output variable: 02/02/2020 22:43:48 -0600 org.archive.jmx.Client ThreadCount: 47

[2020-02-02 210002:43:48,807] [MetricLogger] [INFO] [123] - <JMX> Second Output variable: ThreadCount: 47

[2020-02-02 22:43:48,807] [MetricLogger] [INFO] [123] - JMX Plugin: JMX Process completed

[2020-02-02 22:43:48,807] [MetricLogger] [INFO] [123] - <JMX> Checking if key is empty

[2020-02-02 22:43:48,807] [MetricLogger] [INFO] [123] - <JMX> Key is empty - value: 47

[2020-02-02 22:43:48,807] [MetricLogger] [INFO] [123] - <JMX> Key is empty - value: 47

Oracle Weblogic (Windows)

You can use the JMX plugin for Windows to monitor several performance and availability metrics on your Oracle WebLogic application server.

Enable JMX for WebLogic

  1. To enable JMX for WebLogic monitoring, add the following lines to C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\bin\setDomainEnv.cmd.

set JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote

set JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.port=8888

set JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.ssl=false

set JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.access.file=%JRE_HOME%\lib\management\jmxremote.access

set JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.password.file=%JRE_HOME%\lib\management\jmxremote.password

set JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote.authenticate=true

2. Create the jmxremote.access and jmxremote.password files in C:\Program files\Java\jdk1.8.0_241\jre\lib\management.

jmxremote.access – The file should be created as follows.

# The "monitor" role has readonly access.

# The "admin" role has readwrite access.

monitor readonly

admin readwrite

jmx.password – The file should be created as shown in the example below. Set permission to read-only.

# specify actual password instead of the text password

monitor password

admin password

3. Both files should appear in the directory as shown below:

4. Open PowerShell and run startWebLogic.cmd.

a. The path is C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain.

b. Review the command output for errors. If an error is encountered, resolve the error before continuing.

5. Check MBeans with JConsole.

a. Open JConsole from the command prompt.

b. Select Remote Process then enter the <hostname>:<port>. Use the port configured while enabling JMX in setDomainEnv.cmd.

c. Use the Username and Password set on the jmxremote.password file.

6. Click Connect. Once connected, click the MBeans tab and verify that the data values match the values in the following:

Agent configuration

After installing the Windows Agent, edit the Agent configuration file to add your JMX credentials. The steps are detailed in JMX (Windows) Agent configuration.

Control Panel configuration

The next step is to add and configure the JMX plugin.

  1. Add JMX from the Monitoring Catalog.

  2. Add the Custom JMX Metric.

  3. Enter the following information:
    FieldValuemBean stringEnter java.lang:type=Threading/ThreadCountMetric Name OverrideEnter Thread Count

  4. Click Save.

  5. Verify that the FortiMonitor Agent log has the following output.

[2020-02-02 22:43:48,807] [MetricLogger] [INFO] [123] - <JMX> First Output variable: 02/02/2020 22:43:48 -0600 org.archive.jmx.Client ThreadCount: 47

[2020-02-02 210002:43:48,807] [MetricLogger] [INFO] [123] - <JMX> Second Output variable: ThreadCount: 47

[2020-02-02 22:43:48,807] [MetricLogger] [INFO] [123] - JMX Plugin: JMX Process completed

[2020-02-02 22:43:48,807] [MetricLogger] [INFO] [123] - <JMX> Checking if key is empty

[2020-02-02 22:43:48,807] [MetricLogger] [INFO] [123] - <JMX> Key is empty - value: 47

[2020-02-02 22:43:48,807] [MetricLogger] [INFO] [123] - <JMX> Key is empty - value: 47