Merge pull request #250 from influxdata/alpha-10

Alpha 10
pull/251/head
Scott Anderson 2019-05-30 13:20:35 -06:00 committed by GitHub
commit dd3828c039
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
87 changed files with 665 additions and 280 deletions

View File

@ -293,7 +293,7 @@ The shortcode structure is the same as above, but the shortcode names are differ
{{% code-tab-content %}} {{% code-tab-content %}}
```js ```js
data = from(bucket: "telegraf/autogen") data = from(bucket: "example-bucket")
|> range(start: -15m) |> range(start: -15m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and

View File

@ -34,7 +34,7 @@ This is a paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nu
{{% /code-tabs %}} {{% /code-tabs %}}
{{% code-tab-content %}} {{% code-tab-content %}}
```js ```js
data = from(bucket: "telegraf/autogen") data = from(bucket: "example-bucket")
|> range(start: -15m) |> range(start: -15m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and
@ -154,7 +154,7 @@ This is **bold**. This is _italic_.
```js ```js
// This is a code block // This is a code block
cpu = from(bucket:"telegraf/autogen") cpu = from(bucket:"example-bucket")
|> range(start:-30m) |> range(start:-30m)
|> filter(fn:(r) => r._measurement == "cpu") |> filter(fn:(r) => r._measurement == "cpu")
|> filter(fn:(r) => r._measurement == "cpu") |> filter(fn:(r) => r._measurement == "cpu") |> filter(fn:(r) => r._measurement == "cpu") |> filter(fn:(r) => r._measurement == "cpu") |> filter(fn:(r) => r._measurement == "cpu") |> filter(fn:(r) => r._measurement == "cpu")
@ -170,7 +170,7 @@ avg_cpu
###### Here's a codeblock with a title ###### Here's a codeblock with a title
```js ```js
// This is a code block // This is a code block
cpu = from(bucket:"telegraf/autogen") cpu = from(bucket:"example-bucket")
|> range(start:-30m) |> range(start:-30m)
|> filter(fn:(r) => r._measurement == "cpu") |> filter(fn:(r) => r._measurement == "cpu")
@ -305,7 +305,7 @@ This is **bold**. This is _italic_.
```js ```js
// This is a code block inside of a blockquote // This is a code block inside of a blockquote
cpu = from(bucket:"telegraf/autogen") cpu = from(bucket:"example-bucket")
|> range(start:-30m) |> range(start:-30m)
|> filter(fn:(r) => r._measurement == "cpu" and r._field == "someReallyLongFieldName") |> filter(fn:(r) => r._measurement == "cpu" and r._field == "someReallyLongFieldName")
``` ```
@ -418,7 +418,7 @@ This is **bold**. This is _italic_.
```js ```js
// This is a code block inside of a blockquote // This is a code block inside of a blockquote
cpu = from(bucket:"telegraf/autogen") cpu = from(bucket:"example-bucket")
|> range(start:-30m) |> range(start:-30m)
|> filter(fn:(r) => r._measurement == "cpu" and r._field == "someReallyLongFieldName") |> filter(fn:(r) => r._measurement == "cpu" and r._field == "someReallyLongFieldName")
``` ```
@ -526,7 +526,7 @@ This is **bold**. This is _italic_.
```js ```js
// This is a code block inside of a blockquote // This is a code block inside of a blockquote
cpu = from(bucket:"telegraf/autogen") cpu = from(bucket:"example-bucket")
|> range(start:-30m) |> range(start:-30m)
|> filter(fn:(r) => r._measurement == "cpu" and r._field == "someReallyLongFieldName") |> filter(fn:(r) => r._measurement == "cpu" and r._field == "someReallyLongFieldName")
``` ```
@ -565,7 +565,7 @@ This is a paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nu
{{% code-tab-content %}} {{% code-tab-content %}}
```js ```js
data = from(bucket: "telegraf/autogen") data = from(bucket: "example-bucket")
|> range(start: -15m) |> range(start: -15m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and

View File

@ -27,7 +27,7 @@ This article describes how to get started with InfluxDB OSS. To get started with
### Download and install InfluxDB v2.0 alpha ### Download and install InfluxDB v2.0 alpha
Download InfluxDB v2.0 alpha for macOS. Download InfluxDB v2.0 alpha for macOS.
<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb_2.0.0-alpha.9_darwin_amd64.tar.gz" download>InfluxDB v2.0 alpha (macOS)</a> <a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb_2.0.0-alpha.10_darwin_amd64.tar.gz" download>InfluxDB v2.0 alpha (macOS)</a>
### Unpackage the InfluxDB binaries ### Unpackage the InfluxDB binaries
Unpackage the downloaded archive. Unpackage the downloaded archive.
@ -36,7 +36,11 @@ _**Note:** The following commands are examples. Adjust the file paths to your ow
```sh ```sh
# Unpackage contents to the current working directory # Unpackage contents to the current working directory
<<<<<<< HEAD
gunzip -c ~/Downloads/influxdb_2.0.0-alpha.10_darwin_amd64.tar.gz | tar xopf -
=======
gunzip -c ~/Downloads/influxdb_2.0.0-alpha.9_darwin_amd64.tar.gz | tar xopf - gunzip -c ~/Downloads/influxdb_2.0.0-alpha.9_darwin_amd64.tar.gz | tar xopf -
>>>>>>> master
``` ```
If you choose, you can place `influx` and `influxd` in your `$PATH`. If you choose, you can place `influx` and `influxd` in your `$PATH`.
@ -44,7 +48,11 @@ You can also prefix the executables with `./` to run then in place.
```sh ```sh
# (Optional) Copy the influx and influxd binary to your $PATH # (Optional) Copy the influx and influxd binary to your $PATH
<<<<<<< HEAD
sudo cp influxdb_2.0.0-alpha.10_darwin_amd64/{influx,influxd} /usr/local/bin/
=======
sudo cp influxdb_2.0.0-alpha.9_darwin_amd64/{influx,influxd} /usr/local/bin/ sudo cp influxdb_2.0.0-alpha.9_darwin_amd64/{influx,influxd} /usr/local/bin/
>>>>>>> master
``` ```
{{% note %}} {{% note %}}
@ -90,8 +98,8 @@ influxd --reporting-disabled
### Download and install InfluxDB v2.0 alpha ### Download and install InfluxDB v2.0 alpha
Download the InfluxDB v2.0 alpha package appropriate for your chipset. Download the InfluxDB v2.0 alpha package appropriate for your chipset.
<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb_2.0.0-alpha.9_linux_amd64.tar.gz" download >InfluxDB v2.0 alpha (amd64)</a> <a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb_2.0.0-alpha.10_linux_amd64.tar.gz" download >InfluxDB v2.0 alpha (amd64)</a>
<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb_2.0.0-alpha.9_linux_arm64.tar.gz" download >InfluxDB v2.0 alpha (arm)</a> <a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb_2.0.0-alpha.10_linux_arm64.tar.gz" download >InfluxDB v2.0 alpha (arm)</a>
### Place the executables in your $PATH ### Place the executables in your $PATH
Unpackage the downloaded archive and place the `influx` and `influxd` executables in your system `$PATH`. Unpackage the downloaded archive and place the `influx` and `influxd` executables in your system `$PATH`.
@ -100,10 +108,10 @@ _**Note:** The following commands are examples. Adjust the file names, paths, an
```sh ```sh
# Unpackage contents to the current working directory # Unpackage contents to the current working directory
tar xvzf path/to/influxdb_2.0.0-alpha.9_linux_amd64.tar.gz tar xvzf path/to/influxdb_2.0.0-alpha.10_linux_amd64.tar.gz
# Copy the influx and influxd binary to your $PATH # Copy the influx and influxd binary to your $PATH
sudo cp influxdb_2.0.0-alpha.9_linux_amd64/{influx,influxd} /usr/local/bin/ sudo cp influxdb_2.0.0-alpha.10_linux_amd64/{influx,influxd} /usr/local/bin/
``` ```
{{% note %}} {{% note %}}

View File

@ -155,7 +155,7 @@ data = from(bucket: "example-bucket")
```js ```js
threshold = 65.0 threshold = 65.0
data = from(bucket: "example-bucket") from(bucket: "example-bucket")
|> range(start: -1h) |> range(start: -1h)
|> filter(fn: (r) => r._measurement == "mem" and r._field == "used_percent" ) |> filter(fn: (r) => r._measurement == "mem" and r._field == "used_percent" )
// Aggregate data into 5 minute windows using a custom reduce() function // Aggregate data into 5 minute windows using a custom reduce() function

View File

@ -80,7 +80,7 @@ multByX = (tables=<-, x) =>
|> map(fn: (r) => r._value * x) |> map(fn: (r) => r._value * x)
// Function usage // Function usage
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -1m) |> range(start: -1m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and
@ -118,7 +118,7 @@ getWinner = (tables=<-, noSarcasm:true) =>
// Function usage // Function usage
// Get the winner // Get the winner
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -1m) |> range(start: -1m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and
@ -127,7 +127,7 @@ from(bucket: "telegraf/autogen")
|> getWinner() |> getWinner()
// Get the "winner" // Get the "winner"
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -1m) |> range(start: -1m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and

View File

@ -54,7 +54,7 @@ Possible values include `by` and `except`.
## Example grouping operations ## Example grouping operations
To illustrate how grouping works, define a `dataSet` variable that queries System To illustrate how grouping works, define a `dataSet` variable that queries System
CPU usage from the `telegraf/autogen` bucket. CPU usage from the `example-bucket` bucket.
Filter the `cpu` tag so it only returns results for each numbered CPU core. Filter the `cpu` tag so it only returns results for each numbered CPU core.
### Data set ### Data set
@ -62,7 +62,7 @@ CPU used by system operations for all numbered CPU cores.
It uses a regular expression to filter only numbered cores. It uses a regular expression to filter only numbered cores.
```js ```js
dataSet = from(bucket: "telegraf/autogen") dataSet = from(bucket: "example-bucket")
|> range(start: -2m) |> range(start: -2m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._field == "usage_system" and r._field == "usage_system" and

View File

@ -22,7 +22,7 @@ In the histogram output, a column is added (`le`) that represents the upper boun
Bin counts are cumulative. Bin counts are cumulative.
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and
@ -62,7 +62,7 @@ logarithmicBins(start: 1.0, factor: 2.0, count: 10, infinty: true)
### Generating a histogram with linear bins ### Generating a histogram with linear bins
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and
@ -107,7 +107,7 @@ Table: keys: [_start, _stop, _field, _measurement, host]
### Generating a histogram with logarithmic bins ### Generating a histogram with logarithmic bins
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and

View File

@ -31,7 +31,7 @@ This returns the amount of memory (in bytes) used.
###### memUsed stream definition ###### memUsed stream definition
```js ```js
memUsed = from(bucket: "telegraf/autogen") memUsed = from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and
@ -85,7 +85,7 @@ This returns the number of running processes.
###### procTotal stream definition ###### procTotal stream definition
```js ```js
procTotal = from(bucket: "telegraf/autogen") procTotal = from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "processes" and r._measurement == "processes" and

View File

@ -43,7 +43,7 @@ The following example filters records by the `cpu` tag.
It only keeps records for which the `cpu` is either `cpu0`, `cpu1`, or `cpu2`. It only keeps records for which the `cpu` is either `cpu0`, `cpu1`, or `cpu2`.
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -15m) |> range(start: -15m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "cpu" and r._measurement == "cpu" and
@ -56,7 +56,7 @@ from(bucket: "telegraf/autogen")
The following example excludes records that do not have `_percent` in a field key. The following example excludes records that do not have `_percent` in a field key.
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -15m) |> range(start: -15m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and
@ -68,7 +68,7 @@ from(bucket: "telegraf/autogen")
The following example drops columns whose names do not being with `_`. The following example drops columns whose names do not being with `_`.
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -15m) |> range(start: -15m)
|> filter(fn: (r) => r._measurement == "mem") |> filter(fn: (r) => r._measurement == "mem")
|> drop(fn: (column) => column !~ /_.*/) |> drop(fn: (column) => column !~ /_.*/)

View File

@ -17,7 +17,7 @@ orders the records within each table.
The following example orders system uptime first by region, then host, then value. The following example orders system uptime first by region, then host, then value.
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start:-12h) |> range(start:-12h)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "system" and r._measurement == "system" and
@ -31,7 +31,7 @@ limits the number of records in output tables to a fixed number, `n`.
The following example shows up to 10 records from the past hour. The following example shows up to 10 records from the past hour.
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start:-1h) |> range(start:-1h)
|> limit(n:10) |> limit(n:10)
``` ```
@ -41,7 +41,7 @@ The example below returns the 10 top system uptime values sorted first by
region, then host, then value. region, then host, then value.
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start:-12h) |> range(start:-12h)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "system" and r._measurement == "system" and

