Manage Autoscaling Resources
If you created an Oracle WebLogic Server for OCI with autoscaling enabled, you can create and update the Alarm Definition, configure the parameters of the scaling functions, and reenable autoscaling for a stack.
If you have not enabled autoscaling for your WebLogic instance, see Configure Autoscaling.
Create Alarm Definitions
Alarms are used to push messages to configured destinations. You can create custom alarms to receive notifications for WebLogic domain metrics, in addition to the Scale Out Alarm Definition and Scale In Alarm Definition that are created when autoscaling is enabled during provisioning.
For more information on alarm definitions, see Autoscaling.
To create the alarm definitions:
Update Alarm Definitions
You can update alarm definitions if you want to change the number of alarm definitions and the settings such as threshold value and alarm metrics that are configured when autoscaling is enabled during provisioning.
To update the alarm definitions:
Configure Function Application
In autoscaling, you can use functions to invoke the Resource Manager APIs to scale the WebLogic Server domain in Oracle WebLogic Server for OCI. If you want to edit the Function Application configuration that is set when autoscaling is enabled during provisioning, you can configure the parameters of the Function Application.
- Access the Oracle Cloud Infrastructure console.
- From the navigation menu, select Developer Services. Under Functions, click Applications.
- Select the Compartment that contains your stack.
- Click the name of the application.
- Under Resources, click Configuration.
- Update the following parameters:
- offline_ms1_from_lb -
Set this parameter to true, if you want the managed server
coresiding on the backend of the administration node to be set
offline temporarily. This setting is required when the threshold
condition for metric is breached and when the administration server
is unable to configure the node on the cluster as the WebLogic
Server domain is overloaded.
After the managed server is set to offline, the managed server is suspended (server changes from "Running" state to "Admin" state), and it only accepts administrative requests. As a result, the administration server has CPU time to activate the domain configuration on the new node as no traffic (requests) is sent to managed server during scale out. After stack apply job is complete, the managed server backend is set to online (server changes from "Admin" to "Running" state).
Note:
By default, offline_ms1_from_lb is set to false. - debug - Set this parameter to true to enable debug logging for functions.
- min_wls_node_count -
Provide the minimum WebLogic node count for scale in so that the
scaling happens up to the min_wls_node_count value.
By default, min_wls_node_count is set to the number of WebLogic nodes specified during initial stack provisioning. For example, if you selected two nodes during initial stack provisioning, the min_wls_node_count is set to two.
You must not edit the parameters, stack_ocid and wlsc_email_notification_topic_id.
- offline_ms1_from_lb -
Set this parameter to true, if you want the managed server
coresiding on the backend of the administration node to be set
offline temporarily. This setting is required when the threshold
condition for metric is breached and when the administration server
is unable to configure the node on the cluster as the WebLogic
Server domain is overloaded.
- Under Resources, click Functions.
- Click the name of the function.
- Under Resources, click Configuration.
- If you want to disable autoscaling, set the use_autoscaling parameter to None.
Reenable Autoscaling for a Stack
If the scale in or scale out fails, you receive an email notification with the job status and information about the tag disabled_for_autoscaling:true enabled for the stack.
You can check the Scale Apply job logs in the Oracle Cloud Infrastructure console and the Function logs to identify the cause of the failure. After you fix the issue, reenable autoscaling by setting the tag disabled_for_autoscaling to false or removing the tag from the stack.
To reenable autoscaling for the stack:
- Access the Oracle Cloud Infrastructure console.
- From the navigation menu, select Developer Services. Under Resource Manager, click Stacks.
- Select the Compartment that contains your stack.
- Click the name of your stack.
- Click the Tags tab and do one of the following:
- Set disabled_for_autoscaling to false.
- Click Remove Tag to remove the tag from the stack.