WLDF Archive

Using WLDF to view Historical Data

1. Go to the Home Page and click on Monitoring Dashboard under charts & graph

charts and graph

2. This will open the dashboard in a new tab. There are some built in views. You can select JVM Runtime Heap and click on the start button on the top.


3. You should be able to see the Heap Size Current ( Yellow Line) and Heap Free Current ( Blue Line)

JVM Runtime Heap View


4. You can also change the chart type

bar graph

5. You can create your own view’s as well to monitor. Select My Views and click on New symbol on the top.

New View

6. Create the view and go to Metric Browser. Select the server. Select the Mbean Type, Instance and the attribute you want to monitor.

Operating System Mbean

7. Select your view and create a new chart, add a metric and then start the recording. You can add multiple metrics as I have done in this example. I am monitoring the System Load, Process CPU Time and Total Physical Memory.

New chart

add metric


WLDF generating JMS Message notifications

This post describes a simple usage of how we can leverage the WLDF functionality with JMS feature. This post would show how WLDF can generate notifications in the form of JMS messages and sends it to message Queue which can be consumed by the JMS consumer.

Before starting the configuration , we would require a JMS Queue setup. Follow the below link to create one.


1. Login into the WebLogic Administration Console and navigate to Diagnostic → Diagnostic Module.

Create a WLDF (Diagnostic) module.

2. Click on the created WLDF module.

NOTE: There are two types o RunTime MBeans.  DomainRuntime Mbean and ServerRuntime Mbean.

DomainRuntime Mbean provides access to the Domain Wide configuration and is available only for the Admin Server.

When connecting to Managed Server, the root would be ServerRuntime MBean and DomainRuntime Mbean is not available

The below post depicts the access to DomainRuntime Mbean.

Navigate to the ‘Create Metrics’ → New → Specify the Metric Collection Properties details by selecting on which type of Mbean you want to configure the Metrics. → Select DomainRuntime

3. Select the Mbean you want to collect metrics for. For demo we would select ‘weblogic.management.runtime.JVMRuntimeMBean’ → Specify which attribute of the Mbean you want to monitor. For instance select ‘HeapSizeMax’.

4. Select the server instance which you want to monitor. Click finish and the collection metrics is created.

5. Now create Watch and Notifications.

The Watch and Notification system can be used to create automated monitors that observe specific diagnostic state and send notifications based on configured rules.

Watch:- It is basically used to monitor the Mbean attributes.

Notifications: There are the events which are triggered based on the values set in the watch. There can be different kind of alerts like SNMP alerts, JMS Messages, JMX notifications etc.

We would be selecting JMS Messages from the notifiers list.

6. Specify the Queue JNDI name and the Connection Factory JNDI name which would be notified when the Watch events are triggered.

7. Once the notification is created. Create a watch to monitor the attributes of the Mbean.

8. Click on the ‘Add Expressions’ to specify the rules for the watch. There can be a set of rules monitoring different attributes.

Here we would monitor the HeapSizeMax attribute of ‘weblogic.management.runtime.JVMRuntimeMBean for demo.

9. Select DomainRuntime from the drop down → Click next and select ”weblogic.management.runtime.JVMRuntimeMBean’ from the drop down list → Select the instance of the server from the drop down list.

10.Select the attribute , you want to monitor. For example HeapSizeMax and specify a value for that rule. Click Next.

Note: Click on combine tab, if you want to have a set of rules for the watch expression.

11. Select ‘Use an automatic reset alarm’ that would reset the notification alarms automatically.

12. Select the JMS Notifier from the left side list so that we can associate the Notifier with the watch created, click finish.

13. Target the WLDF to any of the servers whose MBeans are monitored.

Note: The default polling interval of the Mbean attribute is ‘300000’ milliseconds. We can reconfigure it as per our requirements.

13. Now check the server logs or the server console and you can see the alerts being triggered.

14. Compile and execute the below QueueReceiver.java program to receive the notifications in the form of JMS Messages and listening to queue ‘Queue’.



import java.util.Hashtable;

import javax.jms.*;

import javax.naming.Context;

import javax.naming.InitialContext;

import javax.naming.NamingException;

public class QueueReceive implements MessageListener


public final static String JNDI_FACTORY=”weblogic.jndi.WLInitialContextFactory”;

public final static String JMS_FACTORY=”CF1″;

