Configure Weblogic Mail Session (Optional. Only if you want to send email alert)
1. Login to weblogic console
2. Go to Mail Sessions
3. Click New
4. Enter details Name,JNDI Name, JavaMail Properties.
mail.port=25
mail.user=weblogic
mail.host=xx.xx.xx.xx
mail.transport.protocol=smtp
mail.from=weblogic
Configure Email Notifications in Weblogic Diagnostic
Go to Weblogic Console –> Diagnostic Modules –> Select Module “Module-FMWDFW” –> Configuration –> Policies and Action –> Actions
Click new –> Select SMTP (E-Mail) –> Click Next –> Enter Notification Name & Check Enable Notification –> Got to SMTP Properties –> Select Mail session ->Enter Email Recipients
Server State Monitoring
1.Go to Weblogic Console –> Diagnostic Modules –> Select Module “Module-FMWDFW” –> Configuration –> Policies and Action –> Policies
click New. Enter Details as below
Name: ServerStateWatch
Policy Type: Collected Metrics
Enable Policy: checked
Add rule expression as below, where slc.state is the state of server and slc.name is name of server
wls.domainRuntime.domain.serverLifeCycleRuntimes.stream().anyMatch(slc ->
((slc.state != ‘RUNNING’) and ( (slc.name == ‘AdminServer’) or (slc.name == ‘ManagedServer1’) ) ))
Then choose schedule and alarms in next screen as per requirement. In actions select email notification which was created in earlier step.
Health State Monitoring
Go to Weblogic Console –> Diagnostic Modules –> Select Module “Module-FMWDFW” –> Configuration –> Policies and Action –> Policies
click New. Enter Details as below
Name: ThreadPoolStateWatch
Policy Type: Collected Metrics
Enable Policy: checked
Add rule expression as below, where state is the health state of server and serverName is name of server
wls.domainRuntime.lookupServerRuntime(serverName=’AdminServer’).threadPoolRuntime.healthState.state != 0 or wls.domainRuntime.lookupServerRuntime(serverName=’ManagedServer1’).threadPoolRuntime.healthState.state != 0
Then choose schedule and alarms in next screen as per requirement. In actions select email notification which was created in earlier step.