--- title: prometheus.scrape() function description: > `prometheus.scrape()` scrapes Prometheus metrics from an HTTP-accessible endpoint and returns them as a stream of tables. menu: flux_v0_ref: name: prometheus.scrape parent: experimental/prometheus identifier: experimental/prometheus/scrape weight: 201 flux/v0/tags: [inputs, prometheus] --- `prometheus.scrape()` scrapes Prometheus metrics from an HTTP-accessible endpoint and returns them as a stream of tables. ##### Function type signature ```js (url: string) => stream[A] where A: Record ``` {{% caption %}} For more information, see [Function type signatures](/flux/v0/function-type-signatures/). {{% /caption %}} ## Parameters ### url ({{< req >}}) URL to scrape Prometheus metrics from. ## Examples ### Scrape InfluxDB OSS internal metrics ```js import "experimental/prometheus" prometheus.scrape(url: "http://localhost:8086/metrics") ```