Skip to main content

โญ Repository โ†’ ๐Ÿ“ Compliance Engine โ†’ ๐Ÿ“ CloudAware โ†’ ๐Ÿ“ Google โ†’ ๐Ÿ“ GCE

๐Ÿ›ก๏ธ Google GCE Instance is idle๐ŸŸข

  • Contextual name: ๐Ÿ›ก๏ธ Instance is idle๐ŸŸข
  • ID: /ce/ca/google/compute-engine/instance-idle
  • Tags:
  • Policy Type: COMPLIANCE_POLICY
  • Policy Categories: PERFORMANCE, COST

Logicโ€‹

Descriptionโ€‹

Open File

Descriptionโ€‹

This policy identifies Google Compute Engine (GCE) instances that appear to be idle. An instance is considered idle if it consistently meets the following low-utilization criteria over a 14-day period:

  • Average CPU utilization below 5%
  • Maximum CPU utilization below 15%
  • Average network I/O less than 100 MB

Rationalโ€‹

Idle instances generate costs without delivering business value. By identifying and addressing these instances, organizations can reduce unnecessary GCP spending and improve overall resource efficiency.

Impactโ€‹

Before terminating an instance, verify that it is not required for periodic tasks, disaster recovery, or other non-continuous workloads.

Auditโ€‹

This policy evaluates an Google GCE Instance based on its 14-day performance metrics.

The Instance is marked as INCOMPLIANT if all the following criteria are met:

  • CPU Utilization, Average, % field is less than 5%.
  • CPU Utilization, Max, % field is less than 15%.
  • Network In, Sum, Megabytes field is less than 100 MB.
  • Network Out, Sum, Megabytes field is less than 100 MB.

... see more

Remediationโ€‹

Open File

Remediationโ€‹

Before taking action, verify whether the instance is still required. Idle instances may serve non-critical purposes such as development, testing, or periodic workloads.

Stop the Instanceโ€‹

Stop the instance if it is temporarily not needed but may be required later. This halts billing for compute resources, although storage charges for attached persistent disks will continue.

gcloud compute instances stop {{instance-name}} --zone={{zone}}

Rightsize the Instanceโ€‹

If the instance is oversized for its workload, resize it to a smaller, more cost-effective machine type.

  1. Stop the instance.

  2. Change the machine type:

gcloud compute instances set-machine-type {{instance-name}} \
--zone={{zone}} \
--machine-type={{new-machine-type}}
  1. Restart the instance:
gcloud compute instances start {{instance-name}} --zone={{zone}}

Delete the Instanceโ€‹

If the instance is no longer required, delete it to eliminate all associated costs. This action is irreversible and will also remove any attached non-boot disks configured for auto-deletion.

... see more

policy.yamlโ€‹

Open File

Linked Framework Sectionsโ€‹

SectionSub SectionsInternal RulesPoliciesFlagsCompliance
๐Ÿ’ผ Cloudaware Framework โ†’ ๐Ÿ’ผ Waste Reduction25no data
๐Ÿ’ผ Cloudaware Framework โ†’ ๐Ÿ’ผ Workload Efficiency24no data