Skip to content

Cost Monitoring Dashboards & FinOps Patterns

Dashboard là single pane of glass cho cost visibility. Không chỉ là metrics visualization, dashboard phải tell story — tại sao cost tăng, ở đâu, cách nào để optimize.


FinOps Hub: GCP's Native Cost Dashboard

What is FinOps Hub?

FinOps Hub là managed cost dashboard từ GCP, automatically aggregates:

  • Billing data (Cloud Billing API)
  • Optimization recommendations (Recommender API)
  • Utilization metrics (Cloud Monitoring)
  • Commitment utilization rates (CUD API)

Access FinOps Hub

Cloud Console → Cloud Billing → FinOps Hub

Dashboard Components

1. Organizational Cost Summary

This Month Spend:    $45,234
Forecasted Spend:    $48,567
Budget Percentage:   92%
Previous Month:      $42,100

Trend:               +7.4% MoM
YTD Spend:           $245,000

2. Top Cost Drivers

Service            | Cost    | % of Total
Compute Engine     | $27,000 | 60%
Cloud Storage      | $10,800 | 24%
Cloud Networking   | $5,400  | 12%
Other              | $2,034  | 4%

3. Cost Optimization Opportunities

Recommendation Type          | Count | Est. Monthly Savings
Stop idle VMs               | 12    | $2,400
Resize overprovisioned      | 8     | $1,600
Purchase CUDs               | 5     | $3,500
Change storage class        | 15    | $800
Total                       |       | $8,300/month

4. Commitment Utilization

CUD Type            | Commitment | Utilized | Rate
1-year vCPU (N2)    | 500 vCPU   | 485 vCPU | 97%
3-year Memory (M2)  | 2 TB       | 1.8 TB   | 90%
Flexible Spend      | $10k/mo    | $9.5k    | 95%

5. FinOps Score

Overall Score: 72/100

Category Scores:
  - Cost monitoring: 90/100
  - Resource labeling: 65/100
  - CUD purchase rate: 80/100
  - Budget setup: 75/100
  - Waste removal: 55/100

Custom Dashboards: Building Specific Insights

Dashboard 1: Executive Summary

Target Audience: CFO, Finance

Key Metrics:
  - Monthly spend: $45,234
  - MoM growth: +7.4%
  - Forecasted annual: $580,000
  - Cost per revenue ($): $0.08 (KPI tracking)

Charts:
  - 12-month trend (line graph)
  - Cost by service (pie chart)
  - Budget vs actual (bar chart)

Dashboard 2: Engineering Team Accountability

Target Audience: Engineering Lead, Team Leads

Key Metrics Per Team:
  - Team A spend: $12,000 (26% of total)
  - Team B spend: $9,000 (20% of total)
  - Platform spend: $18,000 (40% of total)
  - Shared spend: $6,234 (14% of total)

Metrics:
  - Cost per pod (GKE)
  - Cost per pipeline run (CI/CD)
  - Egress cost by destination
  - Storage cost by bucket

Alert Thresholds:

  • Team spend +20% MoM → alert
  • Cost per service +30% → investigate
  • Idle resource detected → notify team

Dashboard 3: Optimization Tracking

Target Audience: DevOps / Cloud Platform Team

Metrics:
  - CUD utilization rate: 94%
  - Reserved instances: 47 (of 100 planned)
  - Idle resources: 8 VMs, 12 disks
  - Wasted storage (Standard > 180 days old): 2.3 TB
  - Overly-resourced workloads: 15 pods

Actions Taken This Month:
  - VMs rightsized: 8
  - VMs deleted (idle): 5
  - Storage lifecycle applied: 12 buckets
  - Savings realized: $5,400

Implementation: Building with Cloud Monitoring

Setup Cloud Monitoring Dashboard

python
from google.cloud import monitoring_v3

