Read Part 1: "What is the WLDF?" here
Read Part 2: "Watches" here
This blog directly follows on from part 2 on watches, so if you haven’t already read that then you should probably go and do that now.
You can still create notifications without having any watches configured; you just won’t receive anything on them.
In the last post, I had created two watches, one Server Log watch and one Collected Metrics watch. In this post, I will create notifications to work with these watches.
What are notifications?
WLDF notifications are nothing more than a particular configuration for alerting based on a condition. Think of them as channels of communication; unless something is sent down those channels, they will stay empty. The forms that these channels can take are:
- SMTP Email
- JMS Message
- Diagnostic Image
- JMX Notification
- SNMP Trap
Which notification should I use?
So which is best: active or passive?
I’ll wait here.
To create your JMX notification, go to the diagnostic module where your watches are configured. In Configuration -> Watches and Notifications, click the “New” button in the Notifications tab in the lower pane.
Next, there are just two steps. Select “JMX Notification” as the type, as shown in the image, then click Next to name your notification.
Enter a meaningful name in the name field and make sure the Enable Notification box is ticked. Click OK and your notification is created!
Using your notifications
Now you’ve created your notifications, you need to tell your watches to use them! In the screenshot below, I’ve opened my SocketsOpen watch from the last blog and moved across my JMX notification from “Available” to “Chosen”
That’s all there is to it! Obviously if you wanted to use the email notification, choose that instead or as well as the JMX notification.
Now you can create watches and notifications on WebLogic, you can configure a monitoring product like RHQ or Hyperic to monitor anything that you can configure a watch on; with JMX tools, this normally stops with MBeans, but thanks to watches you can also monitor server logs and instrument your applications!