WebLogic Managed Servers Health States Automation with WL-OPC

WLSDM for WebLogic
Dec 30, 2020 · 3 min read

WL-OPC (WLSDM OPERATION CENTER) is the operation central and notification system which enables to manage application server infrastructure. You are going to able to manage, organize and visualize with WL-OPC;

How to Create a Notification Actions ?

WLSDM notifications can be managed from WL-OPC. Application, Datasource, JMS, Server and Domain’s health notifications can trigger the custom scripts. In this article about to restarting the server when the servers states are shutdown.

1- Open WL-OPC console and Nativate to “Administration > Notification Actions”.
2- In the “Create Action” panel select Notification Type as “Health ALERT(Server)”
3- Define absolute path of script file.
4- Set timeout(second) value for script execution.
5- Click Save.

Notification Action Configurations

Creating Action and Restart Script
When Notification occurs, WL-OPC creates a json file under the ${WL_OPC}/temp directory. This json file structure and how the variable structure will be examined from the “Administrator > Notification Rules” page.

Server Health Alert — Notification Data Structure

We are going to parse the incoming json file, read the password of the domain from the csv file and restart managed servers via wlst. When we examine the script, path definitions will be made on line #3–4–5. WL-OPC passing an json file path like “$_path/WLOPC/temp/123412.json”. We parse the quotation marks and then assign the file to the $_tmpJson variable. Then we use jq and parse FULL_DOMAIN_NAME value. After getting the hostname, we search for hostname in csv file and get the password column.
Servers with HealthState “shutdown” are parsed from within bodyRow
then it is assigned to the serverBodies variable. Finally, server information and restart script will be running on WLST to restart the provided server.

healthAlertAction.sh

The contents of the hostPass.csv and restartServer.py files are as shown in the following screenshots. “restartScript.py” basicly gets the parameters. Subsequently, connect the domain and starts the managed server.

hostPass.csv

restartServer.py

Consolidate all your Oracle FMW WebLogic domain health and states in a single page in WL-OPC Health dashboard. After all, you can get under control all domain healths via above script then enjoy your healty domains…

Please watch youtube video tutorial about WebLogic instances health control with WL-OPC:

Installation is really easy and you can setup a complete monitoring infrastructure in less than 5 minutes. If you want to try then go to download page below URL:

WLSDM for WebLogic

WLSDM is a WebLogic console extension which enables…

WLSDM for WebLogic

Native Oracle WebLogic Monitoring WLSDM is developed by the best WebLogic developers for the best WebLogic administrators to support mission critical HA domains. Supports all plain WebLogic and Fusion Middleware (FMW) WebLogic domains. Download now! https://wlsdm.com/download

WLSDM for WebLogic

Written by

WLSDM for WebLogic

Native Oracle WebLogic Monitoring WLSDM is developed by the best WebLogic developers for the best WebLogic administrators to support mission critical HA domains. Supports all plain WebLogic and Fusion Middleware (FMW) WebLogic domains. Download now! https://wlsdm.com/download

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store