View File

@ -28,7 +28,7 @@ For the purposes of this guide, define a variable that represents your base data
The following example queries the memory usage of the host machine. The following example queries the memory usage of the host machine.
```js ```js
dataSet = from(bucket: "telegraf/autogen") dataSet = from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and

View File

@ -28,16 +28,18 @@ influxd [command]
## Flags ## Flags
| Flag | Description | Input type | | Flag | Description | Input type |
| :--------------------- | :------------------------------------------------------------------------------------- | :--------: | | :--------------------- | :------------------------------------------------------------------------------------- | :--------: |
| `--assets-path` | Override default assets by serving from a specific directory (developer mode) | string | | `--assets-path` | Override default assets by serving from a specific directory (developer mode) | string |
| `--bolt-path` | Path to boltdb database (default `~/.influxdbv2/influxd.bolt`) | string | | `--bolt-path` | Path to boltdb database (default `~/.influxdbv2/influxd.bolt`) | string |
| `--e2e-testing` | Add /debug/flush endpoint to clear stores; used for end-to-end tests (default `false`) | boolean | | `--e2e-testing` | Add /debug/flush endpoint to clear stores; used for end-to-end tests (default `false`) | |
| `--engine-path` | Path to persistent engine files (default `~/.influxdbv2/engine`) | string | | `--engine-path` | Path to persistent engine files (default `~/.influxdbv2/engine`) | string |
| `-h`, `--help` | Help for `influxd` | | | `-h`, `--help` | Help for `influxd` | |
| `--http-bind-address` | Bind address for the REST HTTP API (default `:9999`) | string | | `--http-bind-address` | Bind address for the REST HTTP API (default `:9999`) | string |
| `--log-level` | Supported log levels are debug, info, and error (default `info`) | string | | `--log-level` | Supported log levels are debug, info, and error (default `info`) | string |
| `--reporting-disabled` | Disable sending telemetry data to https://telemetry.influxdata.com | | | `--reporting-disabled` | Disable sending telemetry data to **https:<nolink>//telemetry.influxdata.com** | |
| `--secret-store` | Data store for secrets (bolt or vault) (default `bolt`) | string | | `--secret-store` | Data store for secrets (bolt or vault) (default `bolt`) | string |
| `--store` | Data store for REST resources (bolt or memory) (default `bolt`) | string | | `--session-length` | TTL in minutes for newly created sessions (default `60`) | integer |
| `--tracing-type` | Supported tracing types (log or jaeger) | string | | `--session-renew-disabled` | Disables automatically extending session TTL on request | |
| `--store` | Data store for REST resources (bolt or memory) (default `bolt`) | string |
| `--tracing-type` | Supported tracing types (log or jaeger) | string |

View File

@ -28,16 +28,18 @@ influxd run
## Flags ## Flags
| Flag | Description | Input type | | Flag | Description | Input type |
| :--------------------- | :------------------------------------------------------------------------------------- | :--------: | | :--------------------- | :------------------------------------------------------------------------------------- | :--------: |
| `--assets-path` | Override default assets by serving from a specific directory (developer mode) | string | | `--assets-path` | Override default assets by serving from a specific directory (developer mode) | string |
| `--bolt-path` | Path to boltdb database (default `~/.influxdbv2/influxd.bolt`) | string | | `--bolt-path` | Path to boltdb database (default `~/.influxdbv2/influxd.bolt`) | string |
| `--e2e-testing` | Add /debug/flush endpoint to clear stores; used for end-to-end tests (default `false`) | boolean | | `--e2e-testing` | Add /debug/flush endpoint to clear stores; used for end-to-end tests (default `false`) | |
| `--engine-path` | Path to persistent engine files (default `~/.influxdbv2/engine`) | string | | `--engine-path` | Path to persistent engine files (default `~/.influxdbv2/engine`) | string |
| `-h`, `--help` | Help for `run` | | | `-h`, `--help` | Help for `influxd` | |
| `--http-bind-address` | Bind address for the REST HTTP API (default `:9999`) | string | | `--http-bind-address` | Bind address for the REST HTTP API (default `:9999`) | string |
| `--log-level` | Supported log levels are debug, info, and error (default `info`) | string | | `--log-level` | Supported log levels are debug, info, and error (default `info`) | string |
| `--reporting-disabled` | Disable sending telemetry data to https://telemetry.influxdata.com | | | `--reporting-disabled` | Disable sending telemetry data to **https:<nolink>//telemetry.influxdata.com** | |
| `--secret-store` | Data store for secrets (bolt or vault) (default `bolt`) | string | | `--secret-store` | Data store for secrets (bolt or vault) (default `bolt`) | string |
| `--store` | Data store for REST resources (bolt or memory) (default `bolt`) | string | | `--session-length` | TTL in minutes for newly created sessions (default `60`) | integer |
| `--tracing-type` | Supported tracing types (log or jaeger) | string | | `--session-renew-disabled` | Disables automatically extending session TTL on request | |
| `--store` | Data store for REST resources (bolt or memory) (default `bolt`) | string |
| `--tracing-type` | Supported tracing types (log or jaeger) | string |

