Announcing new idle VM recommendation configuration option in Google Cloud

Announcing new idle VM recommendation configuration option in Google Cloud

Active Assist’s Idle VM recommendations can help you save money and resources by identifying and deleting idle VMs. Today, we’re excited to announce a new configuration option for idle Virtual Machine recommendations, giving you more control over how idle VMs are identified and recommended for deletion.

idle VM recommendation configuration.gif

Google Cloud generates idle VM recommendations automatically based on system metrics gathered by the Cloud Monitoring service. Previously, the observation period for idle VM recommendations was fixed at 14 days. As such, no matter what kind of resources you monitored (development, test or production), you always got recommendations based on a two-week timeframe. That was a good approach for most workloads, but we heard from customers that they would like to adjust their configurations for different projects. 

With the new configuration option, you can now specify a different observation period, ranging from 1 day to 14 days. This gives you more flexibility to tune idle VM recommendations to meet your specific needs. For example, you can now

  • Use a shorter observation period if you want to be less conservative and potentially save more costs 

  • Use a longer observation period if you want to receive recommendations that are not affected by short-term fluctuations in your workload.

To configure the observation period for idle VM recommendations, you can use the observation_period parameter in theIdle Resource Recommendation API

HTTP method and URL example:

code_block
[StructValue([(u’code’, u’GET https://recommender.googleapis.com/v1/projects/your-project-number/locations/your-location/recommenders/google.compute.instance.IdleResourceRecommender/config’), (u’language’, u”), (u’caption’, <wagtail.wagtailcore.rich_text.RichText object at 0x3e3c95cb8c50>)])]

The command returns the recommender configuration, including the subfield that you can modify: params.observation_period:

code_block
[StructValue([(u’code’, u'{rn “name”: “projects/project-number/locations/location/recommenders/google.compute.instance.IdleResourceRecommender/config”,rn “recommenderGenerationConfig”: {rn “params”: {rn “observation_period”: “1209600s”,rn }rn },rn “etag”: “”2f3c9b65cda6a4ba””,rn “updateTime”: “2020-11-03T04:41:15.330351Z”rn}’), (u’language’, u”), (u’caption’, <wagtail.wagtailcore.rich_text.RichText object at 0x3e3c95cb8bd0>)])]

You can also use thegcloud recommender recommender-config update command.

For example, to set the observation period to 7 days (604800s), provide a configuration file with this value using the following command:

code_block
[StructValue([(u’code’, u’gcloud recommender recommender-config update google.compute.instance.IdleResourceRecommender rn–project=your_project_number –location=your_zone rn–etag=current_etag –config-file=config.json’), (u’language’, u”), (u’caption’, <wagtail.wagtailcore.rich_text.RichText object at 0x3e3c95cb8610>)])]

For more information about idle VM recommendations, see the public documentation. We look forward to making your recommendations more personalized and customizable to fit your needs. Please feel free to reach us at [email protected].