prometheus.scrape() 函数
prometheus.scrape() 是实验性的,随时可能会更改。
prometheus.scrape() 从可通过HTTP访问的端点抓取Prometheus指标,并将它们作为表的流返回。
函数类型签名
(url: string) => stream[A] where A: Record
有关更多信息,请参见 Function type signatures。
参数
网址
(必填) 用于从Prometheus抓取指标的URL。
示例
抓取 InfluxDB OSS 内部指标
import "experimental/prometheus"
prometheus.scrape(url: "http://localhost:8086/metrics")