View File

@ -20,6 +20,8 @@ To configure InfluxDB, use the following configuration options when starting the
- [--log-level](#log-level) - [--log-level](#log-level)
- [--reporting-disabled](#reporting-disabled) - [--reporting-disabled](#reporting-disabled)
- [--secret-store](#secret-store) - [--secret-store](#secret-store)
- [--session-length](#session-length)
- [--session-renew-disabled](#session-renew-disabled)
- [--store](#store) - [--store](#store)
- [--tracing-type](#tracing-type) - [--tracing-type](#tracing-type)
@ -33,6 +35,8 @@ influxd \
--log-level=info \ --log-level=info \
--reporting-disabled \ --reporting-disabled \
--secret-store=bolt \ --secret-store=bolt \
--session-length=60 \
--session-renew-disabled \
--store=bolt \ --store=bolt \
--tracing-type=log --tracing-type=log
``` ```
@ -135,6 +139,29 @@ influxd --secret-store=bolt
--- ---
## --session-length
Specifies the Time to Live (TTL) **in minutes** for newly created user sessions.
**Default:** `60`
```sh
influxd --session-length=60
```
---
## --session-renew-disabled
Disables automatically extending a user's session TTL on each request.
By default, every request sets the session's expiration time to five minutes from now.
When disabled, sessions expire after the specified [session length](#session-length)
and the user is redirected to the login page, even if recently active.
```sh
influxd --session-renew-disabled
```
---
## --store ## --store
Specifies the data store for REST resources. Specifies the data store for REST resources.

View File

@ -19,7 +19,7 @@ _**Function type:** Input_
_**Output data type:** Object_ _**Output data type:** Object_
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
// OR // OR
@ -40,7 +40,7 @@ _**Data type:** String_
## Examples ## Examples
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
``` ```
```js ```js
from(bucketID: "0261d8287f4d6000") from(bucketID: "0261d8287f4d6000")

View File

@ -18,8 +18,6 @@ _**Function type:** Output_
to( to(
bucket: "my-bucket", bucket: "my-bucket",
org: "my-org", org: "my-org",
host: "http://example.com:8086",
token: "xxxxxx",
timeColumn: "_time", timeColumn: "_time",
tagColumns: ["tag1", "tag2", "tag3"], tagColumns: ["tag1", "tag2", "tag3"],
fieldFn: (r) => ({ [r._field]: r._value }) fieldFn: (r) => ({ [r._field]: r._value })
@ -30,8 +28,6 @@ to(
to( to(
bucketID: "1234567890", bucketID: "1234567890",
orgID: "0987654321", orgID: "0987654321",
host: "http://example.com:8086",
token: "xxxxxx",
timeColumn: "_time", timeColumn: "_time",
tagColumns: ["tag1", "tag2", "tag3"], tagColumns: ["tag1", "tag2", "tag3"],
fieldFn: (r) => ({ [r._field]: r._value }) fieldFn: (r) => ({ [r._field]: r._value })
@ -83,7 +79,7 @@ Mutually exclusive with `org`.
_**Data type:** String_ _**Data type:** String_
### host <!-- ### host
The remote InfluxDB host to which to write. The remote InfluxDB host to which to write.
_If specified, a `token` is required._ _If specified, a `token` is required._
@ -93,7 +89,7 @@ _**Data type:** String_
The authorization token to use when writing to a remote host. The authorization token to use when writing to a remote host.
_Required when a `host` is specified._ _Required when a `host` is specified._
_**Data type:** String_ _**Data type:** String_ -->
### timeColumn ### timeColumn
The time column of the output. The time column of the output.

View File

@ -36,7 +36,7 @@ _**Data type:** String_
## Examples ## Examples
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> yield(name: "1") |> yield(name: "1")
``` ```

View File

@ -74,7 +74,7 @@ _**Data type:** Boolean_
###### Using an aggregate function with default parameters ###### Using an aggregate function with default parameters
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: 1h) |> range(start: 1h)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and
@ -84,13 +84,13 @@ from(bucket: "telegraf/autogen")
fn: mean fn: mean
) )
``` ```
####### Specifying parameters of the aggregate function ###### Specifying parameters of the aggregate function
To use `aggregateWindow()` aggregate functions that don't provide defaults for required parameters, To use `aggregateWindow()` aggregate functions that don't provide defaults for required parameters,
for the `fn` parameter, define an anonymous function with `columns` and `tables` parameters for the `fn` parameter, define an anonymous function with `columns` and `tables` parameters
that pipe-forwards tables into the aggregate function with all required parameters defined: that pipe-forwards tables into the aggregate function with all required parameters defined:
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: 1h) |> range(start: 1h)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and

View File

@ -30,13 +30,13 @@ _**Data type: String**_
## Examples ## Examples
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> count() |> count()
``` ```
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> count(column: "_value") |> count(column: "_value")
``` ```

View File

@ -46,13 +46,13 @@ _**Data type:** Boolean_
## Examples ## Examples
```js ```js
table1 = from(bucket: "telegraf/autogen") table1 = from(bucket: "example-bucket")
|> range(start: -15m) |> range(start: -15m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "measurement_1" r._measurement == "measurement_1"
) )
table2 = from(bucket: "telegraf/autogen") table2 = from(bucket: "example-bucket")
|> range(start: -15m) |> range(start: -15m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "measurement_2" r._measurement == "measurement_2"

View File

@ -38,7 +38,7 @@ _**Data type:** String_
## Examples ## Examples
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start:-5m) |> range(start:-5m)
|> covariance(columns: ["x", "y"]) |> covariance(columns: ["x", "y"])
``` ```

View File

@ -54,7 +54,7 @@ _**Data type:** String_
## Examples ## Examples
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> derivative(unit: 1s, nonNegative: true) |> derivative(unit: 1s, nonNegative: true)
``` ```

View File

@ -45,12 +45,12 @@ _**Data type:** String_
## Examples ## Examples
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> difference() |> difference()
``` ```
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> difference(nonNegative: true) |> difference(nonNegative: true)
``` ```

View File

@ -33,7 +33,7 @@ _**Data type:** Strings_
## Examples ## Examples
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -24h) |> range(start: -24h)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "system" and r._measurement == "system" and

View File

@ -35,7 +35,7 @@ _**Data type:** String_
## Examples ## Examples
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "cpu" and r._measurement == "cpu" and

View File

@ -29,7 +29,7 @@ _**Data type:** String_
## Examples ## Examples
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and
r._field == "used_percent") r._field == "used_percent")

View File

@ -21,7 +21,11 @@ _**Output data type:** Object_
```js ```js
median(method: "estimate_tdigest", compression: 0.0) median(
column: "_value",
method: "estimate_tdigest",
compression: 0.0
)
``` ```
When using the `estimate_tdigest` or `exact_mean` methods, it outputs non-null When using the `estimate_tdigest` or `exact_mean` methods, it outputs non-null
@ -39,8 +43,15 @@ You can convert your value column to a float column using the [`toFloat()` funct
## Parameters ## Parameters
### column
The column to use to compute the median.
Defaults to `"_value"`.
_**Data type:** String_
### method ### method
Defines the method of computation. Defaults to `"estimate_tdigest"`. Defines the method of computation.
Defaults to `"estimate_tdigest"`.
_**Data type:** String_ _**Data type:** String_
@ -67,7 +78,7 @@ _**Data type:** Float_
###### Median as an aggregate ###### Median as an aggregate
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and
r._field == "used_percent" r._field == "used_percent"
@ -79,7 +90,7 @@ from(bucket: "telegraf/autogen")
###### Median as a selector ###### Median as a selector
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and
r._field == "used_percent" r._field == "used_percent"

View File

@ -39,14 +39,14 @@ _**Data type:** Array of strings_
## Examples ## Examples
```js ```js
stream1 = from(bucket:"telegraf/autogen") stream1 = from(bucket:"example-bucket")
|> range(start:-15m) |> range(start:-15m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and
r._field == "used" r._field == "used"
) )
stream2 = from(bucket:"telegraf/autogen") stream2 = from(bucket:"example-bucket")
|> range(start:-15m) |> range(start:-15m)
|> filter(fn: (r) => r |> filter(fn: (r) => r
._measurement == "mem" and ._measurement == "mem" and

View File

@ -74,7 +74,7 @@ _**Data type:** Float_
###### Quantile as an aggregate ###### Quantile as an aggregate
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "cpu" and r._measurement == "cpu" and
@ -88,7 +88,7 @@ from(bucket: "telegraf/autogen")
###### Quantile as a selector ###### Quantile as a selector
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "cpu" and r._measurement == "cpu" and

View File

@ -29,7 +29,7 @@ _**Data type:** String_
## Examples ## Examples
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "cpu" and r._measurement == "cpu" and

View File

@ -33,7 +33,7 @@ _**Data type:** String_
## Examples ## Examples
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "cpu" and r._measurement == "cpu" and

View File

@ -46,7 +46,7 @@ Calculates the population standard deviation where the data is considered a popu
## Examples ## Examples
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "cpu" and r._measurement == "cpu" and

View File

@ -29,7 +29,7 @@ _**Data type:** String_
## Examples ## Examples
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "cpu" and r._measurement == "cpu" and

View File

@ -35,14 +35,14 @@ _**Data type:** String_
## Examples ## Examples
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -30m) |> range(start: -30m)
|> columns(column: "labels") |> columns(column: "labels")
``` ```
##### Get every possible column label in a single table ##### Get every possible column label in a single table
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -30m) |> range(start: -30m)
|> columns() |> columns()
|> keep(columns: ["_value"]) |> keep(columns: ["_value"])

View File

@ -30,7 +30,7 @@ _**Data type:** Array of strings_
## Examples ## Examples
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "disk" and r._measurement == "disk" and

View File

@ -45,14 +45,14 @@ _**Data type:** Function_
##### Drop a list of columns ##### Drop a list of columns
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> drop(columns: ["host", "_measurement"]) |> drop(columns: ["host", "_measurement"])
``` ```
##### Drop columns matching a predicate ##### Drop columns matching a predicate
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> drop(fn: (column) => column =~ /usage*/) |> drop(fn: (column) => column =~ /usage*/)
``` ```

View File

@ -39,7 +39,7 @@ If the `as` column already exists, this function will overwrite the existing val
## Examples ## Examples
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start:-5m) |> range(start:-5m)
|> filter(fn: (r) => r._measurement == "cpu") |> filter(fn: (r) => r._measurement == "cpu")
|> duplicate(column: "host", as: "server") |> duplicate(column: "host", as: "server")

View File

@ -50,7 +50,7 @@ _**Data type:** Boolean_
##### Fill null values with a specified non-null value ##### Fill null values with a specified non-null value
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -1h) |> range(start: -1h)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "cpu" and r._measurement == "cpu" and
@ -61,7 +61,7 @@ from(bucket: "telegraf/autogen")
##### Fill null values with the previous non-null value ##### Fill null values with the previous non-null value
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -1h) |> range(start: -1h)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "cpu" and r._measurement == "cpu" and

View File

@ -35,7 +35,7 @@ Objects evaluated in `fn` functions are represented by `r`, short for "record" o
## Examples ## Examples
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start:-1h) |> range(start:-1h)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "cpu" and r._measurement == "cpu" and

View File

@ -58,14 +58,14 @@ Groups records by all columns **except** those defined in the [`columns`](#colum
###### Group by host and measurement ###### Group by host and measurement
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -30m) |> range(start: -30m)
|> group(columns: ["host", "_measurement"]) |> group(columns: ["host", "_measurement"])
``` ```
###### Group by everything except time ###### Group by everything except time
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -30m) |> range(start: -30m)
|> group(columns: ["_time"], mode: "except") |> group(columns: ["_time"], mode: "except")
``` ```
@ -73,7 +73,7 @@ from(bucket: "telegraf/autogen")
###### Ungroup data ###### Ungroup data
```js ```js
// Merge all tables into a single table // Merge all tables into a single table
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -30m) |> range(start: -30m)
|> group() |> group()
``` ```

