Configuring Watches 9-5
severityInfoseverity notificationmyMailNotif2notification
watch smtp-notification
namemyMailNotif2name enabledtrueenabled
mail-session-jndi-namemyMailSessionmail-session-jndi-name subjectThis is a log alertsubject
recipientusernameemailservice.comrecipient smtp-notification
watch-notification wldf-resource
9.5 Configuring Instrumentation Watches
You use Instrumentation watches to monitor the events from the WLDF Instrumentation component. Watches of this type are triggered as a result of the event
being posted.
Example 9–3 shows an example configuration for an Instrumentation watch.
Example 9–3 Sample Configuration for an Instrumentation Watch in DIAG_
MODULE.xml
watch-notification watch
namemyInstWatchname enabledtrueenabled
rule-typeEventDatarule-type rule-expression
PAYLOAD gt; 100000000 AND MONITOR = Servlet_Around_Service rule-expression
alarm-type xsi:nil=truealarm-type notificationmySMTPNotificationnotification
watch smtp-notification
namemySMTPNotificationname enabledtrueenabled
mail-session-jndi-namemyMailSessionmail-session-jndi-name subject xsi:nil=truesubject
body xsi:nil=truebody recipientusernameemailservice.comrecipient
smtp-notification watch-notification
9.6 Defining Watch Rule Expressions
A watch rule expression encapsulates all information necessary for specifying a rule. For documentation on the query language you use to define watch rules, see
Appendix A, WLDF Query Language.
9-6 Configuring and Using the Diagnostics Framework for Oracle WebLogic Server
10
Configuring Notifications 10-1
10
Configuring Notifications
The following sections describe the types of notifications and their configuration options:
■
Section 10.1, Types of Notifications
■
Section 10.2, Configuring JMX Notifications
■
Section 10.3, Configuring JMS Notifications
■
Section 10.4, Configuring SNMP Notifications
■
Section 10.5, Configuring SMTP Notifications
■
Section 10.6, Configuring Image Notifications For information on how to create a notification using the Administration Console, see
Create notifications for watches in a diagnostic system module in Oracle WebLogic Server Administration Console Help.
10.1 Types of Notifications
A notification is an action that is triggered when a watch rule evaluates to true. WLDF supports four types of diagnostic notifications, based on the delivery mechanism: Java
Management Extensions JMX, Java Message Service JMS, Simple Mail Transfer Protocol SMTP, and Simple Network Management Protocol SNMP. You can also
create a notification that generates a diagnostic image.
In the configuration file for a diagnostic module, the different types of notifications are identified by these elements:
■
jmx-notification
■
jms-notification
■
snmp-notification
■
smtp-notification
■
image-notification These notification types all have name and enabled configuration options. The
value of name is used as the value in a notification element for a watch, to map the watch to its corresponding notifications. The enabled element, when set to
true, enables that notification. In other words, the notification is fired when an associated watch evaluates to true. Other than name and enabled, each
notification type is unique.
10-2 Configuring and Using the Diagnostics Framework for Oracle WebLogic Server
10.2 Configuring JMX Notifications