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:

  1. Access the Oracle Cloud Infrastructure console.
  2. From the navigation menu, select Observability & Management. Under Monitoring, click Alarm Definitions.
  3. Click Create Alarm.
  4. Under Define alarm, enter an Alarm name and select the Alarm severity.
  5. Under Metric description, select the Compartment where the Application Performance Monitoring domain is located, select oracle_apm_monitoring Metric namespace, and then for Metric name, select a WebLogic metric.

    For monitoring concepts, metric namespaces, and the default Application Performance Monitoring metrics, see Monitoring Concepts and Application Performance Monitoring Metrics in Oracle Cloud Infrastructure documentation.

  6. Under Metric dimensions, do the following:
    1. For Dimension name, select AppserverClusterName and for Dimension value, select the WebLogic cluster created by the stack.
    2. Select Aggregate metric streams to return the combined value of all metric streams for the selected statistic.
  7. Under Trigger rule, specify the Operator, Value, and Trigger delay minutes.

    The default value for Trigger delay minutes of the alarm definition is five minutes, which is the number of minutes that the condition is maintained before the alarm state changes from "Ok" to "Firing". You can specify the number of minutes that the condition must be maintained before the alarm is in firing state.

  8. Under Destinations, select the following:
    • For Destination service, select Notification Service.
    • For Compartment, select your stack compartment.
    • For Topic, select the notification topic for scale out or scale in.
  9. Click Save alarm. The new alarm is listed on the Alarm Definitions page.

    See Create Alarms in the Oracle Cloud Infrastructure documentation.

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:

  1. Access the Oracle Cloud Infrastructure console.
  2. From the navigation menu, select Observability & Management. Under Monitoring, click Alarm Definitions.
  3. Click the name of the alarm definition.
  4. Click Actions, and click Edit alarm.
  5. Under Define alarm, Metric description, and Metric dimensions, update the alarm settings as needed.
  6. Under Trigger rule, update the default settings for Value and Trigger delay minutes.

    Note:

    The default value for Trigger delay minutes of the alarm definition is five minutes, which is the number of minutes that the condition is maintained before the alarm state changes from "Ok" to "Firing". You can specify the number of minutes that the condition must be maintained before the alarm is in firing state.
  7. Under Notifications, update the default settings for Notification frequency.

    Note:

    You can enter the Notification frequency only if Repeat notification? is selected. The default period of time to wait before resending the notification is 20 minutes for scale out and 30 minutes for scale in.

    See Update Alarm in the Oracle Cloud Infrastructure documentation.

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.

To know the function application that are created during autoscaling, see Autoscaling.
To configure the parameters of the function application:
  1. Access the Oracle Cloud Infrastructure console.
  2. From the navigation menu, select Developer Services. Under Functions, click Applications.
  3. Select the Compartment that contains your stack.
  4. Click the name of the application.
  5. Under Resources, click Configuration.
  6. 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.

At the function-level, you can add a parameter to update and override any inherited parameter value, the selected function has inherited from the Function Application configuration.
To override the parameter values of the function application:
  1. Under Resources, click Functions.
  2. Click the name of the function.
  3. Under Resources, click Configuration.
  4. 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:

  1. Access the Oracle Cloud Infrastructure console.
  2. From the navigation menu, select Developer Services. Under Resource Manager, click Stacks.
  3. Select the Compartment that contains your stack.
  4. Click the name of your stack.
  5. 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.