🛡️ 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
Description
This policy identifies Google Compute Engine (GCE) instances that appear to be idle. When a linked New Relic host is available, this policy combines CPU and network metrics with New Relic memory, disk read utilization, and disk write utilization. Otherwise, it falls back to CPU and network metrics only. An instance is considered idle if it consistently meets the applicable low-utilization criteria over a 14-day period:
- Average CPU utilization below 5%
- Maximum CPU utilization below 15%
Additionally, when New Relic data is available:
- Memory utilization below 20% when New Relic data is available
- Disk read utilization below 5% when New Relic data is available
- Disk write utilization below 5% when New Relic data is available
- Average network I/O less than 100 MB
Rationale
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.
... see more
Remediation
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.
Stop the instance.
Change the machine type:
gcloud compute instances set-machine-type {{instance-name}} \
--zone={{zone}} \
--machine-type={{new-machine-type}}Restart the instance:
gcloud compute instances set-machine-type {{instance-name}} \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
Linked Framework Sections
| Section | Sub Sections | Internal Rules | Policies | Flags | Compliance |
|---|---|---|---|---|---|
| 💼 Cloudaware Framework → 💼 Waste Reduction | 25 | no data | |||
| 💼 Cloudaware Framework → 💼 Workload Efficiency | 24 | no data |