diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9e07dce81..3a38d1741 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -293,7 +293,7 @@ The shortcode structure is the same as above, but the shortcode names are differ {{% code-tab-content %}} ```js -data = from(bucket: "telegraf/autogen") +data = from(bucket: "example-bucket") |> range(start: -15m) |> filter(fn: (r) => r._measurement == "mem" and diff --git a/content/v2.0/example.md b/content/v2.0/example.md index db9bf55df..9793b5679 100644 --- a/content/v2.0/example.md +++ b/content/v2.0/example.md @@ -34,7 +34,7 @@ This is a paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nu {{% /code-tabs %}} {{% code-tab-content %}} ```js -data = from(bucket: "telegraf/autogen") +data = from(bucket: "example-bucket") |> range(start: -15m) |> filter(fn: (r) => r._measurement == "mem" and @@ -154,7 +154,7 @@ This is **bold**. This is _italic_. ```js // This is a code block -cpu = from(bucket:"telegraf/autogen") +cpu = from(bucket:"example-bucket") |> 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") @@ -170,7 +170,7 @@ avg_cpu ###### Here's a codeblock with a title ```js // This is a code block -cpu = from(bucket:"telegraf/autogen") +cpu = from(bucket:"example-bucket") |> range(start:-30m) |> filter(fn:(r) => r._measurement == "cpu") @@ -305,7 +305,7 @@ This is **bold**. This is _italic_. ```js // This is a code block inside of a blockquote -cpu = from(bucket:"telegraf/autogen") +cpu = from(bucket:"example-bucket") |> range(start:-30m) |> filter(fn:(r) => r._measurement == "cpu" and r._field == "someReallyLongFieldName") ``` @@ -418,7 +418,7 @@ This is **bold**. This is _italic_. ```js // This is a code block inside of a blockquote -cpu = from(bucket:"telegraf/autogen") +cpu = from(bucket:"example-bucket") |> range(start:-30m) |> filter(fn:(r) => r._measurement == "cpu" and r._field == "someReallyLongFieldName") ``` @@ -526,7 +526,7 @@ This is **bold**. This is _italic_. ```js // This is a code block inside of a blockquote -cpu = from(bucket:"telegraf/autogen") +cpu = from(bucket:"example-bucket") |> range(start:-30m) |> 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 %}} ```js -data = from(bucket: "telegraf/autogen") +data = from(bucket: "example-bucket") |> range(start: -15m) |> filter(fn: (r) => r._measurement == "mem" and diff --git a/content/v2.0/get-started.md b/content/v2.0/get-started.md index 570b8fe44..0c7f07b3f 100644 --- a/content/v2.0/get-started.md +++ b/content/v2.0/get-started.md @@ -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 InfluxDB v2.0 alpha for macOS. -InfluxDB v2.0 alpha (macOS) +InfluxDB v2.0 alpha (macOS) ### Unpackage the InfluxDB binaries Unpackage the downloaded archive. @@ -36,7 +36,11 @@ _**Note:** The following commands are examples. Adjust the file paths to your ow ```sh # 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 - +>>>>>>> master ``` 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 # (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/ +>>>>>>> master ``` {{% note %}} @@ -90,8 +98,8 @@ influxd --reporting-disabled ### Download and install InfluxDB v2.0 alpha Download the InfluxDB v2.0 alpha package appropriate for your chipset. -InfluxDB v2.0 alpha (amd64) -InfluxDB v2.0 alpha (arm) +InfluxDB v2.0 alpha (amd64) +InfluxDB v2.0 alpha (arm) ### Place the executables in your $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 # 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 -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 %}} diff --git a/content/v2.0/query-data/guides/conditional-logic.md b/content/v2.0/query-data/guides/conditional-logic.md index c6a781494..857797ee4 100644 --- a/content/v2.0/query-data/guides/conditional-logic.md +++ b/content/v2.0/query-data/guides/conditional-logic.md @@ -155,7 +155,7 @@ data = from(bucket: "example-bucket") ```js threshold = 65.0 -data = from(bucket: "example-bucket") +from(bucket: "example-bucket") |> range(start: -1h) |> filter(fn: (r) => r._measurement == "mem" and r._field == "used_percent" ) // Aggregate data into 5 minute windows using a custom reduce() function diff --git a/content/v2.0/query-data/guides/custom-functions/_index.md b/content/v2.0/query-data/guides/custom-functions/_index.md index 5a92820e6..d72154420 100644 --- a/content/v2.0/query-data/guides/custom-functions/_index.md +++ b/content/v2.0/query-data/guides/custom-functions/_index.md @@ -80,7 +80,7 @@ multByX = (tables=<-, x) => |> map(fn: (r) => r._value * x) // Function usage -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -1m) |> filter(fn: (r) => r._measurement == "mem" and @@ -118,7 +118,7 @@ getWinner = (tables=<-, noSarcasm:true) => // Function usage // Get the winner -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -1m) |> filter(fn: (r) => r._measurement == "mem" and @@ -127,7 +127,7 @@ from(bucket: "telegraf/autogen") |> getWinner() // Get the "winner" -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -1m) |> filter(fn: (r) => r._measurement == "mem" and diff --git a/content/v2.0/query-data/guides/group-data.md b/content/v2.0/query-data/guides/group-data.md index 968ec0312..50a3c4fde 100644 --- a/content/v2.0/query-data/guides/group-data.md +++ b/content/v2.0/query-data/guides/group-data.md @@ -54,7 +54,7 @@ Possible values include `by` and `except`. ## Example grouping operations 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. ### 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. ```js -dataSet = from(bucket: "telegraf/autogen") +dataSet = from(bucket: "example-bucket") |> range(start: -2m) |> filter(fn: (r) => r._field == "usage_system" and diff --git a/content/v2.0/query-data/guides/histograms.md b/content/v2.0/query-data/guides/histograms.md index 76effb095..8baa0cce2 100644 --- a/content/v2.0/query-data/guides/histograms.md +++ b/content/v2.0/query-data/guides/histograms.md @@ -22,7 +22,7 @@ In the histogram output, a column is added (`le`) that represents the upper boun Bin counts are cumulative. ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start: -5m) |> filter(fn: (r) => 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 ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start: -5m) |> filter(fn: (r) => r._measurement == "mem" and @@ -107,7 +107,7 @@ Table: keys: [_start, _stop, _field, _measurement, host] ### Generating a histogram with logarithmic bins ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start: -5m) |> filter(fn: (r) => r._measurement == "mem" and diff --git a/content/v2.0/query-data/guides/join.md b/content/v2.0/query-data/guides/join.md index f83acbd67..002968c3b 100644 --- a/content/v2.0/query-data/guides/join.md +++ b/content/v2.0/query-data/guides/join.md @@ -31,7 +31,7 @@ This returns the amount of memory (in bytes) used. ###### memUsed stream definition ```js -memUsed = from(bucket: "telegraf/autogen") +memUsed = from(bucket: "example-bucket") |> range(start: -5m) |> filter(fn: (r) => r._measurement == "mem" and @@ -85,7 +85,7 @@ This returns the number of running processes. ###### procTotal stream definition ```js -procTotal = from(bucket: "telegraf/autogen") +procTotal = from(bucket: "example-bucket") |> range(start: -5m) |> filter(fn: (r) => r._measurement == "processes" and diff --git a/content/v2.0/query-data/guides/regular-expressions.md b/content/v2.0/query-data/guides/regular-expressions.md index aa844785a..b7ce40e31 100644 --- a/content/v2.0/query-data/guides/regular-expressions.md +++ b/content/v2.0/query-data/guides/regular-expressions.md @@ -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`. ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -15m) |> filter(fn: (r) => 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. ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -15m) |> filter(fn: (r) => r._measurement == "mem" and @@ -68,7 +68,7 @@ from(bucket: "telegraf/autogen") The following example drops columns whose names do not being with `_`. ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -15m) |> filter(fn: (r) => r._measurement == "mem") |> drop(fn: (column) => column !~ /_.*/) diff --git a/content/v2.0/query-data/guides/sort-limit.md b/content/v2.0/query-data/guides/sort-limit.md index fc43fb3cb..4dd175588 100644 --- a/content/v2.0/query-data/guides/sort-limit.md +++ b/content/v2.0/query-data/guides/sort-limit.md @@ -17,7 +17,7 @@ orders the records within each table. The following example orders system uptime first by region, then host, then value. ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start:-12h) |> filter(fn: (r) => 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. ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start:-1h) |> 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. ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start:-12h) |> filter(fn: (r) => r._measurement == "system" and diff --git a/content/v2.0/query-data/guides/window-aggregate.md b/content/v2.0/query-data/guides/window-aggregate.md index 34af9b6ba..b47759063 100644 --- a/content/v2.0/query-data/guides/window-aggregate.md +++ b/content/v2.0/query-data/guides/window-aggregate.md @@ -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. ```js -dataSet = from(bucket: "telegraf/autogen") +dataSet = from(bucket: "example-bucket") |> range(start: -5m) |> filter(fn: (r) => r._measurement == "mem" and diff --git a/content/v2.0/reference/cli/influxd/_index.md b/content/v2.0/reference/cli/influxd/_index.md index eacd36506..183023509 100644 --- a/content/v2.0/reference/cli/influxd/_index.md +++ b/content/v2.0/reference/cli/influxd/_index.md @@ -28,16 +28,18 @@ influxd [command] ## Flags -| Flag | Description | Input type | -| :--------------------- | :------------------------------------------------------------------------------------- | :--------: | -| `--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 | -| `--e2e-testing` | Add /debug/flush endpoint to clear stores; used for end-to-end tests (default `false`) | boolean | -| `--engine-path` | Path to persistent engine files (default `~/.influxdbv2/engine`) | string | -| `-h`, `--help` | Help for `influxd` | | -| `--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 | -| `--reporting-disabled` | Disable sending telemetry data to https://telemetry.influxdata.com | | -| `--secret-store` | Data store for secrets (bolt or vault) (default `bolt`) | string | -| `--store` | Data store for REST resources (bolt or memory) (default `bolt`) | string | -| `--tracing-type` | Supported tracing types (log or jaeger) | string | +| Flag | Description | Input type | +| :--------------------- | :------------------------------------------------------------------------------------- | :--------: | +| `--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 | +| `--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 | +| `-h`, `--help` | Help for `influxd` | | +| `--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 | +| `--reporting-disabled` | Disable sending telemetry data to **https://telemetry.influxdata.com** | | +| `--secret-store` | Data store for secrets (bolt or vault) (default `bolt`) | string | +| `--session-length` | TTL in minutes for newly created sessions (default `60`) | integer | +| `--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 | diff --git a/content/v2.0/reference/cli/influxd/run.md b/content/v2.0/reference/cli/influxd/run.md index 9f3f1cc0c..d4ebe6f40 100644 --- a/content/v2.0/reference/cli/influxd/run.md +++ b/content/v2.0/reference/cli/influxd/run.md @@ -28,16 +28,18 @@ influxd run ## Flags -| Flag | Description | Input type | -| :--------------------- | :------------------------------------------------------------------------------------- | :--------: | -| `--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 | -| `--e2e-testing` | Add /debug/flush endpoint to clear stores; used for end-to-end tests (default `false`) | boolean | -| `--engine-path` | Path to persistent engine files (default `~/.influxdbv2/engine`) | string | -| `-h`, `--help` | Help for `run` | | -| `--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 | -| `--reporting-disabled` | Disable sending telemetry data to https://telemetry.influxdata.com | | -| `--secret-store` | Data store for secrets (bolt or vault) (default `bolt`) | string | -| `--store` | Data store for REST resources (bolt or memory) (default `bolt`) | string | -| `--tracing-type` | Supported tracing types (log or jaeger) | string | +| Flag | Description | Input type | +| :--------------------- | :------------------------------------------------------------------------------------- | :--------: | +| `--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 | +| `--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 | +| `-h`, `--help` | Help for `influxd` | | +| `--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 | +| `--reporting-disabled` | Disable sending telemetry data to **https://telemetry.influxdata.com** | | +| `--secret-store` | Data store for secrets (bolt or vault) (default `bolt`) | string | +| `--session-length` | TTL in minutes for newly created sessions (default `60`) | integer | +| `--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 | diff --git a/content/v2.0/reference/config-options.md b/content/v2.0/reference/config-options.md index 3741eb02d..563409522 100644 --- a/content/v2.0/reference/config-options.md +++ b/content/v2.0/reference/config-options.md @@ -20,6 +20,8 @@ To configure InfluxDB, use the following configuration options when starting the - [--log-level](#log-level) - [--reporting-disabled](#reporting-disabled) - [--secret-store](#secret-store) +- [--session-length](#session-length) +- [--session-renew-disabled](#session-renew-disabled) - [--store](#store) - [--tracing-type](#tracing-type) @@ -33,6 +35,8 @@ influxd \ --log-level=info \ --reporting-disabled \ --secret-store=bolt \ + --session-length=60 \ + --session-renew-disabled \ --store=bolt \ --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 Specifies the data store for REST resources. diff --git a/content/v2.0/reference/flux/functions/built-in/inputs/from.md b/content/v2.0/reference/flux/functions/built-in/inputs/from.md index e9619e81c..f7cf1b583 100644 --- a/content/v2.0/reference/flux/functions/built-in/inputs/from.md +++ b/content/v2.0/reference/flux/functions/built-in/inputs/from.md @@ -19,7 +19,7 @@ _**Function type:** Input_ _**Output data type:** Object_ ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") // OR @@ -40,7 +40,7 @@ _**Data type:** String_ ## Examples ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") ``` ```js from(bucketID: "0261d8287f4d6000") diff --git a/content/v2.0/reference/flux/functions/built-in/outputs/to.md b/content/v2.0/reference/flux/functions/built-in/outputs/to.md index dcf42d8b6..ed047a70f 100644 --- a/content/v2.0/reference/flux/functions/built-in/outputs/to.md +++ b/content/v2.0/reference/flux/functions/built-in/outputs/to.md @@ -18,8 +18,6 @@ _**Function type:** Output_ to( bucket: "my-bucket", org: "my-org", - host: "http://example.com:8086", - token: "xxxxxx", timeColumn: "_time", tagColumns: ["tag1", "tag2", "tag3"], fieldFn: (r) => ({ [r._field]: r._value }) @@ -30,8 +28,6 @@ to( to( bucketID: "1234567890", orgID: "0987654321", - host: "http://example.com:8086", - token: "xxxxxx", timeColumn: "_time", tagColumns: ["tag1", "tag2", "tag3"], fieldFn: (r) => ({ [r._field]: r._value }) @@ -83,7 +79,7 @@ Mutually exclusive with `org`. _**Data type:** String_ -### host + ### timeColumn The time column of the output. diff --git a/content/v2.0/reference/flux/functions/built-in/outputs/yield.md b/content/v2.0/reference/flux/functions/built-in/outputs/yield.md index 09b428cf0..2c5c27ef7 100644 --- a/content/v2.0/reference/flux/functions/built-in/outputs/yield.md +++ b/content/v2.0/reference/flux/functions/built-in/outputs/yield.md @@ -36,7 +36,7 @@ _**Data type:** String_ ## Examples ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -5m) |> yield(name: "1") ``` diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/aggregatewindow.md b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/aggregatewindow.md index cf2798e61..c82f5ee3b 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/aggregatewindow.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/aggregatewindow.md @@ -74,7 +74,7 @@ _**Data type:** Boolean_ ###### Using an aggregate function with default parameters ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: 1h) |> filter(fn: (r) => r._measurement == "mem" and @@ -84,13 +84,13 @@ from(bucket: "telegraf/autogen") 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, 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: ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: 1h) |> filter(fn: (r) => r._measurement == "mem" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/count.md b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/count.md index 459cfe053..3f30cd2f9 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/count.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/count.md @@ -30,13 +30,13 @@ _**Data type: String**_ ## Examples ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -5m) |> count() ``` ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -5m) |> count(column: "_value") ``` diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/cov.md b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/cov.md index ff51f1f9d..708c9375c 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/cov.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/cov.md @@ -46,13 +46,13 @@ _**Data type:** Boolean_ ## Examples ```js -table1 = from(bucket: "telegraf/autogen") +table1 = from(bucket: "example-bucket") |> range(start: -15m) |> filter(fn: (r) => r._measurement == "measurement_1" ) -table2 = from(bucket: "telegraf/autogen") +table2 = from(bucket: "example-bucket") |> range(start: -15m) |> filter(fn: (r) => r._measurement == "measurement_2" diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/covariance.md b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/covariance.md index 01a0945e6..42b6b8034 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/covariance.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/covariance.md @@ -38,7 +38,7 @@ _**Data type:** String_ ## Examples ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start:-5m) |> covariance(columns: ["x", "y"]) ``` diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/derivative.md b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/derivative.md index d93965778..cffc3973b 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/derivative.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/derivative.md @@ -54,7 +54,7 @@ _**Data type:** String_ ## Examples ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -5m) |> derivative(unit: 1s, nonNegative: true) ``` diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/difference.md b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/difference.md index 6ce4a154b..f864f6626 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/difference.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/difference.md @@ -45,12 +45,12 @@ _**Data type:** String_ ## Examples ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -5m) |> difference() ``` ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -5m) |> difference(nonNegative: true) ``` diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/increase.md b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/increase.md index 166d21db5..b948fb865 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/increase.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/increase.md @@ -33,7 +33,7 @@ _**Data type:** Strings_ ## Examples ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -24h) |> filter(fn: (r) => r._measurement == "system" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/integral.md b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/integral.md index e3c31ddaf..862b417d8 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/integral.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/integral.md @@ -35,7 +35,7 @@ _**Data type:** String_ ## Examples ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -5m) |> filter(fn: (r) => r._measurement == "cpu" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/mean.md b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/mean.md index b8088c722..5f0cc4366 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/mean.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/mean.md @@ -29,7 +29,7 @@ _**Data type:** String_ ## Examples ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> filter(fn: (r) => r._measurement == "mem" and r._field == "used_percent") diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/median.md b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/median.md index 9aad99714..eff12a6f7 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/median.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/median.md @@ -21,7 +21,11 @@ _**Output data type:** Object_ ```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 @@ -39,8 +43,15 @@ You can convert your value column to a float column using the [`toFloat()` funct ## Parameters +### column +The column to use to compute the median. +Defaults to `"_value"`. + +_**Data type:** String_ + ### method -Defines the method of computation. Defaults to `"estimate_tdigest"`. +Defines the method of computation. +Defaults to `"estimate_tdigest"`. _**Data type:** String_ @@ -67,7 +78,7 @@ _**Data type:** Float_ ###### Median as an aggregate ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> filter(fn: (r) => r._measurement == "mem" and r._field == "used_percent" @@ -79,7 +90,7 @@ from(bucket: "telegraf/autogen") ###### Median as a selector ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> filter(fn: (r) => r._measurement == "mem" and r._field == "used_percent" diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/pearsonr.md b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/pearsonr.md index c8011a618..8aaa439fe 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/pearsonr.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/pearsonr.md @@ -39,14 +39,14 @@ _**Data type:** Array of strings_ ## Examples ```js -stream1 = from(bucket:"telegraf/autogen") +stream1 = from(bucket:"example-bucket") |> range(start:-15m) |> filter(fn: (r) => r._measurement == "mem" and r._field == "used" ) -stream2 = from(bucket:"telegraf/autogen") +stream2 = from(bucket:"example-bucket") |> range(start:-15m) |> filter(fn: (r) => r ._measurement == "mem" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/quantile.md b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/quantile.md index 4cd235378..c9c41436e 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/quantile.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/quantile.md @@ -74,7 +74,7 @@ _**Data type:** Float_ ###### Quantile as an aggregate ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -5m) |> filter(fn: (r) => r._measurement == "cpu" and @@ -88,7 +88,7 @@ from(bucket: "telegraf/autogen") ###### Quantile as a selector ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -5m) |> filter(fn: (r) => r._measurement == "cpu" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/skew.md b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/skew.md index 84c3571c4..529fe62b2 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/skew.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/skew.md @@ -29,7 +29,7 @@ _**Data type:** String_ ## Examples ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -5m) |> filter(fn: (r) => r._measurement == "cpu" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/spread.md b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/spread.md index dcc4ab92b..38a8abbaa 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/spread.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/spread.md @@ -33,7 +33,7 @@ _**Data type:** String_ ## Examples ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -5m) |> filter(fn: (r) => r._measurement == "cpu" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/stddev.md b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/stddev.md index 28d8f163f..66889cd76 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/stddev.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/stddev.md @@ -46,7 +46,7 @@ Calculates the population standard deviation where the data is considered a popu ## Examples ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -5m) |> filter(fn: (r) => r._measurement == "cpu" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/sum.md b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/sum.md index 645da117f..e78449591 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/sum.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/sum.md @@ -29,7 +29,7 @@ _**Data type:** String_ ## Examples ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -5m) |> filter(fn: (r) => r._measurement == "cpu" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/columns.md b/content/v2.0/reference/flux/functions/built-in/transformations/columns.md index 374bf8f05..e76f5bdc6 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/columns.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/columns.md @@ -35,14 +35,14 @@ _**Data type:** String_ ## Examples ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -30m) |> columns(column: "labels") ``` ##### Get every possible column label in a single table ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -30m) |> columns() |> keep(columns: ["_value"]) diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/cumulativesum.md b/content/v2.0/reference/flux/functions/built-in/transformations/cumulativesum.md index 941823c02..c63d5f054 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/cumulativesum.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/cumulativesum.md @@ -30,7 +30,7 @@ _**Data type:** Array of strings_ ## Examples ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -5m) |> filter(fn: (r) => r._measurement == "disk" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/drop.md b/content/v2.0/reference/flux/functions/built-in/transformations/drop.md index 28f777743..62c05cfff 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/drop.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/drop.md @@ -45,14 +45,14 @@ _**Data type:** Function_ ##### Drop a list of columns ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -5m) |> drop(columns: ["host", "_measurement"]) ``` ##### Drop columns matching a predicate ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -5m) |> drop(fn: (column) => column =~ /usage*/) ``` diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/duplicate.md b/content/v2.0/reference/flux/functions/built-in/transformations/duplicate.md index 9671753be..54a90f9b2 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/duplicate.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/duplicate.md @@ -39,7 +39,7 @@ If the `as` column already exists, this function will overwrite the existing val ## Examples ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start:-5m) |> filter(fn: (r) => r._measurement == "cpu") |> duplicate(column: "host", as: "server") diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/fill.md b/content/v2.0/reference/flux/functions/built-in/transformations/fill.md index 5520db317..ff534a98d 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/fill.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/fill.md @@ -50,7 +50,7 @@ _**Data type:** Boolean_ ##### Fill null values with a specified non-null value ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -1h) |> filter(fn: (r) => r._measurement == "cpu" and @@ -61,7 +61,7 @@ from(bucket: "telegraf/autogen") ##### Fill null values with the previous non-null value ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -1h) |> filter(fn: (r) => r._measurement == "cpu" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/filter.md b/content/v2.0/reference/flux/functions/built-in/transformations/filter.md index 2c8c3feee..c89db54e9 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/filter.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/filter.md @@ -35,7 +35,7 @@ Objects evaluated in `fn` functions are represented by `r`, short for "record" o ## Examples ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start:-1h) |> filter(fn: (r) => r._measurement == "cpu" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/group.md b/content/v2.0/reference/flux/functions/built-in/transformations/group.md index 7735478dd..17412ee6c 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/group.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/group.md @@ -58,14 +58,14 @@ Groups records by all columns **except** those defined in the [`columns`](#colum ###### Group by host and measurement ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -30m) |> group(columns: ["host", "_measurement"]) ``` ###### Group by everything except time ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -30m) |> group(columns: ["_time"], mode: "except") ``` @@ -73,7 +73,7 @@ from(bucket: "telegraf/autogen") ###### Ungroup data ```js // Merge all tables into a single table -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -30m) |> group() ``` diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/join.md b/content/v2.0/reference/flux/functions/built-in/transformations/join.md index 97c0bb8df..2a8f2d8dd 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/join.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/join.md @@ -72,7 +72,7 @@ _**Data type:** String_ - `full` {{% note %}} -The `on` parameter and the cross method are mutually exclusive. +The `on` parameter and the `cross` method are mutually exclusive. {{% /note %}} ## Examples @@ -116,14 +116,14 @@ The output will be: #### Cross-measurement join ```js -data_1 = from(bucket:"telegraf/autogen") +data_1 = from(bucket:"example-bucket") |> range(start:-15m) |> filter(fn: (r) => r._measurement == "cpu" and r._field == "usage_system" ) -data_2 = from(bucket:"telegraf/autogen") +data_2 = from(bucket:"example-bucket") |> range(start:-15m) |> filter(fn: (r) => r._measurement == "mem" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/keep.md b/content/v2.0/reference/flux/functions/built-in/transformations/keep.md index 717dcf4ac..8bb409599 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/keep.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/keep.md @@ -44,14 +44,14 @@ _**Data type:** Function_ ##### Keep a list of columns ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -5m) |> keep(columns: ["_time", "_value"]) ``` ##### Keep all columns matching a predicate ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -5m) |> keep(fn: (column) => column =~ /inodes*/) ``` diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/keys.md b/content/v2.0/reference/flux/functions/built-in/transformations/keys.md index 1f120e3c7..e4ecd1b4d 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/keys.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/keys.md @@ -35,14 +35,14 @@ _**Data type:** String_ ## Examples ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -30m) |> keys(column: "keys") ``` ##### Return every possible key in a single table ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -30m) |> keys() |> keep(columns: ["_value"]) diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/keyvalues.md b/content/v2.0/reference/flux/functions/built-in/transformations/keyvalues.md index 9accf0509..a33b86e28 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/keyvalues.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/keyvalues.md @@ -53,7 +53,7 @@ _**Data type:** Function_ ##### Get key values from explicitly defined columns ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -30m) |> filter(fn: (r) => r._measurement == "cpu") |> keyValues(keyColumns: ["usage_idle", "usage_user"]) @@ -61,7 +61,7 @@ from(bucket: "telegraf/autogen") ##### Get key values from columns matching a regular expression ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -30m) |> filter(fn: (r) => r._measurement == "cpu") |> keyValues(fn: (schema) => schema.columns |> filter(fn: (r) => r.label =~ /usage_.*/)) diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/limit.md b/content/v2.0/reference/flux/functions/built-in/transformations/limit.md index f60094a7f..8a216e38f 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/limit.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/limit.md @@ -37,7 +37,7 @@ _**Data type:** Integer_ ## Examples ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start:-1h) |> limit(n:10, offset: 1) ``` diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/map.md b/content/v2.0/reference/flux/functions/built-in/transformations/map.md index 78756b4f8..e29d4c3b5 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/map.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/map.md @@ -67,7 +67,7 @@ _**Data type:** Boolean_ ###### Square the value of each record ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> filter(fn: (r) => r._measurement == "cpu" and r._field == "usage_system" and @@ -79,7 +79,7 @@ from(bucket:"telegraf/autogen") ###### Create a new table with new format ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> filter(fn: (r) => r._measurement == "cpu" and r._field == "usage_system" diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/range.md b/content/v2.0/reference/flux/functions/built-in/transformations/range.md index 9d173ae51..5b6308d38 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/range.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/range.md @@ -52,21 +52,21 @@ and ignores dates and times provided in other formats. ###### Time range relative to now ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start:-12h) // ... ``` ###### Relative time range ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start:-12h, stop: -15m) // ... ``` ###### Absolute time range ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start:2018-05-22T23:30:00Z, stop: 2018-05-23T00:00:00Z) // ... ``` diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/rename.md b/content/v2.0/reference/flux/functions/built-in/transformations/rename.md index cfc669aae..d932cda35 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/rename.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/rename.md @@ -46,14 +46,14 @@ _**Data type:** Function_ ##### Rename a single column ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -5m) |> rename(columns: {host: "server"}) ``` ##### Rename all columns using a function ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -5m) |> rename(fn: (column) => column + "_new") ``` diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/bottom.md b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/bottom.md index 20d546ea3..0e82501ab 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/bottom.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/bottom.md @@ -35,7 +35,7 @@ _**Data type:** Array of strings_ ## Examples ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start:-1h) |> filter(fn: (r) => r._measurement == "mem" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/distinct.md b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/distinct.md index ffafd11d1..945db3889 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/distinct.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/distinct.md @@ -30,7 +30,7 @@ _**Data type:** string_ ## Examples ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -5m) |> filter(fn: (r) => r._measurement == "cpu") |> distinct(column: "host") diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/first.md b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/first.md index 7e0eb2a48..5767015ca 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/first.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/first.md @@ -21,7 +21,7 @@ first() ## Examples ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start:-1h) |> filter(fn: (r) => r._measurement == "cpu" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/highestaverage.md b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/highestaverage.md index 34e15b998..054271bdd 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/highestaverage.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/highestaverage.md @@ -44,7 +44,7 @@ _**Data type:** Array of strings_ ## Examples ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start:-1h) |> filter(fn: (r) => r._measurement == "mem" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/highestcurrent.md b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/highestcurrent.md index 0fc828b3e..3a59ce712 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/highestcurrent.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/highestcurrent.md @@ -44,7 +44,7 @@ _**Data type:** Array of strings_ ## Examples ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start:-1h) |> filter(fn: (r) => r._measurement == "mem" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/highestmax.md b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/highestmax.md index 7935f77cc..40dd14f26 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/highestmax.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/highestmax.md @@ -44,7 +44,7 @@ _**Data type:** Array of strings_ ## Examples ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start:-1h) |> filter(fn: (r) => r._measurement == "mem" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/last.md b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/last.md index 0b9edbef0..83d7c3e96 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/last.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/last.md @@ -21,7 +21,7 @@ last() ## Examples ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start:-1h) |> filter(fn: (r) => r._measurement == "cpu" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/lowestaverage.md b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/lowestaverage.md index 1d6d6be06..9020333d3 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/lowestaverage.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/lowestaverage.md @@ -44,7 +44,7 @@ _**Data type:** Array of strings_ ## Examples ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start:-1h) |> filter(fn: (r) => r._measurement == "mem" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/lowestcurrent.md b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/lowestcurrent.md index bf9b4cfa4..0b2855df5 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/lowestcurrent.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/lowestcurrent.md @@ -44,7 +44,7 @@ _**Data type:** Array of strings_ ## Examples ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start:-1h) |> filter(fn: (r) => r._measurement == "mem" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/lowestmin.md b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/lowestmin.md index e4b4bf3ff..f8b1319cf 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/lowestmin.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/lowestmin.md @@ -44,7 +44,7 @@ _**Data type:** Array of strings_ ## Examples ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start:-1h) |> filter(fn: (r) => r._measurement == "mem" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/max.md b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/max.md index add7d0067..3069e2393 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/max.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/max.md @@ -29,7 +29,7 @@ _**Data type:** String_ ## Examples ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start:-1h) |> filter(fn: (r) => r._measurement == "cpu" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/min.md b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/min.md index 5fe55d001..24ea3c573 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/min.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/min.md @@ -29,7 +29,7 @@ _**Data type:** String_ ## Examples ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start:-1h) |> filter(fn: (r) => r._measurement == "cpu" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/sample.md b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/sample.md index ed2c13c8e..2bcc6ae83 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/sample.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/sample.md @@ -36,7 +36,7 @@ _**Data type:** Integer_ ## Examples ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start:-1d) |> filter(fn: (r) => r._measurement == "cpu" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/top.md b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/top.md index bbe5e3841..87ffbed73 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/top.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/top.md @@ -35,7 +35,7 @@ _**Data type:** Array of strings_ ## Examples ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start:-1h) |> filter(fn: (r) => r._measurement == "mem" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/unique.md b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/unique.md index 300b16fba..fe5047a7f 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/unique.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/unique.md @@ -30,7 +30,7 @@ _**Data type:** String_ ## Examples ```js -from("telegraf/autogen") +from("example-bucket") |> range(start: -15m) |> filter(fn: (r) => r._measurement == "syslog") |> unique(column: "message") diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/set.md b/content/v2.0/reference/flux/functions/built-in/transformations/set.md index d8fdad371..51e88830d 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/set.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/set.md @@ -35,6 +35,6 @@ _**Data type:** String_ ## Examples ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> set(key: "host", value: "prod-node-1") ``` diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/sort.md b/content/v2.0/reference/flux/functions/built-in/transformations/sort.md index 79754fdef..679885b53 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/sort.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/sort.md @@ -43,7 +43,7 @@ _**Data type:** Boolean_ ## Examples ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start:-12h) |> filter(fn: (r) => r._measurement == "system" and diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/stream-table/_index.md b/content/v2.0/reference/flux/functions/built-in/transformations/stream-table/_index.md new file mode 100644 index 000000000..9206961fd --- /dev/null +++ b/content/v2.0/reference/flux/functions/built-in/transformations/stream-table/_index.md @@ -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" >}} diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/stream-table/getcolumn.md b/content/v2.0/reference/flux/functions/built-in/transformations/stream-table/getcolumn.md new file mode 100644 index 000000000..2bc462efb --- /dev/null +++ b/content/v2.0/reference/flux/functions/built-in/transformations/stream-table/getcolumn.md @@ -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] +``` diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/stream-table/getrecord.md b/content/v2.0/reference/flux/functions/built-in/transformations/stream-table/getrecord.md new file mode 100644 index 000000000..9e1f35826 --- /dev/null +++ b/content/v2.0/reference/flux/functions/built-in/transformations/stream-table/getrecord.md @@ -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 +``` diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/stream-table/tablefind.md b/content/v2.0/reference/flux/functions/built-in/transformations/stream-table/tablefind.md new file mode 100644 index 000000000..dc4de72cd --- /dev/null +++ b/content/v2.0/reference/flux/functions/built-in/transformations/stream-table/tablefind.md @@ -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 %}} diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/timeshift.md b/content/v2.0/reference/flux/functions/built-in/transformations/timeshift.md index c96e0066e..a936dacaa 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/timeshift.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/timeshift.md @@ -39,14 +39,14 @@ _**Data type:** Array of strings_ ###### Shift forward in time ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -5m) |> timeShift(duration: 12h) ``` ###### Shift backward in time ```js -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -5m) |> timeShift(duration: -12h) ``` diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/window.md b/content/v2.0/reference/flux/functions/built-in/transformations/window.md index b5e65dd15..bd9f658aa 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/window.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/window.md @@ -113,7 +113,7 @@ _**Data type:** Boolean_ #### Window data into 10 minute intervals ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start:-12h) |> window(every:10m) // ... @@ -122,7 +122,7 @@ from(bucket:"telegraf/autogen") #### Window data using intervals function The following windows data into 8 hour intervals starting at 9AM every day. ```js -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start:-12h) |> window(intervals: intervals(every:1d, period:8h, offset:9h)) ``` diff --git a/content/v2.0/reference/flux/functions/influxdb-v1/fieldsascols.md b/content/v2.0/reference/flux/functions/influxdb-v1/fieldsascols.md index 9ea26ddf8..0d7b2da64 100644 --- a/content/v2.0/reference/flux/functions/influxdb-v1/fieldsascols.md +++ b/content/v2.0/reference/flux/functions/influxdb-v1/fieldsascols.md @@ -26,7 +26,7 @@ v1.fieldsAsCols() ```js import "influxdata/influxdb/v1" -from(bucket:"telegraf/autogen") +from(bucket:"example-bucket") |> range(start: -1h) |> filter(fn: (r) => r._measurement == "cpu") |> v1.fieldsAsCols() diff --git a/content/v2.0/reference/flux/functions/testing/assertempty.md b/content/v2.0/reference/flux/functions/testing/assertempty.md index 014ae0355..33b7a30b1 100644 --- a/content/v2.0/reference/flux/functions/testing/assertempty.md +++ b/content/v2.0/reference/flux/functions/testing/assertempty.md @@ -31,9 +31,9 @@ The `.testing.assertEmpty()` function checks to see if the diff is empty. ```js import "testing" -got = from(bucket: "telegraf/autogen") +got = from(bucket: "example-bucket") |> range(start: -15m) -want = from(bucket: "backup_telegraf/autogen") +want = from(bucket: "backup_example-bucket") |> range(start: -15m) got |> testing.diff(want: want) diff --git a/content/v2.0/reference/flux/functions/testing/assertequals.md b/content/v2.0/reference/flux/functions/testing/assertequals.md index 94dcc469a..0c6fb733e 100644 --- a/content/v2.0/reference/flux/functions/testing/assertequals.md +++ b/content/v2.0/reference/flux/functions/testing/assertequals.md @@ -51,10 +51,10 @@ _**Data type:** Object_ ```js import "testing" -want = from(bucket: "backup-telegraf/autogen") +want = from(bucket: "backup-example-bucket") |> range(start: -5m) -got = from(bucket: "telegraf/autogen") +got = from(bucket: "example-bucket") |> range(start: -5m) testing.assertEquals(got: got, want: want) @@ -64,10 +64,10 @@ testing.assertEquals(got: got, want: want) ```js import "testing" -want = from(bucket: "backup-telegraf/autogen") +want = from(bucket: "backup-example-bucket") |> range(start: -5m) -from(bucket: "telegraf/autogen") +from(bucket: "example-bucket") |> range(start: -5m) |> testing.assertEquals(want: want) ``` diff --git a/content/v2.0/reference/flux/functions/testing/diff.md b/content/v2.0/reference/flux/functions/testing/diff.md index 420165c88..db2e0af5f 100644 --- a/content/v2.0/reference/flux/functions/testing/diff.md +++ b/content/v2.0/reference/flux/functions/testing/diff.md @@ -48,9 +48,9 @@ _**Data type:** Object_ ```js import "testing" -want = from(bucket: "backup-telegraf/autogen") +want = from(bucket: "backup-example-bucket") |> range(start: -5m) -got = from(bucket: "telegraf/autogen") +got = from(bucket: "example-bucket") |> range(start: -5m) testing.diff(got: got, want: want) ``` @@ -59,8 +59,8 @@ testing.diff(got: got, want: want) ```js import "testing" -want = from(bucket: "backup-telegraf/autogen") |> range(start: -5m) -from(bucket: "telegraf/autogen") +want = from(bucket: "backup-example-bucket") |> range(start: -5m) +from(bucket: "example-bucket") |> range(start: -5m) |> testing.diff(want: want) ``` diff --git a/content/v2.0/reference/flux/release-notes.md b/content/v2.0/reference/flux/release-notes.md index a15410bba..1c4f69376 100644 --- a/content/v2.0/reference/flux/release-notes.md +++ b/content/v2.0/reference/flux/release-notes.md @@ -9,11 +9,54 @@ menu: --- {{% 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 InfluxDB until the next InfluxDB v2.0 release._ {{% /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] ### Bug fixes diff --git a/content/v2.0/reference/release-notes.md b/content/v2.0/reference/release-notes.md index 76489403a..e720e5c80 100644 --- a/content/v2.0/reference/release-notes.md +++ b/content/v2.0/reference/release-notes.md @@ -7,6 +7,30 @@ menu: 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] diff --git a/content/v2.0/visualize-data/visualization-types.md b/content/v2.0/visualize-data/visualization-types.md index e48da718a..f9eaf49da 100644 --- a/content/v2.0/visualize-data/visualization-types.md +++ b/content/v2.0/visualize-data/visualization-types.md @@ -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. -* [Graph](#graph) -* [Graph + Single Stat](#graph-single-stat) -* [Histogram](#histogram) -* [Single Stat](#single-stat) -* [Gauge](#gauge) -* [Table](#table) +- [Graph](#graph) +- [Graph + Single Stat](#graph-single-stat) +- [Heatmap](#heatmap) +- [Histogram](#histogram) +- [Single Stat](#single-stat) +- [Gauge](#gauge) +- [Table](#table) ### Graph 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. - -#### 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 +To select this view, select the **Graph** option from the visualization dropdown +in the upper right. {{< 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. + + +- **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" />}} + + + + ### 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. - -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 +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. {{< 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 -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. #### 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: - * **Column**: The column to select data from. - * **Group By**: The tags to sort 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. +###### Data +- **Column**: The column to select data from. +- **Group By**: The column to group by. -#### 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 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. #### 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. - * **Suffix**: Suffix to be added to the single stat. - * **Decimal Places**: The number of decimal places to display for the 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** 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. +###### 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. ### Gauge 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. #### 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 be added to the gauge. - * **Suffix**: Suffix to be added to the gauge. - * **Decimal Places**: The number of decimal places to display for the the gauge. - - **Auto** or **Custom**: Enable or disable auto-setting. +- **Prefix**: Prefix to add to the gauge. +- **Suffix**: Suffix to add to the gauge. +- **Decimal Places**: The number of decimal places to display for the the gauge. + - **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 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. - -#### Gauge example - -{{< img-hd src="/img/2-0-visualizations-gauge-example.png" alt="Gauge example" />}} +###### Colorized Thresholds +- **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. + - **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. ### 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. #### 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**. - * **Time Format**: Select the time format. - - 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`. - * **Default Sort Field**: Select the default sort field. Default is **time**. - * **Decimal Places**: Enter the number of decimal places. Default (empty field) is **unlimited**. +- **Default Sort Field**: Select the default sort field. Default is **time**. +- **Time Format**: Select the time format. 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` + - `Custom` +- **Decimal Places**: Enter the number of decimal places. Default (empty field) is **unlimited**. - **Auto** or **Custom**: Enable or disable auto-setting. -* **Column Settings** section: - * **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. - * **Table Columns**: - - Enter a new name to rename any of the columns. - - Click the eye icon next to a column to hide it. - - [additional]: Enter name for each additional column. - - Change the order of the columns by dragging to the desired position. +###### 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. +- **Table Columns**: + - Enter a new name to rename any of the columns. + - Click the eye icon next to a column to hide it. + - [additional]: Enter name for each additional column. + - Change the order of the columns by dragging to the desired position. -* **Colorized Thresholds** section: - * **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. - * **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. +###### Colorized Thresholds +- **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. + - **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. diff --git a/static/img/2-0-visualization-dropdown.png b/static/img/2-0-visualization-dropdown.png index 8cf5bea0b..848bb9d94 100644 Binary files a/static/img/2-0-visualization-dropdown.png and b/static/img/2-0-visualization-dropdown.png differ diff --git a/static/img/2-0-visualizations-heatmap-example.png b/static/img/2-0-visualizations-heatmap-example.png new file mode 100644 index 000000000..9fb3bc33b Binary files /dev/null and b/static/img/2-0-visualizations-heatmap-example.png differ diff --git a/static/img/2-0-visualizations-line-graph-example.png b/static/img/2-0-visualizations-line-graph-example.png index 58f8ac2bc..58b7667af 100644 Binary files a/static/img/2-0-visualizations-line-graph-example.png and b/static/img/2-0-visualizations-line-graph-example.png differ diff --git a/static/img/2-0-visualizations-line-graph-single-stat-example.png b/static/img/2-0-visualizations-line-graph-single-stat-example.png index fb10a574e..152eb3e7f 100644 Binary files a/static/img/2-0-visualizations-line-graph-single-stat-example.png and b/static/img/2-0-visualizations-line-graph-single-stat-example.png differ diff --git a/static/img/2-0-visualizations-line-graph-smooth-example.png b/static/img/2-0-visualizations-line-graph-smooth-example.png new file mode 100644 index 000000000..9aa61a312 Binary files /dev/null and b/static/img/2-0-visualizations-line-graph-smooth-example.png differ diff --git a/static/img/2-0-visualizations-line-graph-step-example.png b/static/img/2-0-visualizations-line-graph-step-example.png new file mode 100644 index 000000000..5526ae863 Binary files /dev/null and b/static/img/2-0-visualizations-line-graph-step-example.png differ diff --git a/static/img/2-0-visualizations-scatter-example.png b/static/img/2-0-visualizations-scatter-example.png new file mode 100644 index 000000000..789289288 Binary files /dev/null and b/static/img/2-0-visualizations-scatter-example.png differ diff --git a/static/img/2-0-visualizations-single-stat-example.png b/static/img/2-0-visualizations-single-stat-example.png new file mode 100644 index 000000000..96935e5a3 Binary files /dev/null and b/static/img/2-0-visualizations-single-stat-example.png differ diff --git a/static/img/2-0-visualizations-step-plot-graph-example.png b/static/img/2-0-visualizations-step-plot-graph-example.png deleted file mode 100644 index 67a633afd..000000000 Binary files a/static/img/2-0-visualizations-step-plot-graph-example.png and /dev/null differ