scrape
One fetch by Prometheus of a service's metrics page over HTTP, whose values are then stored with a timestamp.
In more detail
The service only publishes the page; it does not know Prometheus exists and does not buffer, retry or push anything. Because Prometheus does the fetching, it knows whether each fetch worked and records that in the up metric. Rendering the page must be cheap: no database calls while building it.
Example
curl -s http://localhost:8001/metrics | grep http_requests_total does by hand exactly what a scrape does.Related terms
- pull model — A way of collecting metrics where the monitoring server fetches them from each service, instead of each service sending (pushing) them.
- scrape target — One address Prometheus fetches metrics from, such as service:8000.
- scrape interval — How often Prometheus fetches each target, such as every 15 seconds.
- up metric — A series Prometheus writes for every target after each scrape: 1 if the fetch worked and 0 if it failed.
- Prometheus exposition format — The plain-text format a metrics page uses: one sample per line with name, optional labels in braces and a value, plus comment lines for help text and type.
- metric — A number measured over time, such as requests per second or error count, that shows how a system behaves in aggregate.
- autoscaling — A cloud feature that automatically adds servers when demand rises and removes them when it falls.
Taught in
- Observability Versus Monitoring — Full-Stack Observability: Metrics, Tracing & Logging
- The Three Signals: Logs, Metrics And Traces — Full-Stack Observability: Metrics, Tracing & Logging
- Metric Types: Counters And Gauges — Full-Stack Observability: Metrics, Tracing & Logging
- Metric Types: Summaries And Histograms — Full-Stack Observability: Metrics, Tracing & Logging
- Cardinality And How It Bankrupts You — Full-Stack Observability: Metrics, Tracing & Logging
- Prometheus Scraping And The Pull Model — Full-Stack Observability: Metrics, Tracing & Logging
- The Prometheus Exposition Format — Full-Stack Observability: Metrics, Tracing & Logging
- Rates And Increases Over Time — Full-Stack Observability: Metrics, Tracing & Logging
- Alerting Rules And The For Duration — Full-Stack Observability: Metrics, Tracing & Logging
- Six Minutes Nobody Saw: Prometheus In One Outage — Prometheus Certified Associate (PCA) Exam Prep
- Forty Seconds At Two: Push, Pull And Service Discovery — Prometheus Certified Associate (PCA) Exam Prep
- Observability Sprint: One Failed Checkout — Prometheus Certified Associate (PCA) Exam Prep
- Where Did Two Hours Go? Prometheus Architecture — Prometheus Certified Associate (PCA) Exam Prep
- A Week Without A Scrape: Configuration And Relabelling — Prometheus Certified Associate (PCA) Exam Prep
- Cart Versus cart: The Data Model And What A Scrape Returns — Prometheus Certified Associate (PCA) Exam Prep
- Off By Five: What Prometheus Is Not For — Prometheus Certified Associate (PCA) Exam Prep
- Fundamentals Sprint: Nine Calls On The Server — Prometheus Certified Associate (PCA) Exam Prep
- The Server That Would Not Die: Selecting Data — Prometheus Certified Associate (PCA) Exam Prep
- Four Thousand Requests Vanished: Rates And Derivatives — Prometheus Certified Associate (PCA) Exam Prep
- Fifteen Requests Nobody Saw: Aggregating Over Time — Prometheus Certified Associate (PCA) Exam Prep
- The Export That Failed Quietly: Timestamp Metrics — Prometheus Certified Associate (PCA) Exam Prep
- PromQL Sprint: Ten Queries At Minute Twenty Two — Prometheus Certified Associate (PCA) Exam Prep
- Thirty Second Checkouts Nobody Saw: Client Libraries — Prometheus Certified Associate (PCA) Exam Prep
- A Database You Cannot Recompile: Exporters — Prometheus Certified Associate (PCA) Exam Prep
- Twelve Green Panels: Dashboarding Basics — Prometheus Certified Associate (PCA) Exam Prep
- Seventy Seven Percent, Book Now? The Full Mock — Prometheus Certified Associate (PCA) Exam Prep
- One Week, Three Objectives: Final Review — Prometheus Certified Associate (PCA) Exam Prep
- Capacity Planning As A Design Input — Scalable System Design & Distributed Architecture