1. Go to the Home Page and click on Monitoring Dashboard under charts & 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)
4. You can also change the chart type
5. You can create your own view’s as well to monitor. Select My Views and click on New symbol on the top.
6. Create the view and go to Metric Browser. Select the server. Select the Mbean Type, Instance and the attribute you want to monitor.
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.
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’.
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.