This assumes you are familiar with Health Management in WebSphere. If not, check out our getting started article. By default, health monitoring is enabled. However, you may want to ensure that you have health monitoring enabled.
In the WebSphere admin console, select Operational policies > Health policy. Select New. Give your Health Policy a name, select one of the following conditions, and select Next. Based on the condition you selected, follow the prompts to create the action.
- Age-based condition (do something once every x seconds, minutes, days, weeks, month, years)
- Excessive request timeout condition
- Excessive response time condition
- Memory condition: excessive memory usage
- Memory condition: memory leak
- Storm drain condition (do something when an application has a significantly decreased response time)
- Workload condition (do somthing when workload is high)
- Garbage collection percentage condition
In this example, a policy was created to restart a cluster once every 7 days. Be aware that the Health Controller will define the number of minutes that will elapse between each restart of the application server, the maximum number of consecutive restarts that will be done, and a schedule for when restarts should not be performed.