View File

@ -72,7 +72,7 @@ _**Data type:** String_
- `full` - `full`
{{% note %}} {{% note %}}
The `on` parameter and the cross method are mutually exclusive. The `on` parameter and the `cross` method are mutually exclusive.
{{% /note %}} {{% /note %}}
## Examples ## Examples
@ -116,14 +116,14 @@ The output will be:
#### Cross-measurement join #### Cross-measurement join
```js ```js
data_1 = from(bucket:"telegraf/autogen") data_1 = from(bucket:"example-bucket")
|> range(start:-15m) |> range(start:-15m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "cpu" and r._measurement == "cpu" and
r._field == "usage_system" r._field == "usage_system"
) )
data_2 = from(bucket:"telegraf/autogen") data_2 = from(bucket:"example-bucket")
|> range(start:-15m) |> range(start:-15m)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and

View File

@ -44,14 +44,14 @@ _**Data type:** Function_
##### Keep a list of columns ##### Keep a list of columns
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> keep(columns: ["_time", "_value"]) |> keep(columns: ["_time", "_value"])
``` ```
##### Keep all columns matching a predicate ##### Keep all columns matching a predicate
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> keep(fn: (column) => column =~ /inodes*/) |> keep(fn: (column) => column =~ /inodes*/)
``` ```

View File

@ -35,14 +35,14 @@ _**Data type:** String_
## Examples ## Examples
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -30m) |> range(start: -30m)
|> keys(column: "keys") |> keys(column: "keys")
``` ```
##### Return every possible key in a single table ##### Return every possible key in a single table
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -30m) |> range(start: -30m)
|> keys() |> keys()
|> keep(columns: ["_value"]) |> keep(columns: ["_value"])

View File

@ -53,7 +53,7 @@ _**Data type:** Function_
##### Get key values from explicitly defined columns ##### Get key values from explicitly defined columns
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -30m) |> range(start: -30m)
|> filter(fn: (r) => r._measurement == "cpu") |> filter(fn: (r) => r._measurement == "cpu")
|> keyValues(keyColumns: ["usage_idle", "usage_user"]) |> keyValues(keyColumns: ["usage_idle", "usage_user"])
@ -61,7 +61,7 @@ from(bucket: "telegraf/autogen")
##### Get key values from columns matching a regular expression ##### Get key values from columns matching a regular expression
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -30m) |> range(start: -30m)
|> filter(fn: (r) => r._measurement == "cpu") |> filter(fn: (r) => r._measurement == "cpu")
|> keyValues(fn: (schema) => schema.columns |> filter(fn: (r) => r.label =~ /usage_.*/)) |> keyValues(fn: (schema) => schema.columns |> filter(fn: (r) => r.label =~ /usage_.*/))

View File

@ -37,7 +37,7 @@ _**Data type:** Integer_
## Examples ## Examples
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start:-1h) |> range(start:-1h)
|> limit(n:10, offset: 1) |> limit(n:10, offset: 1)
``` ```

View File

@ -67,7 +67,7 @@ _**Data type:** Boolean_
###### Square the value of each record ###### Square the value of each record
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "cpu" and r._measurement == "cpu" and
r._field == "usage_system" and r._field == "usage_system" and
@ -79,7 +79,7 @@ from(bucket:"telegraf/autogen")
###### Create a new table with new format ###### Create a new table with new format
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "cpu" and r._measurement == "cpu" and
r._field == "usage_system" r._field == "usage_system"

View File

@ -52,21 +52,21 @@ and ignores dates and times provided in other formats.
###### Time range relative to now ###### Time range relative to now
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start:-12h) |> range(start:-12h)
// ... // ...
``` ```
###### Relative time range ###### Relative time range
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start:-12h, stop: -15m) |> range(start:-12h, stop: -15m)
// ... // ...
``` ```
###### Absolute time range ###### Absolute time range
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start:2018-05-22T23:30:00Z, stop: 2018-05-23T00:00:00Z) |> range(start:2018-05-22T23:30:00Z, stop: 2018-05-23T00:00:00Z)
// ... // ...
``` ```

View File

@ -46,14 +46,14 @@ _**Data type:** Function_
##### Rename a single column ##### Rename a single column
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> rename(columns: {host: "server"}) |> rename(columns: {host: "server"})
``` ```
##### Rename all columns using a function ##### Rename all columns using a function
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> rename(fn: (column) => column + "_new") |> rename(fn: (column) => column + "_new")
``` ```

View File

