liveBook · Manning

Prometheus agent mode

As explained in Cloud Observability in Action

Prometheus agent mode is a Prometheus configuration optimized for scraping metrics and remotely reading and writing them for federation.

Prometheus agent mode uses the standard Prometheus binary with a configuration optimized for scraping metrics and remotely reading and writing them for federation. It is a collection-and-forwarding role rather than the full default server role. section 4.2.1

Agent mode changes Prometheus’s operational surface:

  • It deactivates the user interface, alerting, and local storage. section 4.2.2
  • It still depends on scrape configuration to define targets and service discovery; recording and alerting rules are optional scrape-configuration features where applicable. section 4.2.1
  • It uses the same Prometheus binary as server mode, with behavior selected through configuration. section 4.2.1
global:
  scrape_interval: 30s                 #1
 
scrape_configs:
  - job_name: "prom"                   #2
    static_configs:
      - targets: ["localhost:9090"]    #3

A minimal self-scrape configuration illustrates the continuing importance of scrape intervals, job definitions, and targets in Prometheus deployments. section 4.2.1

How Cloud Observability in Action covers it

How deep it goes
Defines the mode and disabled functions, but does not detail configuration flags or remote-storage behavior.
Examples
Uses a self-scraping configuration with a 30-second interval and localhost:9090 target.
What it assumes
Assumes familiarity with Prometheus targets and service discovery, while teaching that both modes use the same binary.
What you can do after
Operate/configure Prometheus for scraping and federation while recognizing that UI, alerting, and local storage are unavailable.
How it connects
Connects scrape configurations with service discovery, remote read–write, federation, and OpenTelemetry compatibility.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Cloud Observability in Action. The section links point to the parts of the book it draws on.