You can use the AdminConfig object to modify the health controller settings. You can change the controller cycle, prohibit server restarts at certain times of the day, and so on.
.\wsadmin.sh -lang jython 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()
.\wsadmin.sh -lang jython hcid = AdminConfig.getid("/HealthController:/") AdminConfig.modify(hcid, [["attribute_name", value]]) AdminConfig.save()
Default: 5
Default: true
Valid values: whole numbers between 1 and 5
Default: 3
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)
Valid values: 2 (minutes), 3 (hours), or 4 (days)
Default: 2
Valid values 1 to 60 minutes, specified as a whole number
Default: 5
hcid = AdminConfig.getid("/HealthController:/") AdminConfig.modify(hcid, [["restartTimeout", 6]]) AdminConfig.save()The following command sets the com.ibm.ws.xd.hmm.controller.approvalTimeOutMinutes custom property to 40 minutes:
.\wsadmin.sh -lang jython hcid = AdminConfig.getid("/HealthController:/") AdminConfig.create('Property', hcid, [['name', 'com.ibm.ws.xd.hmm.controller.approvalTimeOutMinutes'], ['value', '40']]) AdminConfig.save()