@ -35,7 +35,7 @@ _**Data type:** Array of strings_
## Examples ## Examples
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start:-1h) |> range(start:-1h)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and

View File

@ -30,7 +30,7 @@ _**Data type:** string_
## Examples ## Examples
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> filter(fn: (r) => r._measurement == "cpu") |> filter(fn: (r) => r._measurement == "cpu")
|> distinct(column: "host") |> distinct(column: "host")

View File

@ -21,7 +21,7 @@ first()
## Examples ## Examples
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start:-1h) |> range(start:-1h)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "cpu" and r._measurement == "cpu" and

View File

@ -44,7 +44,7 @@ _**Data type:** Array of strings_
## Examples ## Examples
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start:-1h) |> range(start:-1h)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and

View File

@ -44,7 +44,7 @@ _**Data type:** Array of strings_
## Examples ## Examples
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start:-1h) |> range(start:-1h)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and

View File

@ -44,7 +44,7 @@ _**Data type:** Array of strings_
## Examples ## Examples
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start:-1h) |> range(start:-1h)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and

View File

@ -21,7 +21,7 @@ last()
## Examples ## Examples
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start:-1h) |> range(start:-1h)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "cpu" and r._measurement == "cpu" and

View File

@ -44,7 +44,7 @@ _**Data type:** Array of strings_
## Examples ## Examples
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start:-1h) |> range(start:-1h)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and

View File

@ -44,7 +44,7 @@ _**Data type:** Array of strings_
## Examples ## Examples
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start:-1h) |> range(start:-1h)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and

View File

@ -44,7 +44,7 @@ _**Data type:** Array of strings_
## Examples ## Examples
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start:-1h) |> range(start:-1h)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and

View File

@ -29,7 +29,7 @@ _**Data type:** String_
## Examples ## Examples
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start:-1h) |> range(start:-1h)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "cpu" and r._measurement == "cpu" and

View File

@ -29,7 +29,7 @@ _**Data type:** String_
## Examples ## Examples
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start:-1h) |> range(start:-1h)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "cpu" and r._measurement == "cpu" and

View File

@ -36,7 +36,7 @@ _**Data type:** Integer_
## Examples ## Examples
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start:-1d) |> range(start:-1d)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "cpu" and r._measurement == "cpu" and

View File

@ -35,7 +35,7 @@ _**Data type:** Array of strings_
## Examples ## Examples
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start:-1h) |> range(start:-1h)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "mem" and r._measurement == "mem" and

View File

@ -30,7 +30,7 @@ _**Data type:** String_
## Examples ## Examples
```js ```js
from("telegraf/autogen") from("example-bucket")
|> range(start: -15m) |> range(start: -15m)
|> filter(fn: (r) => r._measurement == "syslog") |> filter(fn: (r) => r._measurement == "syslog")
|> unique(column: "message") |> unique(column: "message")

View File

@ -35,6 +35,6 @@ _**Data type:** String_
## Examples ## Examples
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> set(key: "host", value: "prod-node-1") |> set(key: "host", value: "prod-node-1")
``` ```

View File

@ -43,7 +43,7 @@ _**Data type:** Boolean_
## Examples ## Examples
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start:-12h) |> range(start:-12h)
|> filter(fn: (r) => |> filter(fn: (r) =>
r._measurement == "system" and r._measurement == "system" and

View File

@ -0,0 +1,35 @@
---
title: Flux stream and table functions
list_title: Stream and table functions
seotitle: Flux built-in stream and table functions
description: >
Use stream and table functions to extract a table from a stream of tables and access its
columns and records.
weight: 401
menu:
v2_0_ref:
name: Stream & table
parent: built-in-transformations
v2.0/tags: [transformations, built-in, functions, stream, table]
---
Use stream and table functions to extract a table from a stream of tables and access its
columns and records.
##### Example stream and table functions
```js
data = from(bucket:"example-bucket")
|> range(start: -5m)
|> filter(fn:(r) => r._measurement == "cpu")
// Extract the first available table for which "_field" is equal to "usage_idle"
t = data |> tableFind(fn: (key) => key._field == "usage_idle")
// Extract the "_value" column from the table
values = t |> getColumn(column: "_value")
// Extract the first record from the table
r0 = t |> getRecord(idx: 0)
```
{{< children type="functions" >}}

View File

@ -0,0 +1,39 @@
---
title: getColumn() function
description: >
The `getColumn()` function extracts a column from a table given its label.
If the label is not present in the set of columns, the function errors.
menu:
v2_0_ref:
name: getColumn
parent: Stream & table
weight: 501
---
The `getColumn()` function extracts a column from a table given its label.
If the label is not present in the set of columns, the function errors.
_**Function type:** Stream and table_
```js
getColumn(column: "_value")
```
## Parameters
### column
The name of the column to extract.
_**Data type:** String_
## Example
```js
vs = from(bucket:"example-bucket")
|> range(start: -5m)
|> filter(fn:(r) => r._measurement == "cpu")
|> tableFind(fn: (key) => key._field == "usage_idle")
|> getColumn(column: "_value")
// Use column values
x = vs[0] + vs[1]
```

View File

@ -0,0 +1,39 @@
---
title: getRecord() function
description: >
The `getRecord()` function extracts a record from a table given its index.
If the index is out of bounds, the function errors.
menu:
v2_0_ref:
name: getRecord
parent: Stream & table
weight: 501
---
The `getRecord()` function extracts a record from a table given the record's index.
If the index is out of bounds, the function errors.
_**Function type:** Stream and table_
```js
getRecord(idx: 0)
```
## Parameters
### idx
The index of the record to extract.
_**Data type:** Integer_
## Example
```js
r0 = from(bucket:"example-bucket")
|> range(start: -5m)
|> filter(fn:(r) => r._measurement == "cpu")
|> tableFind(fn: (key) => key._field == "usage_idle")
|> getRecord(idx: 0)
// Use record values
x = r0._field + "--" + r0._measurement
```

View File

@ -0,0 +1,50 @@
---
title: tableFind() function
description: >
The `tableFind()` function extracts the first table in a stream of tables whose
group key values match a predicate. If no table is found, the function errors.
menu:
v2_0_ref:
name: tableFind
parent: Stream & table
weight: 501
---
The `tableFind()` function extracts the first table in a stream of tables whose
group key values match a predicate. If no table is found, the function errors.
_**Function type:** Stream and table_
```js
tableFind(column: "_value")
```
## Parameters
### fn
A predicate function for matching keys in a table's group key.
`tableFind` returns the first table that resolves as `true`.
It expects a `key` argument which represents a group key in the input stream.
_**Data type:** Function_
##### Example fn function
```js
(key) => key._field == "fieldName"
```
## Example
```js
t = from(bucket:"example-bucket")
|> range(start: -5m)
|> filter(fn:(r) => r._measurement == "cpu")
|> tableFind(fn: (key) => key._field == "usage_idle")
// t represents the first table in a stream whose group key
// contains "_field" with a value of "usage_idle".
```
{{% note %}}
You can use `t` from the example above as input for [`getColumn()`](/v2.0/reference/flux/functions/built-in/transformations/stream-table/getcolumn/)
and [`getRecord()`](/v2.0/reference/flux/functions/built-in/transformations/stream-table/getrecord/).
{{% /note %}}

View File

@ -39,14 +39,14 @@ _**Data type:** Array of strings_
###### Shift forward in time ###### Shift forward in time
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> timeShift(duration: 12h) |> timeShift(duration: 12h)
``` ```
###### Shift backward in time ###### Shift backward in time
```js ```js
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> timeShift(duration: -12h) |> timeShift(duration: -12h)
``` ```

View File

@ -113,7 +113,7 @@ _**Data type:** Boolean_
#### Window data into 10 minute intervals #### Window data into 10 minute intervals
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start:-12h) |> range(start:-12h)
|> window(every:10m) |> window(every:10m)
// ... // ...
@ -122,7 +122,7 @@ from(bucket:"telegraf/autogen")
#### Window data using intervals function #### Window data using intervals function
The following windows data into 8 hour intervals starting at 9AM every day. The following windows data into 8 hour intervals starting at 9AM every day.
```js ```js
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start:-12h) |> range(start:-12h)
|> window(intervals: intervals(every:1d, period:8h, offset:9h)) |> window(intervals: intervals(every:1d, period:8h, offset:9h))
``` ```

View File

@ -26,7 +26,7 @@ v1.fieldsAsCols()
```js ```js
import "influxdata/influxdb/v1" import "influxdata/influxdb/v1"
from(bucket:"telegraf/autogen") from(bucket:"example-bucket")
|> range(start: -1h) |> range(start: -1h)
|> filter(fn: (r) => r._measurement == "cpu") |> filter(fn: (r) => r._measurement == "cpu")
|> v1.fieldsAsCols() |> v1.fieldsAsCols()

