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