Health management policies for Liberty
You can define the health policies, which include the health conditions that you want to monitor in your environment and the health actions to take if these conditions are met.
About this task
Health policies are configured in the same manner as other Liberty features. Within the
server.xml file configuration, a new element type of
<healthPolicy>
is used to define a single health policy. If more than one policy
is needed, multiple health policy elements can be added to the server.xml
file.
Procedure
Example
In this example, the health policy specifies that all servers in cluster
mycluster1 and all servers on host myHost are monitored
for excessive memory usage. The policy monitors the excessiveMemoryUsage
condition
based on the specified thresholds. The policy instructs the health management controller to place
the server experiencing the excessive memory usage into maintenance mode and request a heap dump
from that server.
<healthPolicy id="myHealthPolicy" >
<cluster clusterName="mycluster1"/>
<host hostName="myHost"/>
<excessiveMemoryUsage heapSizePercentage="85" timePeriod="5m"/>
<action action="enterMaintenanceMode"/>
<action action="generateHeapDump"/>
</healthPolicy>
CWWKV0609I: The health policy myHealthPolicy is added. CWWKV0603I: The health condition com.ibm.ws.health.manager.healthPolicy.condition.excessiveMemoryUsage is being monitored on target member_host_name,path_to_usr_directory,member_name. CWWKV0607I: The health policy myHealthPolicy is activated for member_host_name,path_to_usr_directory,member_name.
CWWKV0610I: The health policy myHealthPolicy is removed. CWWKV0604I: The health condition com.ibm.ws.health.manager.healthPolicy.condition.excessiveMemoryUsage is no longer being monitored on target member_host_name,path_to_usr_directory,member_name. CWWKV0609I: The health policy myHealthPolicy is added. CWWKV0603I: The health condition com.ibm.ws.health.manager.healthPolicy.condition.excessiveMemoryUsage is being monitored on target member_host_name,path_to_usr_directory,member_name.