+

Search Tips   |   Advanced Search

Intelligent Management: health controller commands with the AdminConfig object

We can use the AdminConfig object to modify the health controller settings. We can change the controller cycle, prohibit server restarts at certain times of the day, and so on.


Purpose

Health management comes equipped with smart defaults that accommodate most environments. However, if you discover that the health controller is not working the way we want, then tune the default parameters. We can change these settings in the console or with wsadmin.sh.


Usage

To change configuration settings for the health controller, you must have configurator or administrator privileges. If we have operator privileges, we can only change the runtime configuration.

To edit the health controller properties, run the following commands:

.\wsadmin.sh -lang jython
hcid = AdminConfig.getid("/HealthController:/")
AdminConfig.modify(hcid, [["attribute_name", value]])
AdminConfig.save()


Attributes

We can edit the following attributes:

controlCycleLength

Time between consecutive health checks to determine if a health policy condition is breached.

Default: 5

enable

Specifies if health monitoring is enabled.

Default: true

maxConsecutiveRestarts

Number of attempts to revive a server after a restart decision is made. If this number is exceeded, a failed operation is assumed and restarts are disabled for the server.

Valid values: whole numbers between 1 and 5

Default: 3

minRestartInterval

Controls the minimum amount of time that must pass between consecutive restarts of an server instance.

Valid values: The value can range from 15 minutes to 365 days, inclusive. Indicate the units with the minRestartIntervalUnits attribute. A value of 0 disables the minimum restart value.

Default: 0 (disabled)

minRestartIntervalUnits

Indicates the units to use with the minRestartInterval attribute

Valid values: 2 (minutes), 3 (hours), or 4 (days)

Default: 2

prohibitedRestartTimes

Times and days of the week during which a restart of an application server instance is prohibited. We cannot change this attribute with the AdminConfig object. To update the prohibited restart times in the console, click Operational policies > Autonomic managers > Health controller. Edit the Prohibited restart times field.

properties

Specifies a custom property on the health controller.

restartTimeout

Number of minutes to wait for a server to stop before explicitly checking its state and attempting another start.

Valid values 1 to 60 minutes, specified as a whole number

Default: 5


Example

The following command example changes the restart timeout setting:
hcid = AdminConfig.getid("/HealthController:/")
AdminConfig.modify(hcid, [["restartTimeout", 6]])
AdminConfig.save()
The following command sets the number of minutes for the approval timeout of runtime tasks for the health controller by specifying the com.ibm.ws.xd.hmm.controller.ControlConfig.approvalTimeOutMinutes JVM custom property. In this example specifically, the value of the approval timeout is set to 40 minutes:
.\wsadmin.sh -lang jython
hcid = AdminConfig.getid("/HealthController:/")
AdminConfig.create('Property', hcid, [['name', 'com.ibm.ws.xd.hmm.controller.ControlConfig.
 approvalTimeOutMinutes'], ]['value', '40']]) AdminConfig.save()


Related concepts

  • Health management


    Related tasks

  • Monitor and tune health management
  • Configure health management

  • HmmControllerProcs.jacl script


    Related information:

  • Intelligent Management: health controller custom properties