Merge pull request #515 from influxdata/flux/prometheus-package
Flux Prometheus packagepull/516/head
commit
af24739894
|
@ -19,7 +19,7 @@ _**Function type:** Transformation_
|
|||
|
||||
{{% warn %}}
|
||||
The `experimental.addDuration()` function is subject to change at any time.
|
||||
By using it, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
By using this function, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
|
||||
This specific function will be removed once duration vectors are implemented.
|
||||
See [influxdata/flux#413](https://github.com/influxdata/flux/issues/413).
|
||||
|
|
|
@ -16,8 +16,8 @@ The Flux Bigtable package provides tools for working with data in
|
|||
[Google Cloud Bigtable](https://cloud.google.com/bigtable/) databases.
|
||||
|
||||
{{% warn %}}
|
||||
The Bigtable package is currently experimental and is subject to change at any time.
|
||||
By using it, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
The Bigtable package is currently experimental and subject to change at any time.
|
||||
By using this package, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
{{% /warn %}}
|
||||
|
||||
Import the `experimental/bigtable` package:
|
||||
|
|
|
@ -15,8 +15,8 @@ data source.
|
|||
_**Function type:** Input_
|
||||
|
||||
{{% warn %}}
|
||||
The `bigtable.from()` function is currently experimental and is subject to change at any time.
|
||||
By using it, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
The `bigtable.from()` function is currently experimental and subject to change at any time.
|
||||
By using this function, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
{{% /warn %}}
|
||||
|
||||
```js
|
||||
|
|
|
@ -19,7 +19,7 @@ _**Function type:** Transformation_
|
|||
|
||||
{{% warn %}}
|
||||
The `experimental.group()` function is subject to change at any time.
|
||||
By using it, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
By using this function, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
|
||||
This specific function will be removed once the proposed `extend` mode is sufficiently vetted.
|
||||
{{% /warn %}}
|
||||
|
|
|
@ -15,8 +15,8 @@ v2.0/tags: [functions, mqtt, package]
|
|||
Flux MQTT functions provide tools for working with Message Queuing Telemetry Transport (MQTT) protocol.
|
||||
|
||||
{{% warn %}}
|
||||
The MQTT package is currently experimental and is subject to change at any time.
|
||||
By using it, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
The MQTT package is currently experimental and subject to change at any time.
|
||||
By using this package, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
{{% /warn %}}
|
||||
|
||||
Import the `experimental/mqtt` package:
|
||||
|
|
|
@ -14,8 +14,8 @@ The `mqtt.to()` function outputs data to an MQTT broker using MQTT protocol.
|
|||
_**Function type:** Output_
|
||||
|
||||
{{% warn %}}
|
||||
The `mqtt.to()` function is currently experimental and is subject to change at any time.
|
||||
By using it, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
The `mqtt.to()` function is currently experimental and subject to change at any time.
|
||||
By using this function, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
{{% /warn %}}
|
||||
|
||||
```js
|
||||
|
|
|
@ -15,7 +15,7 @@ _**Function type:** Transformation_
|
|||
|
||||
{{% warn %}}
|
||||
The `experimental.objectKeys()` function is subject to change at any time.
|
||||
By using it, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
By using this function, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
{{% /warn %}}
|
||||
|
||||
```js
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
title: Flux Prometheus package
|
||||
list_title: Prometheus package
|
||||
description: >
|
||||
The Flux Prometheus package provides functions for working with Prometheus-formatted metrics.
|
||||
Import the `experimental/prometheus` package.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: Prometheus
|
||||
parent: Experimental
|
||||
weight: 201
|
||||
v2.0/tags: [functions, prometheus, package]
|
||||
---
|
||||
|
||||
Flux Prometheus functions provide tools for working with
|
||||
[Prometheus-formatted metrics](https://prometheus.io/docs/instrumenting/exposition_formats/).
|
||||
|
||||
{{% warn %}}
|
||||
The Prometheus package is currently experimental and subject to change at any time.
|
||||
By using this package, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
{{% /warn %}}
|
||||
|
||||
Import the `experimental/prometheus` package:
|
||||
|
||||
```js
|
||||
import "experimental/prometheus"
|
||||
```
|
||||
|
||||
{{< children type="functions" show="pages" >}}
|
|
@ -0,0 +1,52 @@
|
|||
---
|
||||
title: prometheus.scrape() function
|
||||
description: >
|
||||
The `prometheus.scrape()` function retrieves Prometheus-formatted metrics
|
||||
from a specified URL.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: prometheus.scrape
|
||||
parent: Prometheus
|
||||
weight: 301
|
||||
related:
|
||||
- /v2.0/write-data/scrape-data/scrapable-endpoints/
|
||||
---
|
||||
|
||||
The `prometheus.scrape()` function retrieves [Prometheus-formatted metrics](https://prometheus.io/docs/instrumenting/exposition_formats/)
|
||||
from a specified URL.
|
||||
The function groups metrics (including histogram and summary values) into individual tables.
|
||||
|
||||
_**Function type:** Input_
|
||||
|
||||
{{% warn %}}
|
||||
The `prometheus.scrape()` function is currently experimental and subject to change at any time.
|
||||
By using this function, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
{{% /warn %}}
|
||||
|
||||
```js
|
||||
import "experimental/prometheus"
|
||||
|
||||
prometheus.scrape(
|
||||
url: "http://localhost:9999/metrics"
|
||||
)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
### url
|
||||
The URL to scrape Prometheus-formatted metrics from.
|
||||
|
||||
_**Data type: String**_
|
||||
|
||||
## Examples
|
||||
|
||||
### Scrape Prometheus metrics and write them to InfluxDB
|
||||
```js
|
||||
import "experimental/prometheus"
|
||||
|
||||
prometheus.scrape(url: "https://example-url.com/metrics")
|
||||
|> to(
|
||||
org: "example-org",
|
||||
bucket: "example-bucket"
|
||||
)
|
||||
```
|
|
@ -22,7 +22,7 @@ _**Function type:** Transformation_
|
|||
|
||||
{{% warn %}}
|
||||
The `experimental.set()` function is subject to change at any time.
|
||||
By using it, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
By using this function, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
{{% /warn %}}
|
||||
|
||||
```js
|
||||
|
|
|
@ -19,7 +19,7 @@ _**Function type:** Transformation_
|
|||
|
||||
{{% warn %}}
|
||||
The `experimental.subDuration()` function is subject to change at any time.
|
||||
By using it, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
By using this function, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
|
||||
This specific function will be removed once duration vectors are implemented.
|
||||
See [influxdata/flux#413](https://github.com/influxdata/flux/issues/413).
|
||||
|
|
|
@ -20,7 +20,7 @@ _**Function type:** Output_
|
|||
|
||||
{{% warn %}}
|
||||
The `experimental.to()` function is subject to change at any time.
|
||||
By using it, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
By using this function, you accept the [risks of experimental functions](/v2.0/reference/flux/stdlib/experimental/#use-experimental-functions-at-your-own-risk).
|
||||
{{% /warn %}}
|
||||
|
||||
```js
|
||||
|
|
Loading…
Reference in New Issue