View File

@ -31,9 +31,9 @@ The `.testing.assertEmpty()` function checks to see if the diff is empty.
```js ```js
import "testing" import "testing"
got = from(bucket: "telegraf/autogen") got = from(bucket: "example-bucket")
|> range(start: -15m) |> range(start: -15m)
want = from(bucket: "backup_telegraf/autogen") want = from(bucket: "backup_example-bucket")
|> range(start: -15m) |> range(start: -15m)
got got
|> testing.diff(want: want) |> testing.diff(want: want)

View File

@ -51,10 +51,10 @@ _**Data type:** Object_
```js ```js
import "testing" import "testing"
want = from(bucket: "backup-telegraf/autogen") want = from(bucket: "backup-example-bucket")
|> range(start: -5m) |> range(start: -5m)
got = from(bucket: "telegraf/autogen") got = from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
testing.assertEquals(got: got, want: want) testing.assertEquals(got: got, want: want)
@ -64,10 +64,10 @@ testing.assertEquals(got: got, want: want)
```js ```js
import "testing" import "testing"
want = from(bucket: "backup-telegraf/autogen") want = from(bucket: "backup-example-bucket")
|> range(start: -5m) |> range(start: -5m)
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> testing.assertEquals(want: want) |> testing.assertEquals(want: want)
``` ```

View File

@ -48,9 +48,9 @@ _**Data type:** Object_
```js ```js
import "testing" import "testing"
want = from(bucket: "backup-telegraf/autogen") want = from(bucket: "backup-example-bucket")
|> range(start: -5m) |> range(start: -5m)
got = from(bucket: "telegraf/autogen") got = from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
testing.diff(got: got, want: want) testing.diff(got: got, want: want)
``` ```
@ -59,8 +59,8 @@ testing.diff(got: got, want: want)
```js ```js
import "testing" import "testing"
want = from(bucket: "backup-telegraf/autogen") |> range(start: -5m) want = from(bucket: "backup-example-bucket") |> range(start: -5m)
from(bucket: "telegraf/autogen") from(bucket: "example-bucket")
|> range(start: -5m) |> range(start: -5m)
|> testing.diff(want: want) |> testing.diff(want: want)
``` ```

View File

@ -9,11 +9,54 @@ menu:
--- ---
{{% note %}} {{% note %}}
_The latest release of InfluxDB v2.0 alpha includes **Flux v0.28.3**. _The latest release of InfluxDB v2.0 alpha includes **Flux v0.31.0**.
Though newer versions of Flux may be available, they will not be included with Though newer versions of Flux may be available, they will not be included with
InfluxDB until the next InfluxDB v2.0 release._ InfluxDB until the next InfluxDB v2.0 release._
{{% /note %}} {{% /note %}}
## v0.31.0 [2019-05-28]
### Breaking changes
- Copy the table when a table is used multiple times.
### Features
- Support for dynamic queries.
### Bug fixes
- Copy the table when a table is used multiple times.
## v0.30.0 [2019-05-16]
### Features
- Support for dynamic queries.
---
## v0.29.0 [2019-05-15]
### Breaking changes
- Make `on` a required parameter to `join()`.
### Features
- Add stream table index functions (
[`tableFind()`](/v2.0/reference/flux/functions/built-in/transformations/stream-table/tablefind/),
[`getRecord()`](/v2.0/reference/flux/functions/built-in/transformations/stream-table/getrecord/),
[`getColumn()`](/v2.0/reference/flux/functions/built-in/transformations/stream-table/getcolumn/)
).
- Construct invalid binary expressions when given multiple expressions.
### Bug fixes
- Properly use RefCount to reference count tables.
- Remove the race condition within the `(*Query).Done` method.
- Fix table functions test.
- Add `column` parameter to `median()`.
- Modify `median` to work with `aggregateWindow()`.
- `pivot()` now uses the correct column type when filling nulls.
- Add error handling for property list.
- Return the error from the context in the executor.
---
## v0.28.3 [2019-05-01] ## v0.28.3 [2019-05-01]
### Bug fixes ### Bug fixes

View File

@ -7,6 +7,30 @@ menu:
weight: 1 weight: 1
--- ---
## v2.0.0-alpha.10 [2019-05-30]
### Features
- Add heatmap visualization type.
- Add scatterplot graph visualization type.
- Add description field to tasks.
- Add CLI arguments for configuring session length and renewal.
- Add smooth interpolation option to line graphs.
### Bug Fixes
- Removed hardcoded bucket for Getting Started with Flux dashboard.
- Ensure map type variables allow for selecting values.
- Generate more idiomatic Flux in query builder.
- Expand tab key presses to two spaces in the Flux editor.
- Prevent dragging of variable dropdowns when dragging a scrollbar inside the dropdown.
- Improve single stat computation.
- Fix crash when opening histogram settings with no data.
### UI Improvements
- Render checkboxes in query builder tag selection lists.
- Fix jumbled card text in Telegraf configuration wizard.
- Change scrapers in scrapers list to be resource cards.
- Export and download resource with formatted resource name with no spaces.
## v2.0.0-alpha.9 [2019-05-01] ## v2.0.0-alpha.9 [2019-05-01]

View File

