WebLogic Monitoring Exporter exposes metrics and monitoring data through REST APIs for consumption by other tools (e.g. Prometheus)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
config_coordinator Remove superfluous license references Nov 9, 2017


WebLogic Monitoring Exporter

Build Status

An exporter of Prometheus-compatible metrics that uses the WLS RESTful Management API to scrape runtime information. It is intended to be deployed as a web application in a WebLogic Server (WLS) instance, version 12.2.1 or higher. Typically, this is deployed to the instance you want to scrape.


mvn install to build the exporter servlets.

Then cd webapp & mvn package to build the webapp wls-exporter.war, which can then be deployed to WLS.

Adding -Dconfiguration=<some-config-file> will create a webapp with the specified configuration as its default.


Here is an example yaml configuration:

  url: http://coordinator:8999/
  interval: 5
metricsNameSnakeCase: true
- applicationRuntimes:
    key: name
    keyName: app
      type: WebAppComponentRuntime
      prefix: webapp_config_
      key: name
      values: [deploymentState, contextRoot, sourceInfo, openSessionsHighCount]
        prefix: weblogic_servlet_
        key: servletName
        values: invocationTotalCount

Note that there are two parts to the configuration. The optional top portion defines general processing rules:

Name Description
query_sync Configuration for a service which coordinates updates to the query configuration. Optional.
query_sync.url The url of the service. Required if this section is present.
query_sync.interval The interval in seconds at which the service will be queries. Defaults to 10.
metricsNameSnakeCase If true, metrics names will be converted to snake case. Defaults to false

The query field is more complex. Each query consists of a hierarchy of the mbeans, starting relative to ServerRuntimes. Within each section, there are a number of options:

Name Description
key the name of the attribute to use as a key for qualifiers in the output
keyName the name to use for the key in the qualifier; defaults to the name of the attribute
prefix a prefix to use for all metrics gathered from the current level
values the attributes for which metrics are to be output. If not specified and prefix is defined, all values on the mbean will be selected
type a filter for subtypes. If specified, only those objects whose 'type' attribute matches will be collected

Note that all fields other than the above will be interpreted as collections of values.

In the above example, the presumed underlying data structure is:

+---------------+   applicationRuntimes     
| ServerRuntime |-----------+                 
+---------------+           |
            +--------------------+                       +------------------+
            | ApplicationRuntime |   componentRuntimes   | ComponentRuntime |
            |--------------------| --------------------> |------------------|
            | + name             |                       | + type           |
            +--------------------|                       +------------------+
                                                                  / \
     +------------------------+                    +-------------------------+
     |        Servlet         |       servlets     | WebAppComponentRuntime  |
     |------------------------| <----------------- |-------------------------|
     | + servletName          |                    | + name                  |
     | + invocationTotalCount |                    | + contextRoot           |
     +------------------------+                    | + deploymentState       |
                                                   | + sourceInfo            |
                                                   | + openSessionsHighCount |

The above configuration will then produce metrics such as:


Note that no help or type text is current produced, as the REST API has no access to the underlying mbean info.


The exporter produces metrics for monitoring its own performance:

  • wls_scrape_mbeans_count_total reports the number of metrics scraped
  • wls_scrape_duration_seconds reports the time required to do the scrape
  • wls_scrape_cpu_seconds reports the CPU time used during the scrape


Copyright (c) 2017-2018 Oracle and/or its affiliates. All rights reserved.