Sunteți pe pagina 1din 15

 Configuring WebLogic Mail sessions, Watches and Notifications

Can WebLogic send an email when a certain message shows up in the WLS log? The answer is yes
and it is pretty straight-forward to configure.

To setup notifications in Weblogic server we need to create a mail session that will be used to send
notification mails.

From Admin Console Domain Structure

Goto Services>Mail Sessions

Lock the session for editing and click on New

C2 General
Targeting

C2 General
It indicates on which WebLogic Server instances or clusters the mail session is accessible. Only
applications that have been deployed to the selected servers or clusters can use this mail session.

 Configuring a Diagnostic Module:

A diagnostic system module is a software component that you configure to monitor an aspect of a
server or server resource. You can configure multiple system modules to monitor different aspects
of a server, but only one such module can be active on a server.

Goto Diagnostic>Diagnostic Modules

Lock the Session for Editing and click on New

C2 General
C2 General
Click on Module-WLS-AdminServer

Target it to the Admin Server

Click on watches and notification Tab to configure watches and notifications. We have set severity as
Notice, so this module will keep track of all events in this AdminServer under Notice tag in server
level logs.

C2 General
 Creating Watches
Lock the session for Editing

In

Click New to configure Watches

C2 General
We have created a watch ServerUp which will monitor if server is up.

Now to monitor this event, we need to set rules for this condition of server. We have edited the rules
with below:

(MESSAGE LIKE ‘RUNNING’) OR (MESSAGE LIKE ‘running in Production Mode’) OR (MSGID =


‘BEA000360′)

Click on Add Expression

C2 General
C2 General
Click Finish

Lets create another watch for Server down as seen below

(MESSAGE = ‘FORCE_SHUTTING_DOWN’) OR (MESSAGE = ‘SHUTTING_DOWN’) OR (MSGID = ‘BEA-


002607′) OR (MSGID = ‘BEA-000236′) OR (MESSAGE LIKE ‘SHUTTING_DOWN’) OR (MESSAGE LIKE
‘FORCE_SHUTTING_DOWN’) OR (MSGID = ‘BEA-000383′) OR (MSGID = ‘BEA-000396′) OR (MSGID =
‘BEA-000388′)

C2 General
C2 General
C2 General
 Creating Notification for ServerUp Watch:
We have created watches for Server up and Server going down. Now we will create
Notifications via which we will receive the notifications for defined events.

We shall create Notification for ServerUp Watch:

Click on New

C2 General
We can set our customized messages in notifications also; we can select the recipients of
this notification.

Now that the notifications and watches are created, we can assign notifications to
respective watches.

For watch Server Up:

C2 General
C2 General
Similar steps are followed for Server Down notification. Save the changes and then active
changes. If the configuration is fine, you will receive emails ,

In case of any issue, feel free to contact me 


kgauravmishra@live.com

C2 General