Hi,

Jay SenSharma

Jay SenSharma

Here is a Simple way to use WLDF (WebLogic Diagnostic Framework) to get E-Mail Notification…If the FreeHeapPercentage of the JVM goes less than 10 %.
Complete Steps can be Devided into 3-parts

A). Configuring a Mail-Session

B). Configuring WLDF Module

C). Configuring Watch And Notification

Part-A***Configuring a Mail-Session

Step1). We Need to create a Mail-Session From Admin Console:
Name: MyMailSession
MailSession JNDI Name: MyMailSessionJNDI
JavaMail Properties: (In your OutLook Options you will find the mailHost & UserName)
mail.smtp.host=myMailHost
mail.smtp.user=myMailUserName

Step2). Target your Mail Session to Any Server
AdminServer

Part-B *Configuring WLDF Module

Step1). From Admin Console Left Panel Navigate to Diagnostics–>Diagnostic Modules
Create a New DiagnosticModule
Name: MyDiagnosticModule —> Finish

Now Change the Tagret of MyDiagnosticModule to “AdminServer

Step2). now click on newly created “MyDiagnosticModule” you will find a TAB in the new Page “Collected Metrics
Create a New Collection Matrics- – – click on – – – NEXT
MBean Server location: ServerRuntime – – – NEXT
Select an MBean Type from the following list
MBean Type: weblogic.management.runtime.JVMRuntimeMBean – – – NEXT
Collected Attributes: Available HeapFreePercentage (choose) – – – NEXT – – –

Collected Instances: – Use the Arrow Button to Move the “com.bea:Name=AdminServer,ServerRuntime=AdminServer,Type=JVMRuntime
– – FINISH

Now Change the Target of this (Collection Mertix) to AdminServer (Activate Changes/save)

Part-C Configuring Watch And Notification

Step1). In Admin Console (click on Lock & Edit Button) Now navigate to
Diagnostics–>Diagnostic Modules –> MyDiagnosticModule –> Watches and Notifications
Click on “Notifications” Tab to create a New Notofication click on :New” Button

Notification Name: MyNotification
Type: SMTP (E-Mail)
Enable Notification (Check the CheckBox) – – – NEXT
Mail Session Name: MyMailSession (remember we have Created this mail Session earlier in Part-A)
E-Mail Recipients: : i.am.recipient@company.com (Enter recipient’s Valid E-Mail Id Here)
FINISH Click on (Activate Changes/save Button)

Step2). In Admin Console (click on Lock & Edit Button) and navigate to
Diagnostics–>Diagnostic Modules –> MyDiagnosticModule –> Watches and Notifications
Click on “Watches” Tab to create a New Notofication click on :New” Button
Watch Name: MyWatch
Watch Type: Collection Metrics
Enable Watch (Check) – – – NEXT
In the Next page click on “Add Expressions” Button
MBean Server location: ServerRuntime – – – NEXT
Select an MBean Type from the following list (radio Button) :
MBean Type: weblogic.management.runtime.JVMRuntimeMBean – – – NEXT
Select an Instance from the following list: com.bea:Name=AdminServer,ServerRuntime=AdminServer,Type=JVMRuntime – – – NEXT
Select an attribute from the following list:
Message Attribute: HeapFreeCurrent
Operator: =
Value: 10
– – – FINISH

(It means we should get Alerts if the FreeHeapPercentage will be 10 . U can select any other operator as well like > < <= )

You will find the Current Watch Rule: Something like this:
(${ServerRuntime//http://weblogic.management.runtime.JVMRuntimeMBeancom.bea:Name=AdminServer,ServerRuntime=AdminServer,Type=JVMRuntime//HeapFreeCurrent} = 10)

– – – NEXT (click on)
Use an automatic reset alarm (select the Radio Button) – – – NEXT
Notifications: Available MyNotification (Remember we have created this Notification) – – – FINISH
Press Activate Changes Button

.

.

———————————-

Thanks
Jay SenSharma

If you enjoyed this post, please considerleaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.