Interview Prep/Monitoring & Observability/Alerting and On-Call Design

How would you monitor a public API from the outside?

BeginnerScenarioAlerting and On-Call Design
Answer

Situation read → Internal metrics cannot see DNS, CDN, certificate or routing failures. External probes can.

What I'd do →

  1. Deploy blackbox_exporter in at least two locations outside your cluster.
  2. Define a module that checks status, TLS and latency.
  3. Scrape it through a probe:
scrape_configs:
  - job_name: blackbox-http
    metrics_path: /probe
    params: {module: [http_2xx]}
    static_configs: [{targets: ["https://api.example.com/health"]}]
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: blackbox-exporter:9115
  1. Alert on probe_success == 0 for 2 minutes from multiple locations.

Why → The user's view of your service is what you must measure first.

Interview tip → Alert only when more than one probe location fails, to avoid a single bad prober paging you.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Alerting and On-Call Design