Edit the health management controller configuration when the health
controller is not working the way that you want. You can change the controller
cycle, prohibit server restarts at certain times of the day, and so on.
Before you begin
To change configuration settings for the health management controller,
you must have configurator or administrator privileges. If you have operator
privileges, you can only change the runtime configuration.
About this task
Health management comes equipped with smart defaults that accommodate
most environments. However, if you discover that your health controller is
not working the way you want, then tune the default parameters. You can change
these settings in the administrative console or with the wsadmin tool.
Procedure
- Create a default health controller.
- Open the wsadmin tool in Jython mode.
.\wsadmin.sh -lang jython
- Run the commands to create a health controller.
cellid = AdminConfig.getid('/Cell:<your_cell_name>/')
attrs = []
AdminConfig.create("HealthController", cellid, attrs)
AdminConfig.save()
To supply custom values for health
controller settings when you create the health controller, use the following
command as an example. This example sets custom values for the control cycle
length and maximum number of consecutive restarts:
cellid = AdminConfig.getid('/Cell:<your_cell_name>/')
attrs = [["maxConsecutiveRestarts", "2"],["controlCyleLength", 7]]
AdminConfig.create("HealthController", cellid, attrs)
AdminConfig.save()
- Edit the health controller settings. The following command
example changes the restart timeout setting:
hcid = AdminConfig.getid("/HealthController:/")
AdminConfig.modify(hcid, [["restartTimeout", 6]])
AdminConfig.save()
You can edit the following attributes on the health
controller:
Table 1. Health controller attributes
Attribute name |
Default value |
controlCycleLength |
5 |
enable |
true |
maxConsecutiveRestarts |
3 |
minRestartInterval |
0 |
minRestartIntervalUnits |
2 |
prohibitedRestartTimes |
|
properties |
|
restartTimeout |
5 |