Compute Instances that were provisioned for a past initiative may remain active, incurring cost even when utilization metrics indicate they are not in use. Identifying these and automatically terminating them can generate significant cost savings.
Configure the Idle Compute Instance Termination Policy
To configure the Idle Compute Instance Termination Policy:
From the Policies screen, select the appropriate policy and click Apply.
Select the options to configure the policy.
Define the Scope of Idle Compute Instances to Include
To define the scope of the Idle Compute Instances to include:
Determine which resources to evaluate for the Idle Compute Instances Policy.
To define scope using Select Accounts: Specify the list of accounts to evaluate. For example, you may wish to limit the termination to non-production accounts or to any subset of accounts.
To define scope using Tag filtering: Limit the scope within the selected accounts by specifying tags for items to exclude. For example, if your production and non-production resources are mixed in your cloud accounts, you can leverage this tag-based filtering functionality to limit the action based on an environment tag.
Define the Idle Compute Instance Threshold for Termination
Having defined a scope, you will need to set percent utilization thresholds to allow for termination. You can assess both memory and CPU metrics to determine suitability.
Define the Idle Compute Instance Termination Actions to Take
To define the Idle Compute Instance Termination actions to take:
Perform the following action.
Configure users to be notified: Specify the list of recipients who should receive notifications about termination. Add as many recipients as you like to the Email addresses of the recipients you wish to notify field. They do not need to be registered as Optima users.
Configure the General Idle Compute Instance Termination Policy Options
To configure the general Idle Compute Instance Termination Policy options:
Set the following standard policy configuration options when the Idle Compute Instance Termination Policy is applied.
Frequency for policy to run: Specify the frequency the policy will perform the checks, such as weekly, daily, hourly, or every 15 minutes.
Fully automated vs approval required: Specify at the time it is applied whether the policy will take action after user approval versus automatically without user intervention. For details, see the Skip Action Approvals documentation.
Customize the Idle Compute Instance Termination Policy
To customize the Idle Compute Instance Termination Policy:
Policy designers can customize the Idle Compute Instance Termination Policy definition in several ways.
Change the observation period. By default, this policy calculates utilization over a 30-day period. To calculate over a different period of time, you can update the policy template.
Change the script to draw monitoring data for rightsizing from different monitoring tools. Samples are provided for tools including Cloudwatch (AWS), Stackdriver (GCE), LogAnalytics (Azure), and Datadog in the public GitHub repository.
Review Actions Taken by the Idle Compute Instance Termination Policy
These actions may occur with approval or fully automated depending on whether the policy manager has selected the Skip approval option.
Any instances that meets the conditions specified will be Terminated.