Skip to content

Operations and Cost Control

github-actions[bot] edited this page Jul 28, 2026 · 3 revisions

English | 简体中文

Operations and Cost Control

Probes and snapshots

  • /healthz reports only process liveness.
  • /ready requires every enabled Cost Explorer collector on every required target to have a fresh successful snapshot.
  • Optional targets and Organizations, Budgets, commitments, anomalies, tags, and CUR do not gate readiness.
  • /metrics serves the current immutable snapshot and never calls AWS or Athena.

A failed refresh records status and retains the last successful snapshot. Use collector_up, last-success timestamps, and cache age together; an old value can still be exposed after a failure.

Scheduling and failure isolation

Collectors have independent intervals, single-flight state, bounded failure backoff, and CollectorID. One target runs its collectors serially so it cannot occupy every global slot. The process-wide semaphore enforces collection.max_concurrency.

Context cancellation stops limiter waits, AWS requests, Athena polling, SDK retries, backoff timers, and workers. Investigate aws_cost_exporter_scheduler_shutdown_timeouts_total when shutdown exceeds server.shutdown_timeout.

Replica policy

Keep Helm replicaCount: 1. v0.3.0 has no leader election, shared cache, or refresh ownership. Multiple replicas duplicate paid requests and appear as duplicate Prometheus scrape targets.

Cost Explorer cost

AWS currently charges approximately USD 0.01 per billable Cost Explorer request. Pagination and SDK retry attempts can increase cost. Monitor logical requests, retries, and successfully read pages, but treat AWS billing as authoritative.

Before increasing RPS or page limits:

  1. Add target filters.
  2. Disable unused collectors or bases.
  3. Increase refresh intervals.
  4. Reduce Tag keys and value budgets.
  5. Inspect throttling and pagination alerts.

Athena cost

Athena charges by scanned bytes. Use CUR partitions, a dedicated workgroup, scan limits, a narrow result prefix, and the default 24-hour interval. Totals and Tag collection are separate queries, but each fixed query references the CUR table once. Prometheus scrape frequency does not affect Athena query frequency.

Freshness

Cost Explorer and CUR update on different schedules. cache.freshness_ttl controls expected freshness and cache.stale_after controls readiness staleness. Never hide provider differences by summing them.

Clone this wiki locally