GCP Console Idle Resource Flagger
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
GCP Console Idle Resource Flagger scans your Google Cloud Console pages to identify idle or underutilized resources that are wasting money. It extracts resource creation dates, last activity timestamps, and CPU usage metrics where available, then flags resources based on configurable age thresholds (e.g., VMs older than 30 days with low CPU, unused disk volumes, inactive Cloud Run services). Resources are color-coded: yellow for warning (approaching threshold), red for critical (exceeds threshold). A panel summary shows total idle resources, potential cost savings, and a list of flagged resources with actionable recommendations like "stop VM," "delete unused disk," or "scale down service." This helps you reduce cloud spend, clean up unused resources, and optimize your GCP infrastructure.
WHERE IT RUNS
This script runs on GCP Console pages (*.console.cloud.google.com/*) including Compute Engine, Cloud Storage, Cloud Run, Kubernetes, SQL, and BigQuery. It operates entirely within your browser tab, reading the page's DOM to locate resource rows, extract dates and metrics, and apply highlighting. The script cannot access other tabs, your browsing history, bookmarks, downloads, or any data outside the current page. All settings—including age thresholds, idle CPU threshold, savings visibility, highlight colors, auto-analyze preference, and recommendation inclusion—are stored locally using GM_setValue and never transmitted anywhere.
HOW TO USE
After installing with the BotGentz extension, the script automatically scans GCP Console pages you view (if auto-analyze is enabled). The panel shows a summary of idle resources found, total resources scanned, and potential monthly cost savings. Each idle resource is highlighted with a yellow or red border and background, with a badge indicating "Warning" or "IDLE." Flagged resources are listed with their age, status, and a specific recommendation. Click "Scan Resources" to manually trigger a scan. Adjust the age warning threshold (default 30 days) and critical threshold (default 90 days). Set the idle CPU threshold (default 10%) to identify VMs with low utilization. Toggle potential savings visibility and recommendation inclusion. Copy the idle resource report to your clipboard.
THE REAL MECHANISM
The script detects GCP resource rows using multiple selectors (.instance-row, .resource-row, .vm-row, .storage-row, .table-row) to handle different service pages. For each resource, it extracts the name, creation date from .created, .creation-date, or [data-testid="created"], last activity from .last-activity or .updated, status from .status or .state, and CPU usage from .cpu-usage or .utilization. Dates are parsed using a flexible parser that handles ISO and human-readable formats. The analysis compares resource age against warning and critical thresholds, and CPU usage against the idle threshold. Resources that are stopped/terminated are automatically flagged as idle. The potential savings estimate is a simple model: $10/month per idle resource, with an extra $5 for critical resources. Highlighting applies a left border color and background tint to each flagged resource, and adds a badge with the idle status. Recommendations are generated based on the resource type and idle level. All DOM manipulation uses safe methods with no innerHTML from untrusted content.
THE PANEL
The Idle Flagger panel is a BGPanel component that you can drag anywhere on your screen by its header. It snaps to the nearest edge when released, keeping your workspace organized. The panel collapses to a small bubble showing only the emoji icon when minimised—click to expand it again. You can resize the panel horizontally to see more of the summary and flagged resources list. Press the Escape key to collapse the panel instantly. Your panel position and size are saved per-site.
PLEASE NOTE
This script requires the free BotGentz browser extension to function. GCP frequently updates its console UI, which may change class names, data-testid attributes, and DOM structure—the script may require updates to maintain compatibility. The CPU usage extraction relies on the presence of usage metrics in the page; if the column is not displayed, the script may not detect low CPU usage. The potential savings is a rough estimate and does not account for actual pricing, discounts, or committed use contracts. Recommendations are generic and should be reviewed before taking action. The script never reads or writes password fields, hidden inputs, or file inputs. It stores only your age thresholds, idle CPU threshold, savings visibility, highlight colors, auto-analyze preference, and recommendation inclusion preference locally. No GCP data, resource information, or personal information is ever collected, transmitted, or shared.