def create_cost_dashboard():
    client = monitoring_v3.DashboardsServiceClient()
    
    dashboard = {
        "display_name": "Cost Optimization Dashboard",
        "mosaicLayout": {
            "columns": 12,
            "tiles": [
                {
                    "width": 6,
                    "height": 4,
                    "widget": {
                        "title": "Monthly Spend Trend",
                        "xyChart": {
                            "dataSets": [{
                                "timeSeriesQuery": {
                                    "timeSeriesFilter": {
                                        "filter": 'resource.type="billing_account"'
                                }
                            }]
                        }
                    }
                },
                # ... more widgets
            ]
        }
    }
    
    response = client.create_dashboard(
        name="projects/PROJECT_ID",
        dashboard=dashboard
    )

Alternatively, Use BigQuery + Looker/DataStudio

sql
-- Create view for Looker/DataStudio integration
CREATE OR REPLACE VIEW `project.reports.cost_summary` AS
SELECT
  DATE_TRUNC(usage_start_time, DAY) as date,
  DATE_TRUNC(usage_start_time, MONTH) as month,
  service.description as service,
  (SELECT value FROM UNNEST(labels) WHERE key = 'team') as team,
  project.name,
  SUM(cost) as daily_cost,
  SUM(usage.amount) as usage_amount
FROM `project.billing_dataset.gcp_billing_export_v1`
GROUP BY date, month, service, team, project.name;

Then connect Looker/DataStudio to this view for visualization.


Key Metrics & Alerting

Metric 1: Daily Cost Trend

Target: Flat or predictable trend
Alert: If daily cost > baseline + 2σ for 2 consecutive days
Action: Investigate root cause (new workload? leak?)

Metric 2: CUD Utilization

Target: 90%+ utilization
Alert: If utilization < 80%
Action: Review commitment, consider reducing for next renewal

Metric 3: Storage Waste

Target: < 5% of storage in Standard class older than 90 days
Alert: If > 10%
Action: Apply lifecycle policy

Metric 4: Idle Resources

Target: < 5 idle VMs total
Alert: If idle resource count > 10
Action: Monthly cleanup cycle

Metric 5: Cost per Business Metric

Example (for SaaS):
  Cost per user: $1.20 (target: $1.00)
  Cost per query: $0.0005 (target: $0.0003)
  
Alert: If cost efficiency > 20% worse than baseline
Action: Optimization review

Dashboard Design Principles

Principle 1: Context Matters

Bad: Show "Compute Engine cost = $27,000"
Good: Show "Compute Engine cost = $27,000 (up 15% from last month, 60% of total)"

Principle 2: Actionability

Bad: Dashboard shows metrics, reader doesn't know what to do
Good: Dashboard highlights: "8 VMs idle — estimated $2,400/month savings"
      + link to Recommender API recommendation

Principle 3: Appropriate Granularity

Executive dashboard:  Monthly, by service, no technical details
Team dashboard:       Daily, by project, cost per resource
Ops dashboard:        Hourly, by instance, utilization metrics

Principle 4: Alert on Deviations, Not Absolutes

Bad: Alert if cost > $50k (arbitrary threshold)
Good: Alert if cost > baseline + 20% (contextual)

Operational Workflows

Daily Standup

Morning ritual (5 min):
  1. Check FinOps Hub → any anomalies?
  2. Review cost trend → on track?
  3. Check recommendations → any new ones?
  4. Share snapshot with team

Example Slack message:
  "Daily spend: $1,523 (on track)
   Forecasted: $48,700 (92% of budget)
   8 idle resources detected"

Weekly Cost Review

Friday 3 PM (30 min):
  1. Review top cost drivers
  2. Check CUD utilization
  3. Review optimization opportunities
  4. Assign actions for next week
  5. Update forecasting model

Action items:
  - [ ] Resize 3 overprovisioned VMs
  - [ ] Apply lifecycle to 5 buckets
  - [ ] Review high-egress traffic

Monthly Cost Analysis

First Monday of month (1h):
  1. Finalize last month's numbers
  2. Review YTD spend vs budget
  3. Analyze cost by team/project
  4. Review optimization results
  5. Plan next month priorities
  
Output: Cost report + optimization recommendations

Common Dashboard Mistakes

Mistake 1: Too Much Data

Problem: Dashboard with 50+ metrics confuses reader.

Fix: Curate dashboard per audience. Executive = 5 metrics, not 50.

Mistake 2: No Drill-Down

Problem: Dashboard shows "Compute Engine = $27k", but can't see which VMs.

Fix: Every metric should link to detail view (BigQuery query, Recommender API).

Mistake 3: Ignoring Attribution

Problem: Dashboard shows total spend, but team doesn't know "how much is mine?"

Fix: Add labels/tags for team, application, cost center. Drill-down by dimension.

Mistake 4: Stale Data

Problem: Dashboard refreshes monthly (too delayed).

Fix: Daily refresh for recent data (understand lag). Real-time optional for critical metrics.


FinOps Maturity Progression

Level 1 - Awareness
  ├─ Basic billing dashboard
  ├─ Manual weekly cost review
  └─ No automation

Level 2 - Managed
  ├─ Automated cost reporting
  ├─ Budget alerts + notifications
  ├─ Basic cost attribution (by project)
  └─ Monthly optimization review

Level 3 - Optimized
  ├─ Advanced cost analysis (BigQuery + custom dashboards)
  ├─ Team chargeback model
  ├─ Automated resource cleanup (Recommender API)
  ├─ CUD optimization + regular reviews
  └─ Cost as KPI for engineering teams

Level 4 - Transformed
  ├─ ML-based cost forecasting + anomaly detection
  ├─ Business metrics alignment (cost per user, per transaction)
  ├─ Autonomous resource optimization (auto-resize, auto-delete)
  ├─ Multi-cloud cost integration
  └─ Cost culture embedded in org

References