@ -16,195 +16,304 @@ which can be selected in the **Visualization Type** selection view of the
Each of the available visualization types and available user controls are described below. Each of the available visualization types and available user controls are described below.
* [Graph](#graph) - [Graph](#graph)
* [Graph + Single Stat](#graph-single-stat) - [Graph + Single Stat](#graph-single-stat)
* [Histogram](#histogram) - [Heatmap](#heatmap)
* [Single Stat](#single-stat) - [Histogram](#histogram)
* [Gauge](#gauge) - [Single Stat](#single-stat)
* [Table](#table) - [Gauge](#gauge)
- [Table](#table)
### Graph ### Graph
There are several types of graphs you can create. There are several types of graphs you can create.
To select this view, select the **Graph** option from the visualization dropdown in the upper right. To select this view, select the **Graph** option from the visualization dropdown
in the upper right.
#### Graph Controls
To view **Graph** controls, click the settings icon ({{< icon "gear" >}}) next to the visualization dropdown in the upper right.
* **Geometry**: Select from the following options:
- **Line**: Display a time series in a line graph.
- **Stacked**: Display multiple time series bars as segments stacked on top of each other.
- **Step**: Display a time series in a staircase graph.
- **Bar**: Display the specified time series using a bar chart.
* **Line Colors**: Select a color scheme to use for your graph.
* **Title**: y-axis title. Enter title, if using a custom title.
* **Min**: Minimum y-axis value.
- **Auto** or **Custom**: Enable or disable auto-setting.
* **Max**: Maximum y-axis value.
- **Auto** or **Custom**: Enable or disable auto-setting.
* **Y-Value's Prefix**: Prefix to be added to y-value.
* **Y-Value's Suffix**: Suffix to be added to y-value.
* **Y-Value's Format**: Select between **K/M/B** (Thousand/Million/Billion), **K/M/G** (Kilo/Mega/Giga), or **Raw**.
* **Scale**: Toggle between **Linear** and **Logarithmic**.
##### Line Graph example
{{< img-hd src="/img/2-0-visualizations-line-graph-example.png" alt="Line Graph example" />}} {{< img-hd src="/img/2-0-visualizations-line-graph-example.png" alt="Line Graph example" />}}
##### Stacked Graph example #### Graph controls
{{< img-hd src="/img/2-0-visualizations-stacked-graph-example.png" alt="Stacked Graph example" />}} To view **Graph** controls, click the settings icon ({{< icon "gear" >}}) next
to the visualization dropdown in the upper right.
#### Step-Plot Graph example ###### Options
- **Interpolation**: Select from the following options:
- **Line**: Display a time series in a line graph
- **Smooth**: Display a time series in a line graph with smooth point interpolation.
- **Step**: Display a time series in a staircase graph.
<!-- - **Bar**: Display the specified time series using a bar chart. -->
<!-- - **Stacked**: Display multiple time series bars as segments stacked on top of each other. -->
- **Line Colors**: Select a color scheme to use for your graph.
{{< img-hd src="/img/2-0-visualizations-step-plot-graph-example.png" alt="Step-Plot Graph example" />}} ###### Y Axis
- **Y Axis Label**: Label for the y-axis.
- **Y Tick Prefix**: Prefix to be added to y-value.
- **Y Tick Suffix**: Suffix to be added to y-value.
- **Y Axis Domain**: The y-axis value range.
- **Auto**: Automatically determine the value range based on values in the data set.
- **Custom**: Manually specify the value range of the y-axis.
- **Min**: Minimum y-axis value.
- **Max**: Maximum y-axis value.
##### Bar Graph example ##### Graph with linear interpolation
{{< img-hd src="/img/2-0-visualizations-bar-graph-example.png" alt="Bar Graph example" />}} {{< img-hd src="/img/2-0-visualizations-line-graph-example.png" alt="Line Graph example" />}}
##### Graph with smooth interpolation
{{< img-hd src="/img/2-0-visualizations-line-graph-smooth-example.png" alt="Step-Plot Graph example" />}}
##### Graph with step interpolation
{{< img-hd src="/img/2-0-visualizations-line-graph-step-example.png" alt="Step-Plot Graph example" />}}
<!-- ##### Stacked Graph example
{{< img-hd src="/img/2-0-visualizations-stacked-graph-example.png" alt="Stacked Graph example" />}} -->
<!-- ##### Bar Graph example
{{< img-hd src="/img/2-0-visualizations-bar-graph-example.png" alt="Bar Graph example" />}} -->
### Graph + Single Stat ### Graph + Single Stat
The **Graph + Single Stat** view displays the specified time series in a line graph and overlays the single most recent value as a large numeric value. The **Graph + Single Stat** view displays the specified time series in a line graph
and overlays the single most recent value as a large numeric value.
To select this view, select the **Graph + Single Stat** option from the visualization dropdown in the upper right.
#### Graph + Single Stat Controls
To view **Graph + Single Stat** controls, click the settings icon ({{< icon "gear" >}}) next to the visualization dropdown in the upper right.
* **Line Colors**: Select the a color scheme to use for your graph.
* **Left Y Axis** section:
* **Title**: y-axis title. Enter title, if using a custom title.
* **Min**: Minimum y-axis value.
- **Auto** or **Custom**: Enable or disable auto-setting.
* **Max**: Maximum y-axis value.
- **Auto** or **Custom**: Enable or disable auto-setting.
* **Y-Value's Prefix**: Prefix to be added to y-value.
* **Y-Value's Suffix**: Suffix to be added to y-value.
* **Y-Value's Format**: Select between **K/M/B** (Thousand/Million/Billion), **K/M/G** (Kilo/Mega/Giga), or **Raw**.
* **Scale**: Toggle between **Linear** and **Logarithmic**.
* **Customize Single-Stat** section:
* **Prefix**: Prefix to be added to the single stat.
* **Suffix**: Suffix to be added to the single stat.
* **Decimal Places**: The number of decimal places to display for the single stat.
- **Auto** or **Custom**: Enable or disable auto-setting.
* **Colorized Thresholds** section:
* **Base Color**: Select a base, or background, color from the selection list.
* **Add a Threshold**: Change the color of the single stat based on the current value.
* **Value is**: Enter the value at which the single stat should appear in the selected color. Choose a color from the dropdown menu next to the value.
* **Colorization**: Choose **Text** for the single stat to change color based on the configured thresholds. Choose **Background** for the background of the graph to change color based on the configured thresholds.
#### Graph + Single Stat example
{{< img-hd src="/img/2-0-visualizations-line-graph-single-stat-example.png" alt="Line Graph + Single Stat example" />}} {{< img-hd src="/img/2-0-visualizations-line-graph-single-stat-example.png" alt="Line Graph + Single Stat example" />}}
To select this view, select the **Graph + Single Stat** option from the visualization
dropdown in the upper right.
#### Graph + Single Stat Controls
To view **Graph + Single Stat** controls, click the settings icon ({{< icon "gear" >}})
next to the visualization dropdown in the upper right.
###### Options
- **Line Colors**: Select a color scheme to use for your graph.
###### Y Axis
- **Y Axis Label**: Label for the y-axis.
- **Y Tick Prefix**: Prefix to be added to y-value.
- **Y Tick Suffix**: Suffix to be added to y-value.
- **Y Axis Domain**: The y-axis value range.
- **Auto**: Automatically determine the value range based on values in the data set.
- **Custom**: Manually specify the value range of the y-axis.
- **Min**: Minimum y-axis value.
- **Max**: Maximum y-axis value.
###### Customize Single-Stat
- **Prefix**: Prefix to be added to the single stat.
- **Suffix**: Suffix to be added to the single stat.
- **Decimal Places**: The number of decimal places to display for the single stat.
- **Auto** or **Custom**: Enable or disable auto-setting.
###### Colorized Thresholds
- **Base Color**: Select a base or background color from the selection list.
- **Add a Threshold**: Change the color of the single stat based on the current value.
- **Value is**: Enter the value at which the single stat should appear in the selected color.
Choose a color from the dropdown menu next to the value.
- **Colorization**: Choose **Text** for the single stat to change color based on the configured thresholds.
Choose **Background** for the background of the graph to change color based on the configured thresholds.
### Heatmap
A **Heatmap** displays the distribution of data on an x and y axes where color
represents different concentrations of data points.
{{< img-hd src="/img/2-0-visualizations-heatmap-example.png" alt="Heatmap example" />}}
To select this view, select the **Heatmap** option from the visualization dropdown in the upper right.
#### Heatmap Controls
To view **Heatmap** controls, click the settings icon ({{< icon "gear" >}})
next to the visualization dropdown in the upper right.
###### Data
- **X Column**: Select the column to use for the x-axis.
- **Y Column**: Select the column to use for the y-axis.
###### Options
- **Color Scheme**: Select a color scheme to use for your heatmap.
- **Bin Size**: Specify the size of each bin. Default is 10.
###### X Axis
- **X Axis Label**: Label for the x-axis.
- **X Tick Prefix**: Prefix to be added to x-value.
- **X Tick Suffix**: Suffix to be added to x-value.
- **X Axis Domain**: The x-axis value range.
- **Auto**: Automatically determine the value range based on values in the data set.
- **Custom**: Manually specify the value range of the x-axis.
- **Min**: Minimum x-axis value.
- **Max**: Maximum x-axis value.
###### Y Axis
- **Y Axis Label**: Label for the y-axis.
- **Y Tick Prefix**: Prefix to be added to y-value.
- **Y Tick Suffix**: Suffix to be added to y-value.
- **Y Axis Domain**: The y-axis value range.
- **Auto**: Automatically determine the value range based on values in the data set.
- **Custom**: Manually specify the value range of the y-axis.
- **Min**: Minimum y-axis value.
- **Max**: Maximum y-axis value.
### Histogram ### Histogram
A histogram is a way to view the distribution of data. Unlike column charts, histograms have no time axis. The y-axis is dedicated to count, and the x-axis is divided into bins. A histogram is a way to view the distribution of data. Unlike column charts, histograms have no time axis.
The y-axis is dedicated to count, and the x-axis is divided into bins.
{{< img-hd src="/img/2-0-visualizations-histogram-example.png" alt="Histogram example" />}}
To select this view, select the **Histogram** option from the visualization dropdown in the upper right. To select this view, select the **Histogram** option from the visualization dropdown in the upper right.
#### Histogram Controls #### Histogram Controls
To view **Histogram** controls, click the settings icon ({{< icon "gear" >}}) next to the visualization dropdown in the upper right. To view **Histogram** controls, click the settings icon ({{< icon "gear" >}}) next
to the visualization dropdown in the upper right.
* **Data** section: ###### Data
* **Column**: The column to select data from. - **Column**: The column to select data from.
* **Group By**: The tags to sort by. - **Group By**: The column to group by.
* **Options** section:
* **Color Scheme**: Select a color scheme to use for your graph.
* **Positioning**: Select (**Stacked**) to display data stacked on top of each other for each bin, or select
* **Bins**: Enter a number of bins to divide data into or select Auto to automatically calculate the number of bins.
* **Auto** or **Custom**: Enable or disable auto-setting.
#### Histogram example ###### Options
- **Color Scheme**: Select a color scheme to use for your graph.
- **Positioning**: Select **Stacked** to stack groups in a bin on top of each other.
Select **Overlaid** to overlay groups in each bin.
- **Bins**: Enter a number of bins to divide data into or select Auto to automatically
calculate the number of bins.
- **Auto** or **Custom**: Enable or disable auto-setting.
{{< img-hd src="/img/2-0-visualizations-histogram-example.png" alt="Histogram example" />}} ###### X Axis
- **X Axis Label**: Label for the x-axis.
- **X Axis Domain**: The x-axis value range.
- **Auto**: Automatically determine the value range based on values in the data set.
- **Custom**: Manually specify the value range of the x-axis.
- **Min**: Minimum x-axis value.
- **Max**: Maximum x-axis value.
### Single Stat ### Single Stat
The **Single Stat** view displays the most recent value of the specified time series as a numerical value. The **Single Stat** view displays the most recent value of the specified time series as a numerical value.
{{< img-hd src="/img/2-0-visualizations-single-stat-example.png" alt="Single stat example" />}}
To select this view, select the **Single Stat** option from the visualization dropdown in the upper right. To select this view, select the **Single Stat** option from the visualization dropdown in the upper right.
#### Single Stat Controls #### Single Stat Controls
To view **Single Stat** controls, click the settings icon ({{< icon "gear" >}}) next to the visualization dropdown in the upper right. To view **Single Stat** controls, click the settings icon ({{< icon "gear" >}})
next to the visualization dropdown in the upper right.
* **Customize Single-Stat** section: - **Prefix**: Prefix to be added to the single stat.
* **Prefix**: Prefix to be added to the single stat. - **Suffix**: Suffix to be added to the single stat.
* **Suffix**: Suffix to be added to the single stat. - **Decimal Places**: The number of decimal places to display for the single stat.
* **Decimal Places**: The number of decimal places to display for the single stat.
- **Auto** or **Custom**: Enable or disable auto-setting. - **Auto** or **Custom**: Enable or disable auto-setting.
* **Colorized Thresholds** section: ###### Colorized Thresholds
* **Base Color**: Select a base, or background, color from the selection list. - **Base Color**: Select a base or background color from the selection list.
* **Add a Threshold**: Change the color of the single stat based on the current value. - **Add a Threshold**: Change the color of the single stat based on the current value.
* **Value is**: Enter the value at which the single stat should appear in the selected color. Choose a color from the dropdown menu next to the value. - **Value is**: Enter the value at which the single stat should appear in the selected color.
* **Colorization**: Choose **Text** for the single stat to change color based on the configured thresholds. Choose **Background** for the background of the graph to change color based on the configured thresholds. Choose a color from the dropdown menu next to the value.
- **Colorization**: Choose **Text** for the single stat to change color based on the configured thresholds.
Choose **Background** for the background of the graph to change color based on the configured thresholds.
### Gauge ### Gauge
The **Gauge** view displays the single value most recent value for a time series in a gauge view. The **Gauge** view displays the single value most recent value for a time series in a gauge view.
{{< img-hd src="/img/2-0-visualizations-gauge-example.png" alt="Gauge example" />}}
To select this view, select the **Gauge** option from the visualization dropdown in the upper right. To select this view, select the **Gauge** option from the visualization dropdown in the upper right.
#### Gauge Controls #### Gauge Controls
To view **Gauge** controls, click the settings icon ({{< icon "gear" >}}) next to the visualization dropdown in the upper right. To view **Gauge** controls, click the settings icon ({{< icon "gear" >}}) next to
the visualization dropdown in the upper right.
* **Customize Gauge** section: - **Prefix**: Prefix to add to the gauge.
* **Prefix**: Prefix to be added to the gauge. - **Suffix**: Suffix to add to the gauge.
* **Suffix**: Suffix to be added to the gauge. - **Decimal Places**: The number of decimal places to display for the the gauge.
* **Decimal Places**: The number of decimal places to display for the the gauge. - **Auto** or **Custom**: Enable or disable auto-setting.
- **Auto** or **Custom**: Enable or disable auto-setting.
* **Colorized Thresholds** section: ###### Colorized Thresholds
* **Base Color**: Select a base, or background, color from the selection list. - **Base Color**: Select a base or background color from the selection list.
* **Add a Threshold**: Change the color of the gauge based on the current value. - **Add a Threshold**: Change the color of the gauge based on the current value.
* **Value is**: Enter the value at which the gauge should appear in the selected color. Choose a color from the dropdown menu next to the value. - **Value is**: Enter the value at which the gauge should appear in the selected color.
Choose a color from the dropdown menu next to the value.
#### Gauge example
{{< img-hd src="/img/2-0-visualizations-gauge-example.png" alt="Gauge example" />}}
### Table ### Table
The **Table** option displays the results of queries in a tabular view, which is sometimes easier to analyze than graph views of data. The **Table** option displays the results of queries in a tabular view, which is
sometimes easier to analyze than graph views of data.
{{< img-hd src="/img/2-0-visualizations-table-example.png" alt="Table example" />}}
To select this view, select the **Table** option from the visualization dropdown in the upper right. To select this view, select the **Table** option from the visualization dropdown in the upper right.
#### Table Controls #### Table Controls
To view **Table** controls, click the settings icon ({{< icon "gear" >}}) next to the visualization dropdown in the upper right. To view **Table** controls, click the settings icon ({{< icon "gear" >}}) next to
the visualization dropdown in the upper right.
* **Customize Table** section: - **Default Sort Field**: Select the default sort field. Default is **time**.
* **Default Sort Field**: Select the default sort field. Default is **time**. - **Time Format**: Select the time format. Options include:
* **Time Format**: Select the time format. - `MM/DD/YYYY HH:mm:ss` (default)
- Options include: `MM/DD/YYYY HH:mm:ss` (default), `MM/DD/YYYY HH:mm:ss.SSS`, `YYYY-MM-DD HH:mm:ss`, `HH:mm:ss`, `HH:mm:ss.SSS`, `MMMM D, YYYY HH:mm:ss`, `dddd, MMMM D, YYYY HH:mm:ss`, or `Custom`. - `MM/DD/YYYY HH:mm:ss.SSS`
* **Default Sort Field**: Select the default sort field. Default is **time**. - `YYYY-MM-DD HH:mm:ss`
* **Decimal Places**: Enter the number of decimal places. Default (empty field) is **unlimited**. - `HH:mm:ss`
- `HH:mm:ss.SSS`
- `MMMM D, YYYY HH:mm:ss`
- `dddd, MMMM D, YYYY HH:mm:ss`
- `Custom`
- **Decimal Places**: Enter the number of decimal places. Default (empty field) is **unlimited**.
- **Auto** or **Custom**: Enable or disable auto-setting. - **Auto** or **Custom**: Enable or disable auto-setting.
* **Column Settings** section: ###### Column Settings
* **First Column**: Toggle to **Fixed** to lock the first column so that the listings are always visible. Threshold settings do not apply in the first column when locked. - **First Column**: Toggle to **Fixed** to lock the first column so that the listings are always visible.
* **Table Columns**: Threshold settings do not apply in the first column when locked.
- Enter a new name to rename any of the columns. - **Table Columns**:
- Click the eye icon next to a column to hide it. - Enter a new name to rename any of the columns.
- [additional]: Enter name for each additional column. - Click the eye icon next to a column to hide it.
- Change the order of the columns by dragging to the desired position. - [additional]: Enter name for each additional column.
- Change the order of the columns by dragging to the desired position.
* **Colorized Thresholds** section: ###### Colorized Thresholds
* **Base Color**: Select a base, or background, color from the selection list. - **Base Color**: Select a base or background color from the selection list.
* **Add a Threshold**: Change the color of the table based on the current value. - **Add a Threshold**: Change the color of the table based on the current value.
* **Value is**: Enter the value at which the table should appear in the selected color. Choose a color from the dropdown menu next to the value. - **Value is**: Enter the value at which the table should appear in the selected color.
Choose a color from the dropdown menu next to the value.
#### Table view example ### Scatter
The **Scatter** option uses a scatter plot to display time series data.
{{< img-hd src="/img/2-0-visualizations-table-example.png" alt="Table example" />}} {{< img-hd src="/img/2-0-visualizations-scatter-example.png" alt="Scatter plot example" />}}
To select this view, select the **Scatter** option from the visualization dropdown in the upper right.
#### Scatter controls
To view **Scatter** controls, click the settings icon ({{< icon "gear" >}}) next
to the visualization dropdown in the upper right.
###### Data
- **Symbol column**: Define a column containing values that should be differentiated with symbols.
- **Fill column**: Define a column containing values that should be differentiated with fill color.
###### Options
- **Color Scheme**: Select a color scheme to use for your scatter plot.
###### X Axis
- **X Axis Label**: Label for the x-axis.
###### Y Axis
- **Y Axis Label**: Label for the y-axis.
- **Y Tick Prefix**: Prefix to be added to y-value.
- **Y Tick Suffix**: Suffix to be added to y-value.
- **Y Axis Domain**: The y-axis value range.
- **Auto**: Automatically determine the value range based on values in the data set.
- **Custom**: Manually specify the value range of the y-axis.
- **Min**: Minimum y-axis value.
- **Max**: Maximum y-axis value.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB