How to configure Intelligent Management features in WebSphere Application Server

How to configure Intelligent Management features in WebSphere Application Server


Purpose – To explore the Health Management – Intelligent Management features of WebSphere Application Server

Pre-requisites
RHEL or CentOS 7 with WAS ND v9 installed
What is Health Management
Health management is the process by which Intelligent Management dynamic operations monitor and manage servers to preserve an optimal server environment. The health monitor uses health policies. A health policy is a combination of health conditions and actions. 
Health conditions define triggers from which the system can protect itself, for example, a memory leak
Health actions are the specific steps that the system takes when a health condition is triggered
Benefits of Intelligent Management  –
Intelligent Routing– Requests to applications are prioritized and routed based on administrator defined rules
Health Management – Detect specific defined conditions automatically and take corrective action
Application Edition Management – Roll out new versions of applications without any downtime
Performance Management – Provides a self-optimized middleware infrastructure
Procedure
Step1: Create a Deployment Manager Profile
[root@desktop1 bin]# ./manageprofiles.sh -create -profileName Dmgr01 -profilePath /opt/IBM/WebSphere9/profiles/Dmgr01 -templatePath /opt/IBM/WebSphere9/profileTemplates/management -serverType DEPLOYMENT_MANAGER
INSTCONFSUCCESS: Success: Profile Dmgr01 now exists. Please consult /opt/IBM/WebSphere9/profiles/Dmgr01/logs/AboutThisProfile.txt for more information about this profile.
Step2: Create a Application Server Profile
[root@desktop1 bin]# ./manageprofiles.sh -create -profileName AppSrv01 -profilePath /opt/IBM/WebSphere9/profiles/AppSrv01 -templatePath /opt/IBM/WebSphere9/profileTemplates/default
INSTCONFSUCCESS: Success: Profile AppSrv01 now exists. Please consult /opt/IBM/WebSphere9/profiles/AppSrv01/logs/AboutThisProfile.txt for more information about this profile.
Step3: Federate the Application Server Profile to Deployment Manager Profile with the installed Applications included
[root@desktop1 bin]# pwd
/opt/IBM/WebSphere9/profiles/Dmgr01/bin
[root@desktop1 bin]# ./startManager.sh
ADMU0116I: Tool information is being logged in file
           /opt/IBM/WebSphere9/profiles/Dmgr01/logs/dmgr/startServer.log
ADMU0128I: Starting tool with the Dmgr01 profile
ADMU3100I: Reading configuration for server: dmgr
ADMU3200I: Server launched. Waiting for initialization status.
ADMU3000I: Server dmgr open for e-business; process id is 8510
[root@desktop1 bin]# pwd
/opt/IBM/WebSphere9/profiles/AppSrv01/bin
[root@desktop1 bin]# ./addNode.sh desktop1.example.com 8879 -includeapps
ADMU0003I: Node desktop1Node01 has been successfully federated.
[root@desktop1 bin]# ./startServer.sh server1
ADMU3000I: Server server1 open for e-business; process id is 9874
Step4: Validate if Health Management is enabled or disabled
By default, Health Management is enabled, You can check the below file for verifying if its enabled or disabled
[root@desktop1 desktop1Cell01]# pwd
/opt/IBM/WebSphere9/profiles/Dmgr01/config/cells/desktop1Cell01
[root@desktop1 desktop1Cell01]# cat healthcontroller.xml
<?xml version=”1.0″ encoding=”UTF-8″?>
<healthcontroller:HealthController xmi:version=”2.0″ xmlns:xmi=”http://www.omg.org/XMI” xmlns:healthcontroller=”http://www.ibm.com/websphere/appserver/schemas/6.0/healthcontroller.xmi” xmi:id=”HealthController_1508827594507″ enable=”true” />
Step5: Create a new Health Policy for taking the Thread Dumps and Restarting the JVM
wsadmin> AdminTask.createHealthPolicy(‘[-name TestHealth -description TestHealth -reactionMode AUTOMATIC  -addMember [[SERVER server2 desktop1Node01] [SERVER server1 desktop1Node01]] -addCondition [-type AGE -params [ [ageUnits MINUTES] [maxAge 2] ]] -addAction [[RESTART_SERVER 1 “” “” “”]]]’)
wsadmin>AdminConfig.save()
wsadmin>AdminTask.listHealthPolicies()
u’TestHealth(cells/desktop1Cell01/healthclasses/TestHealth|healthclass.xml)’
Step6: Validate if the above Health monitoring condition is detected or not
As we have created the health policy is automatic mode, the two JVM’s gets restarted after 2 minutes automatically
Here you can add an additional action of taking thead and heap dumps before restarting the JVM by mentioning the action in the Health Policy already 

Hope you enjoyed reading this article. Thank you.