Creating health policies
A health policy is the definition of specific health criteria. Intelligent Management protects your environment against these criteria. The health management function uses defined policy to identify software malfunctions in the environment.
Before you begin
- To create a health policy, you require configurator or administrator administrative privilege. The health controller must be enabled.
- If you want a custom action to run on the target server when the health condition breaches, define the custom action before you create the health policy. For more information, read about creating health policy custom actions.
About this task
- In the administrative console, click .
Define health condition properties for the health policy.
Remember: The excessive request timeout and storm drain conditions do not apply to Java™ Message Service (JMS) and Internet Inter-ORB Protocol (IIOP) traffic.Health policy conditions include the following properties:
- Set properties that pertain to the health condition that you selected. If you chose to
create a custom health condition, specify a subexpression that represents the metrics that you are
evaluating in your custom condition. For more information about the conditions that you can set,
click Syntax help.
As a best practice, consider the cost of collecting the data, analyzing the data, and if needed, enforcing the health policy when you define a custom condition. Consider the amount of traffic in your network, especially when you scale out the number of servers that produce data. Before introducing new health policies into the production environment, analyze these aspects of your custom health conditions.
You can further configure your custom health conditions that leverage PMI modules, notably the
webAppModules, at finer granularities than the server granularity. For example, you can use the subexpression builder to create a
webAppModulepolicy as a starting point, then edit the expression to define a finer granularity:
In this example, the application name is displayed as SlamSess when you list the applications in the administrative console. If you are using an EAR file, specify the Web archive (WAR) file name after the EAR file name. If the WAR is not embedded in an EAR file, specify only the WAR file name. The SlamSess value is the servlet name that is listed in the web.xml file. The responseTime value is the statistic that is listed in the Performance Monitoring Infrastructure (PMI) module definition.
PMIMetric_FromServerStart$webAppModule$SlamSess\#SlamSess.war\/webAppModule.servlets\/SlamSess\/responseTime > 100L
- Choose a reaction mode. Supervise mode allows the administrator to approve or reject actions before they are taken.
- Select the actions to take when the health policy conditions are not met. The available actions depend on the health condition type.These actions can be the existing default actions, or you can define custom actions to run an executable file. A list of actions are displayed in the sequence in which they run when the health condition breaches. You can add and remove steps from this list.
- If you select a custom action for your health policy, you must indicate the targets for your custom action. If you select Node hosting the sick server as your target node, the target server options are Node agent of the sick server and Sick server.
- Set properties that pertain to the health condition that you selected. If you chose to create a custom health condition, specify a subexpression that represents the metrics that you are evaluating in your custom condition. For more information about the conditions that you can set, click Syntax help.
Select the members to monitor.
Layers of logic can apply to monitored members. For example, you might want to apply a specific health policy to each member of a cluster and to an application server outside of the cluster.
- Review and save your health policy.
Specifying a specific connection pool in a health policy
This is an example of specifying a specific connection pool in a health policy. JDBC connection
pools typically have a forward slash (
/) in the resource name, for example
jdbc/PlantsByWebSphereDataSource. This example requires (1) that you enable PMI
on the JDBC Connection Pool, followed by (2) Creating the custom health policy.
- Enable the PMI connection pool percentUsed sub-stat on the server, which the policy will apply, by navigating to .
- Locate the connection pool under JDBC Connection Pools.
- Select the PercentUsed counter.
- Click Enable.
- Save and synchronize the change.
- Restart the Server.
- Using the administrative console, click .
- Provide a Name and select Custom health condition in the radio button.
- Create the custom policy for the resource name,
jdbc/PlantsByWebSphereDataSource. The policy should look
PMIMetric_FromLastInterval$connectionPoolModule$Derby\ JDBC\ Provider\/jdbc\\\/PlantsByWebSphereDataSource/percentUsed >= 30L
Note that the separators are the space character
- The generic expression is
operand$moduleName$subStatMetric\/subStatMetric[n]/metricName operator value
- The field breakdown for creating this custom health policy is listed
operand: PMIMetric_FromLastInterval moduleName: connectionPoolModule subStatMetric: Derby JDBC Provider subStatMetric: jdbc/PlantsByWebSphereDataSource metricName: percentUsed operator: >= value: 30L
- Within these fields, space characters must be escaped with
\, and a forward slash (
/) must be escaped by
What to do next
If you chose the Supervise reaction mode, then you receive recommendations to improve your health conditions. These recommendations display as runtime tasks that you can accept, deny, or close. To manage runtime tasks, click in the administrative console. If you chose the Automatic reaction mode, actions to improve the health of your environment occur automatically.
For supervised reaction mode runtime tasks, you can set the Java virtual machine (JVM)
com.ibm.ws.xd.hmm.controller.ControlConfig.approvalTimeOutMinutes custom property,
which specifies the number of minutes that can pass before a runtime task for the health controller
expires. If you set the value to 5 minutes or less, the default value of 30 minutes is automatically
used instead. If you do not take any actions on the runtime task, the task expires in the number of
minutes that is specified in this property. If the runtime task expires when the health condition
still exists, a new runtime task is generated.
If you configure your health policies often, consider using AdminTask commands to automate the process.