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
