Interview Prep/Monitoring & Observability/Prometheus and PromQL at Scale

Workloads in private VPCs cannot be scraped from your central Prometheus. What architecture do you use?

AdvancedScenarioPrometheus and PromQL at Scale
Answer

Situation read → Pull from a central location is blocked by network boundaries. Move collection to the edge and push outward.

What I'd do →

  1. Run a lightweight local collector per VPC or cluster: Prometheus in agent mode (--enable-feature=agent, or --agent in Prometheus 3.x), Grafana Alloy, or the OpenTelemetry Collector.
  2. It scrapes locally and remote_writes to a central Mimir/Thanos Receive/VictoriaMetrics over outbound HTTPS only.
  3. Authenticate with per-tenant tokens or mTLS, and add external_labels (cluster, region).
  4. Size the WAL and queue so a network outage of a few hours does not drop data (queue_config.capacity, max_shards).
  5. Alert on prometheus_remote_storage_samples_failed_total.

Why → Outbound-only egress satisfies strict firewall policies and the agent keeps local state minimal.

Interview tip → Agent mode has no local querying or alerting, so keep rule evaluation central (Mimir ruler).

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Prometheus and PromQL at Scale