Oracle WebLogic Server and Oracle WebLogic Monitoring Exporter

Posted by Dirk Nachbar on Thursday, April 02, 2020 with No comments
As the latest release of Oracle WebLogic Server is available (see my blogposts and, it's time to test Oracle WebLogic Server and the Oracle WebLogic Monitoring Exporter

In a previous blogpost ( I was already talking about the Oracle WebLogic Monitoring Exporter, which is generating Prometheus conform metrics out of the Oracle WebLogic Server 12.2.x.

In the WebLogic Monitoring Exporter release 1.1.1 was a small issue with the option "domainQualifier: true". This option was causing, that a non Prometheus conform metric was generated and therefor your Prometheus Server couldn't capture the metrics.
With the actual release 1.1.2 of the WebLogic Monitoring Exporter this issue is fixed, many thanks to the Development Team behind the WebLogic Monitoring Exporter.

So, what you will need, is a running WebLogic Server domain, download the file from and create a YAML file for the to be generated metrics:

$ cat exporter-config.yml

metricsNameSnakeCase: true
domainQualifier: true
- key: name
  keyName: location
  prefix: wls_server_
    key: name
    keyName: app
      prefix: wls_webapp_config_
      type: WebAppComponentRuntime
      key: name
      values: [deploymentState, contextRoot, sourceInfo, sessionsOpenedTotalCount, openSessionsCurrentCount, openSessionsHighCount]
        prefix: wls_servlet_
        key: servletName
- JVMRuntime:
    prefix: wls_jvm_
    key: name
- executeQueueRuntimes:
    prefix: wls_socketmuxer_
    key: name
    values: [pendingRequestCurrentCount]
- workManagerRuntimes:
    prefix: wls_workmanager_
    key: name
    values: [stuckThreadCount, pendingRequests, completedRequests]
- threadPoolRuntime:
    prefix: wls_threadpool_
    key: name
    values: [executeThreadTotalCount, queueLength, stuckThreadCount, hoggingThreadCount]
- JMSRuntime:
    key: name
    keyName: jmsruntime
    prefix: wls_jmsruntime_
      prefix: wls_jms_
      key: name
      keyName: jmsserver
        prefix: wls_jms_dest_
        key: name
        keyName: destination
- persistentStoreRuntimes:
    prefix: wls_persistentstore_
    key: name
- JDBCServiceRuntime:
      prefix: wls_datasource_
      key: name
- JTARuntime:
    prefix: wls_jta_
    key: name

Place the and the YAML file in one directory and execute from your Shell following command, which will add your YAML file into the wls-exporter.war file.

$ ls -la
-rw-r--r--    1 oracle  oinstall     1401 Apr  2 11:46 exporter-config.yml
-rwxr-xr-x@   1 oracle  oinstall      373 Apr  2 11:43

$ ./ exporter-config.yml 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   607  100   607    0     0   1568      0 --:--:-- --:--:-- --:--:--  1564
100 2018k  100 2018k    0     0   937k      0  0:00:02  0:00:02 --:--:-- 2009k
created /var/folders/b_/ldw8b91n7h7dp58hd3xf2qmc0000gn/T/ci-XXXXXXXXXX.EUmQ8eka
/var/folders/b_/ldw8b91n7h7dp58hd3xf2qmc0000gn/T/ci-XXXXXXXXXX.EUmQ8eka ~/Downloads/test
in temp dir
updating: config.yml
 zip warning: Local Entry CRC does not match CD: config.yml
 (deflated 64%)

$ ls -la wls-exporter.war
-rw-r--r--    1 oracle  oinstall  2066869 Apr  2 11:47 wls-exporter.war

Now, just deploy the newly generated war file wls-exporter.war on your WebLogic domain, start the webapp and you can access the metrics over the URL http://<Your Servername>:<Port of Managed Server or AdminServer>/wls-exporter/metrics

Snippet from an AdminServer
Snippet from a Managed Server

How to integrate the metrics from your WebLogic Server into your Prometheus, just have a look on my previous blogpost "Weblogic Monitoring with Prometheus and Grafana" The method remains the same as for Oracle WebLogic Server 12.2.x