public final static String QUEUE=”Queue1″;

private QueueConnectionFactory qconFactory;

private QueueConnection qcon;

private QueueSession qsession;

private QueueReceiver qreceiver;

private Queue queue;

private boolean quit = false;

public void onMessage(Message msg)


try {

String msgText;

if (msg instanceof TextMessage) {

msgText = ((TextMessage)msg).getText();

} else {

msgText = msg.toString();


System.out.println(“Message Received: “+ msgText );

if (msgText.equalsIgnoreCase(“quit”)) {

synchronized(this) {

quit = true;

this.notifyAll(); // Notify main thread to quit



} catch (JMSException jmse) {

System.err.println(“An exception occurred: “+jmse.getMessage());



public void init(Context ctx, String queueName)

throws NamingException, JMSException


qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);

qcon = qconFactory.createQueueConnection();

qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);

queue = (Queue) ctx.lookup(queueName);

qreceiver = qsession.createReceiver(queue);




public void close()throws JMSException






public static void main(String[] args) throws Exception {

if (args.length != 1) {

System.out.println(“Usage: java examples.jms.queue.QueueReceive WebLogicURL”);



InitialContext ic = getInitialContext(args[0]);

QueueReceive qr = new QueueReceive();

qr.init(ic, QUEUE);

System.out.println(“JMS Ready To Receive Messages (To quit, send a \”quit\” message).”);

synchronized(qr) {

while (! qr.quit) {

try {


} catch (InterruptedException ie) {}





private static InitialContext getInitialContext(String url)

throws NamingException


Hashtable<String,String> env = new Hashtable<String,String>();


env.put(Context.PROVIDER_URL, url);

return new InitialContext(env);




Below image shows that the JMS QueueReceiver program is reading the WLDF notifications.

You can put your own business logic inside the QueueReceiver.java’s onMessage() method to specify the business requirements.

Do let us know, if you run into any issues configuring the same.  🙂

Best Regards

Configuration: WLDF Mail Notification for Runtime Mbean

Weblogic Diagnostics Framework can be used to analyze, collect, archive and access diagnostic data generated by a running server and the applications deployed within its containers.

Here I have provided configuration for sending mail notification on the harversted data for the runtime Mbean which you want to monitor.

1. From <domain_name> -> Diagnostics -> Diagnostics Module Create a diagnostic module and target it to server for which WLDF module has to be used.





For the Diagnostics module created in step 1, create a Collection metrics for mbean you want to monitor:

a) Click on ‘New’ to create a Collection Metrics

b) Select the Mbean Server location for which we want to collect data. It can be DomainRuntime or ServerRuntime Mbean.

c) Select the Mbean which has to be monitored

d) Select the Attributes which you want to collect for the Runtime Mbean selected in Step 2(c)

3) Create a mail session from Services -> Mail Session

a) Specify and JNDI name for mail session and the following as mail session properties:



b) Target the mail session to a server

4) Creating a Notification:

a) From Diagnostics -> Diagnostics Module -> Watches and Notification, Create a New Notification. Specify Notification Type as SMTP (email).Here Keep ‘Enable Notification’ as Checked and click ‘Next’

b) Here select the Mail session which we configured in Step 3 along with the Email Recipients who will be receiving the mail notification for Runtime mbean. Here we can edit the format of Email notification. Click Finish.

5) Create a Watch for Runtime mbean which was mentioned in Collection Metrics configured in Step 2 (Can be Server Log as well):

a) Select the Mbean location

b) Select Mbean to be monitored

c) Select instance for which the Mbean has to be monitored. (Only one instance can be selected at a time. Note: If we want to monitor Runtime Mbean for more than one instance then we can add expression selecting the same mbean for other servers. Refer Step 5-f)

d) Select the attribute for which watch has to be configured and apply desired operation to it. Attribute should be same as what we have configured in Collection Metrics.

f) Verify the Watch Rule Expression created from the previous steps followed. If you want the same mbean to be monitored for more than one server then click on ‘Add Expression’ tab follow steps 5-a through 5-e for other server instance. We can use ‘AND’/’OR’ operations to create Watch Rule as per requirement.

g) Select Alarm on the watch

h) Select the notification which we created in step 4 and Click Finish

After all the above setting we will get an email update if the condition mentioned in the watch rule is met.