---
title: WebLogic
description: Monitor the health and performance of WebLogic Servers.
breadcrumbs: Docs > Integrations > WebLogic
---

# WebLogic
Supported OS Integration version3.3.0
{% callout %}
# Important note for users on the following Datadog sites: us2.ddog-gov.com

{% alert level="info" %}
To find out if this integration is available in your organization, see your [Datadog Integrations](https://app.datadoghq.com/integrations) page or ask your organization administrator.

To initiate an exception request to enable this integration for your organization, email [support@ddog-gov.com](mailto:support@ddog-gov.com).
{% /alert %}

{% /callout %}

## Overview{% #overview %}

Oracle WebLogic is a platform for developing, running and deploying enterprise Java applications both on-premises and in the cloud. It centralizes application services that include web server functionality, business components such as messaging, and access to backend enterprise systems such as databases.

Oracle WebLogic monitoring with Datadog enables you to:

- Gain awareness of increasing heap size in your Java Virtual Machine (JVM)
- Track server response time
- Monitor session details of web applications
- Track thread pool and messaging services
- Track database connection pool usage

**Minimum Agent version:** 7.33.0

## Setup{% #setup %}

### Installation{% #installation %}

The WebLogic check is included in the [Datadog Agent](https://app.datadoghq.com/account/settings/agent/latest) package. No additional installation is needed on your server.

1. This check is JMX-based and collects metrics from the Platform MBean Server exported by the JVM, so your WebLogic servers must have JMX Remote Monitoring enabled. See [Remote Monitoring and Management](https://docs.oracle.com/javase/8/docs/technotes/guides/management/agent.html#gdenl) for installation instructions.

1. Set the system property `-Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder` to enable these metrics on the Platform MBean Server. This should be enabled in both the WebLogic Server Administration Console and in the server startup scripts. **Note**: This can and should be done more than once.

***Enable in the Administration Console***

   ```
   Domain => Configuration => General => Advanced => Platform MBean Server Enabled
   ```

***Enable in Server Startup Scripts***

   ```yaml
   -Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder
   ```

For more information, see the [WebLogic documentation](https://support.oracle.com/cloud/faces/DocumentDisplay?_afrLoop=308314682308664&_afrWindowMode=0&id=1465052.1&_adf.ctrl-state=10ue97j4er_4).

1. Verify that the [`PlatformMBeanServerUsed`](https://docs.oracle.com/en/middleware/standalone/weblogic-server/14.1.1.0/jmxcu/understandwls.html#GUID-1D2E290E-F762-44A8-99C2-EB857EB12387) attribute value is set to `true` in the WebLogic Server Administration Console. The default value is `true` in WebLogic Server versions 10.3.3.0 and above. This setting can be found in the WebLogic Server Administration Console or configured using the WebLogic Scripting Tool (WSLT).

***Enable in the Administration Console***

   ```
   Domain (<WEBLOGIC_SERVER>) => Configuration => General => (Advanced) => Platform MBeanServer Enabled
   ```

***Enable in WLST***

Start an edit session. Navigate to the JMX directory for the domain and use `cmo.setPlatformMBeanServerUsed(true)` to enable the attribute if it is set to `false`.

For example:

   ```
   # > java weblogic.WLST
   (wlst) > connect('weblogic','weblogic')
   (wlst) > edit()
   (wlst) > startEdit()
   (wlst) > cd('JMX/<DOMAIN_NAME>')
   (wlst) > set('EditMBeanServerEnabled','true')
   (wlst) > activate()
   (wlst) > exit()
   ```

Activate the changes and restart the WebLogic server.

### Configuration{% #configuration %}

1. Edit the `weblogic.d/conf.yaml` file, in the `conf.d/` folder at the root of your Agent's configuration directory to start collecting your WebLogic performance data. See the [sample weblogic.d/conf.yaml](https://github.com/DataDog/integrations-core/blob/master/weblogic/datadog_checks/weblogic/data/conf.yaml.example) for all available configuration options.

This check has a limit of 350 metrics per instance. The number of returned metrics is indicated when running the Datadog Agent [status command](https://docs.datadoghq.com/agent/guide/agent-commands.md#agent-status-and-information). You can specify the metrics you are interested in by editing the [configuration](https://github.com/DataDog/integrations-core/blob/master/weblogic/datadog_checks/weblogic/data/conf.yaml.example).

To learn how to customize the metrics to collect, see the [JMX Checks documentation](https://docs.datadoghq.com/integrations/java.md) for more detailed instructions. If you need to monitor more metrics, contact [Datadog support](https://docs.datadoghq.com/help/).

1. [Restart the Agent](https://docs.datadoghq.com/agent/guide/agent-commands.md#start-stop-and-restart-the-agent)

### Validation{% #validation %}

[Run the Agent's `status` subcommand](https://docs.datadoghq.com/agent/guide/agent-commands.md#agent-status-and-information) and look for `weblogic` under the Checks section.

## Data Collected{% #data-collected %}

### Metrics{% #metrics %}

|  |
|  |
| **weblogic.connector\_connection\_pool\_runtime.connections\_active**(gauge)        | The current total active connections.*Shown as connection*                                                                                                                                                                                 |
| **weblogic.connector\_connection\_pool\_runtime.connections\_created\_total**(rate) | The total number of Connector connections created in this Connector Pool since the pool is instantiated.*Shown as connection*                                                                                                              |
| **weblogic.connector\_connection\_pool\_runtime.connections\_free**(gauge)          | The current total free connections.*Shown as connection*                                                                                                                                                                                   |
| **weblogic.jms\_runtime.connections\_current**(gauge)                               | The current number of connections to WebLogic Server.*Shown as connection*                                                                                                                                                                 |
| **weblogic.jms\_runtime.connections\_total**(rate)                                  | The total number of connections made to this WebLogic Server since the last reset.*Shown as connection*                                                                                                                                    |
| **weblogic.jms\_runtime.jms\_servers**(gauge)                                       | The current number of JMS servers that are deployed on this WebLogic Server instance.                                                                                                                                                      |
| **weblogic.jms\_runtime.jms\_servers\_total**(rate)                                 | The total number of JMS servers that were deployed on this WebLogic Server instance since this server was started.                                                                                                                         |
| **weblogic.jvm\_runtime.heap\_free**(gauge)                                         | The current amount of memory (in bytes) that is available in the JVM heap.*Shown as byte*                                                                                                                                                  |
| **weblogic.jvm\_runtime.heap\_free\_percent**(gauge)                                | Percentage of the maximum memory that is free.*Shown as percent*                                                                                                                                                                           |
| **weblogic.jvm\_runtime.heap\_size**(gauge)                                         | The current size (in bytes) of the JVM heap.*Shown as byte*                                                                                                                                                                                |
| **weblogic.jvm\_runtime.heap\_size\_max**(gauge)                                    | The maximum free memory configured for this JVM.*Shown as byte*                                                                                                                                                                            |
| **weblogic.server.max\_open\_sockets**(gauge)                                       | The maximum number of open sockets allowed in server at a given point of time.                                                                                                                                                             |
| **weblogic.server.threadpool\_socket\_readers\_percent**(gauge)                     | The percentage of execute threads from the default queue that can be used as socket readers.*Shown as percent*                                                                                                                             |
| **weblogic.server\_channel\_runtime.bytes\_received**(rate)                         | The total number of bytes received on this channel.*Shown as byte*                                                                                                                                                                         |
| **weblogic.server\_channel\_runtime.bytes\_sent**(rate)                             | The total number of bytes sent on this channel.*Shown as byte*                                                                                                                                                                             |
| **weblogic.server\_channel\_runtime.connections\_active**(gauge)                    | The number of active connections and sockets associated with this channel.*Shown as connection*                                                                                                                                            |
| **weblogic.server\_channel\_runtime.messages\_received**(rate)                      | The number of messages received on this channel.*Shown as message*                                                                                                                                                                         |
| **weblogic.server\_channel\_runtime.messages\_sent**(rate)                          | The number of messages sent on this channel.*Shown as message*                                                                                                                                                                             |
| **weblogic.server\_channel\_runtime.sockets\_accepted**(rate)                       | The number of sockets that have been accepted on this channel. This includes sockets both past and present.                                                                                                                                |
| **weblogic.server\_runtime.open\_sockets**(gauge)                                   | The current number of sockets registered for socket muxing on this server.                                                                                                                                                                 |
| **weblogic.servlet\_runtime.exec\_time\_high**(rate)                                | The amount of time the single longest invocation of the servlet has executed since created.*Shown as millisecond*                                                                                                                          |
| **weblogic.servlet\_runtime.exec\_time\_low**(gauge)                                | The amount of time the single shortest invocation of the servlet has executed since created.*Shown as millisecond*                                                                                                                         |
| **weblogic.servlet\_runtime.exec\_time\_total**(rate)                               | The total amount of time all invocations of the servlet have executed since created.*Shown as millisecond*                                                                                                                                 |
| **weblogic.servlet\_runtime.pool\_max\_capacity**(gauge)                            | The maximum capacity of this servlet for single thread model servlets.*Shown as thread*                                                                                                                                                    |
| **weblogic.servlet\_runtime.reloads\_total**(gauge)                                 | The total count of the number of times this servlet has been reloaded.                                                                                                                                                                     |
| **weblogic.threadpool\_runtime.completed\_requests**(rate)                          | The number of completed requests in the priority queue.*Shown as request*                                                                                                                                                                  |
| **weblogic.threadpool\_runtime.execute\_threads\_idle**(gauge)                      | The number of idle threads in the pool. This count does not include standby threads and stuck threads. The count indicates threads that are ready to pick up new work when it arrives.*Shown as thread*                                    |
| **weblogic.threadpool\_runtime.execute\_threads\_total**(gauge)                     | The total number of threads in the pool.*Shown as thread*                                                                                                                                                                                  |
| **weblogic.threadpool\_runtime.overload\_rejected\_requests**(gauge)                | Number of requests rejected due to configured Shared Capacity for work managers have been reached.*Shown as request*                                                                                                                       |
| **weblogic.threadpool\_runtime.queue\_length**(gauge)                               | The number of pending requests in the priority queue. This is the total of internal system requests and user requests.*Shown as request*                                                                                                   |
| **weblogic.threadpool\_runtime.shared\_capacity\_work\_managers**(gauge)            | Maximum amount of requests that can be accepted in the priority queue.*Shown as request*                                                                                                                                                   |
| **weblogic.threadpool\_runtime.threads\_hogging**(gauge)                            | The threads that are being held by a request at the time of submission.*Shown as thread*                                                                                                                                                   |
| **weblogic.threadpool\_runtime.threads\_standby**(gauge)                            | The number of threads in the standby pool. Threads that are not needed to handle the present work load are designated as standby and added to the standby pool. These threads are activated when more threads are needed.*Shown as thread* |
| **weblogic.threadpool\_runtime.threads\_stuck**(gauge)                              | Number of stuck threads in the thread pool.*Shown as thread*                                                                                                                                                                               |
| **weblogic.threadpool\_runtime.throughput**(gauge)                                  | The mean number of requests completed per second.*Shown as request*                                                                                                                                                                        |
| **weblogic.threadpool\_runtime.user\_requests\_pending**(gauge)                     | The number of pending user requests in the priority queue. The priority queue contains requests from internal subsystems and users. This is just the count of all user requests.*Shown as request*                                         |
| **weblogic.webapp\_component\_runtime.sessions\_current**(gauge)                    | The count of the current total number of open sessions in this module.*Shown as session*                                                                                                                                                   |
| **weblogic.work\_manager\_runtime.requests\_completed**(rate)                       | The number of requests that have been processed, including daemon requests.*Shown as request*                                                                                                                                              |
| **weblogic.work\_manager\_runtime.requests\_pending**(gauge)                        | The number of waiting requests in the queue, including daemon requests.*Shown as request*                                                                                                                                                  |
| **weblogic.work\_manager\_runtime.threads\_stuck**(gauge)                           | The number of threads that are considered to be stuck on the basis of any stuck thread constraints.*Shown as thread*                                                                                                                       |

### Log collection{% #log-collection %}

1. WebLogic logging services use an implementation based on the Java Logging APIs by default. Clone and edit the [integration pipeline](https://docs.datadoghq.com/logs/processing.md#integration-pipelines) if you have a different format.

1. Collecting logs is disabled by default in the Datadog Agent. Enable it in your `datadog.yaml` file:

   ```yaml
   logs_enabled: true
   ```

1. Uncomment and edit the logs configuration block in your `weblogic.d/conf.yaml` file. Change the path and service parameter values based on your environment. See the [sample weblogic.d/conf.yaml](https://github.com/DataDog/integrations-core/blob/master/weblogic/datadog_checks/weblogic/data/conf.yaml.example) for all available configuration options.

   ```yaml
    - type: file
      path: <DOMAIN_DIR>/servers/<ADMIN_SERVER_NAME>/logs/<ADMIN_SERVER_NAME>.log
      source: weblogic
      service: admin-server
      log_processing_rules:
        - type: multi_line
          name: new_log_start_with_date
          pattern: (\####)?<\w{3} (0?[1-9]|[12][0-9]|3[01]), \d{4}
    - type: file
      path: <DOMAIN_DIR>/servers/<ADMIN_SERVER_NAME>/logs/<DOMAIN_NAME>.log
      source: weblogic
      service: domain
      log_processing_rules:
        - type: multi_line
          name: new_log_start_with_date
          pattern: (\####)?<\w{3} (0?[1-9]|[12][0-9]|3[01]), \d{4}
    - type: file
      path: <DOMAIN_DIR>/servers/<SERVER_NAME>/logs/<SERVER_NAME>.log
      source: weblogic
      service: managed-server
      log_processing_rules:
        - type: multi_line
          name: new_log_start_with_date
          pattern: (\####)?<\w{3} (0?[1-9]|[12][0-9]|3[01]), \d{4}
    - type: file
      path: <DOMAIN_DIR>/servers/*/logs/access.log 
      source: weblogic
      service: http-access
      log_processing_rules:
        - type: multi_line
          name: new_log_start_with_date
          pattern: .*\[\d{2}\/(\w{3}|\w{4})\/\d{4}:\d{2}:\d{2}:\d{2} (\+|-)\d{4}\]
   ```

1. [Restart the Agent](https://docs.datadoghq.com/agent/guide/agent-commands.md#start-stop-and-restart-the-agent)

### Containerized{% #containerized %}

For containerized environments, see the [Autodiscovery with JMX](https://docs.datadoghq.com/agent/guide/autodiscovery-with-jmx.md?tab=containerizedagent) guide.

### Events{% #events %}

The WebLogic integration does not include any events.

### Service Checks{% #service-checks %}

**weblogic.can\_connect**

Returns `OK` if the Agent is able to connect to and collect metrics from the monitored WebLogic instance, `WARNING` if no metrics are collected, and `OK` otherwise.

*Statuses: ok, critical, warning*

## Troubleshooting{% #troubleshooting %}

Need help? Contact [Datadog support](https://docs.datadoghq.com/help/).
