diff --git a/api-docs/v2.0/swagger.yml b/api-docs/v2.0/swagger.yml index f135e364d..08f622a08 100644 --- a/api-docs/v2.0/swagger.yml +++ b/api-docs/v2.0/swagger.yml @@ -2361,7 +2361,7 @@ paths: required: true description: The ID of the dashboard to update. responses: - '200': + '201': description: Replaced dashboard cells content: application/json: @@ -3322,6 +3322,12 @@ paths: application/json: schema: $ref: "#/components/schemas/Bucket" + 422: + description: Request body failed validation + content: + application/json: + schema: + $ref: "#/components/schemas/Error" default: description: Unexpected error content: @@ -4319,6 +4325,9 @@ paths: application/json: schema: $ref: "#/components/schemas/PkgApply" + application/x-jsonnet: + schema: + $ref: "#/components/schemas/PkgApply" text/yml: schema: $ref: "#/components/schemas/PkgApply" @@ -7136,19 +7145,31 @@ components: type: string package: $ref: "#/components/schemas/Pkg" + packages: + type: array + items: + $ref: "#/components/schemas/Pkg" secrets: type: object additionalProperties: type: string + remotes: + type: array + items: + type: object + properties: + url: + type: string + contentType: + type: string + required: ["url"] PkgCreate: type: object properties: - pkgName: - type: string - pkgDescription: - type: string - pkgVersion: - type: string + orgIDs: + type: array + items: + type: string resources: type: object properties: @@ -7170,30 +7191,35 @@ components: type: string required: [id, kind] Pkg: - type: object - properties: - apiVersion: - type: string - kind: - type: string - enum: - - package - meta: - type: object - properties: - description: - type: string - pkgName: - type: string - pkgVersion: - type: string - spec: - type: object - properties: - resources: - type: array - items: - type: object + type: array + items: + type: object + properties: + apiVersion: + type: string + kind: + type: string + enum: + - Bucket + - CheckDeadman + - CheckThreshold + - Dashboard + - Label + - NotificationEndpointHTTP + - NotificationEndpointPagerDuty + - NotificationEndpointSlack + - NotificationRule + - NotificationEndpointHTTP + - Task + - Telegraf + - Variable + meta: + type: object + properties: + name: + type: string + spec: + type: object PkgSummary: type: object properties: @@ -7270,6 +7296,10 @@ components: type: string labelID: type: string + missingEnvRefs: + type: array + items: + type: string missingSecrets: type: array items: @@ -8488,7 +8518,9 @@ components: - note - showNoteWhenEmpty - prefix + - tickPrefix - suffix + - tickSuffix - legend - decimalPlaces properties: @@ -8514,8 +8546,12 @@ components: type: boolean prefix: type: string + tickPrefix: + type: string suffix: type: string + tickSuffix: + type: string legend: $ref: '#/components/schemas/Legend' decimalPlaces: @@ -8576,17 +8612,7 @@ components: type: integer GaugeViewProperties: type: object - required: - - type - - queries - - colors - - shape - - note - - showNoteWhenEmpty - - prefix - - suffix - - legend - - decimalPlaces + required: [type, queries, colors, shape, note, showNoteWhenEmpty, prefix, tickPrefix, suffix, tickSuffix, legend, decimalPlaces] properties: type: type: string @@ -8610,8 +8636,12 @@ components: type: boolean prefix: type: string + tickPrefix: + type: string suffix: type: string + tickSuffix: + type: string legend: $ref: '#/components/schemas/Legend' decimalPlaces: @@ -10247,7 +10277,7 @@ components: description: URL to retrieve owners for this check $ref: "#/components/schemas/Link" query: - description: URL to retrieve Flux script for this check + description: URL to retrieve flux script for this check $ref: "#/components/schemas/Link" required: [name, orgID, query] ThresholdCheck: @@ -10542,7 +10572,7 @@ components: description: URL to retrieve owners for this notification rule. $ref: "#/components/schemas/Link" query: - description: URL to retrieve Flux script for this notification rule. + description: URL to retrieve flux script for this notification rule. $ref: "#/components/schemas/Link" TagRule: type: object diff --git a/content/v2.0/backup-restore/_index.md b/content/v2.0/backup-restore/_index.md new file mode 100644 index 000000000..6e6dfc340 --- /dev/null +++ b/content/v2.0/backup-restore/_index.md @@ -0,0 +1,17 @@ +--- +title: Back up and restore data +seotitle: Backup and restore data with InfluxDB +description: > + InfluxDB provides tools that let you back up and restore data and metadata stored + in InfluxDB. +v2.0/tags: [backup, restore] +menu: + v2_0: + name: Back up & restore data +weight: 10 +#draft: true +--- + +InfluxDB provides tools to back up and restore data and metadata stored in InfluxDB. + +{{< children >}} diff --git a/content/v2.0/backup-restore/backup.md b/content/v2.0/backup-restore/backup.md new file mode 100644 index 000000000..21a5a2da3 --- /dev/null +++ b/content/v2.0/backup-restore/backup.md @@ -0,0 +1,46 @@ +--- +title: Back up data +seotitle: Back up data in InfluxDB +description: > + Use the `influx backup` command to back up data and metadata stored in InfluxDB. +menu: + v2_0: + parent: Back up & restore data +weight: 101 +related: + - /v2.0/backup-restore/restore/ + - /v2.0/reference/cli/influx/backup/ +#draft: true +--- + +Use the [`influx backup` command](/v2.0/reference/cli/influx/backup/) to back up +data and metadata stored in InfluxDB. +InfluxDB copies all data and metadata to a set of files stored in a specified directory +on your local filesystem. + +{{% warn %}} +If you set up InfluxDB using **v2.0.0-beta.1** or earlier, you cannot back up data. +Root tokens created prior to **v2.0.0-beta.2** do not have the necessary permissions. +To succesfully use the backup tool, set up a new InfluxDB instance using **v2.0.0-beta.2+**. +{{% /warn %}} + +{{% cloud-msg %}} +The `influx backup` command **cannot** back up data stored in **{{< cloud-name "short" >}}**. +{{% /cloud-msg %}} + +The `influx backup` command requires: + +- The directory path for where to store the backup file set +- The **root authorization token** (the token created for the first user in the + [InfluxDB setup process](/v2.0/get-started/)). + +##### Back up data with the influx CLI +```sh +# Syntax +influx backup -p -t + +# Example +influx backup \ + -p path/to/backup_$(date '+%Y-%m-%d_%H-%M') \ + -t xXXXX0xXX0xxX0xx_x0XxXxXXXxxXX0XXX0XXxXxX0XxxxXX0Xx0xx== +``` diff --git a/content/v2.0/backup-restore/restore.md b/content/v2.0/backup-restore/restore.md new file mode 100644 index 000000000..7abd56d1a --- /dev/null +++ b/content/v2.0/backup-restore/restore.md @@ -0,0 +1,81 @@ +--- +title: Restore data +seotitle: Restore data in InfluxDB +description: > + Use the `influxd restore` command to restore backup data and metadata from InfluxDB. +menu: + v2_0: + parent: Back up & restore data +weight: 101 +v2.0/tags: [restore] +related: + - /v2.0/backup-restore/backup/ + - /v2.0/reference/cli/influxd/restore/ +#draft: true +--- + +Use the `influxd restore` command to restore backup data and metadata from InfluxDB. +You must stop InfluxDB before restoring data. + +{{% cloud-msg %}} +The `influxd restore` command only restores data to InfluxDB OSS, **not {{< cloud-name "short" >}}**. +{{% /cloud-msg %}} + +When restoring data from a backup file set, InfluxDB temporarily moves existing +data and metadata while the restore process runs. +Once the process completes, the temporary data is deleted. +If the restore process fails, InfluxDB preserves the data in the temporary location. +_See [Recover from a failed restore](#recover-from-a-failed-restore)._ + +## Restore data with the influxd CLI +1. **Stop the `influxd` server.** +2. Use the `influxd restore` command and specify the path to the backup directory + using the `--backup-path` flag. + + ```sh + # Syntax + influxd restore --backup-path + + # Example + influxd restore --backup-path ~/backups/2020-01-20_12-00/ + ``` + + _For more information about restore options and flags, see the + [`influxd restore` documentation](/v2.0/reference/cli/influxd/restore/)._ + +## Customize the TSI rebuild process +By default, InfluxDB rebuilds the index and [series file](/v2.0/reference/glossary/#series-file) when restoring data. +When rebuilding the Time Series Index (TSI), it uses the +[default `build-tsi` options](/v2.0/reference/cli/influxd/inspect/build-tsi/). +To customize the Time Series Index (TSI) rebuild process: + +1. Disable rebuilding the index and series files when restoring data: + + ```sh + influxd restore --rebuild-index false + ``` + +2. Manually run `influxd inspect build-tsi` with any + [custom options](/v2.0/reference/cli/influxd/inspect/build-tsi/#flags). + + ```sh + influxd inspect build-tsi \ + --max-log-file-size=1048576 \ + --max-cache-size=1073741824 + ``` + + {{% note %}} +Manually rebuild the TSI index to [adjust the performance](/v2.0/reference/cli/influxd/inspect/build-tsi/#adjust-performance) +of the TSI rebuild process. + {{% /note %}} + +## Recover from a failed restore +If the restoration process fails, InfluxDB preserves existing data in a `tmp` +directory in the [target engine path](/v2.0/reference/cli/influxd/restore/#flags) +(default is `~/.influxdbv2/engine`). + +To recover from a failed restore: + +1. Copy the temporary files back into the `engine` directory. +2. Remove the `.tmp` extensions from each of the copied files. +3. Restart the `influxd` server. diff --git a/content/v2.0/get-started.md b/content/v2.0/get-started.md index 6c691ea69..4a16c0eeb 100644 --- a/content/v2.0/get-started.md +++ b/content/v2.0/get-started.md @@ -28,7 +28,7 @@ This article describes how to get started with InfluxDB OSS. To get started with ### Download and install InfluxDB v2.0 beta Download InfluxDB v2.0 beta for macOS. -InfluxDB v2.0 beta (macOS) +InfluxDB v2.0 beta (macOS) ### Unpackage the InfluxDB binaries To unpackage the downloaded archive, **double click the archive file in Finder** @@ -37,7 +37,7 @@ or run the following command in a macOS command prompt application such ```sh # Unpackage contents to the current working directory -tar zxvf ~/Downloads/influxdb_2.0.0-beta.1_darwin_amd64.tar.gz +tar zxvf ~/Downloads/influxdb_2.0.0-beta.3_darwin_amd64.tar.gz ``` #### (Optional) Place the binaries in your $PATH @@ -46,7 +46,7 @@ prefix the executables with `./` to run then in place. ```sh # (Optional) Copy the influx and influxd binary to your $PATH -sudo cp influxdb_2.0.0-beta.1_darwin_amd64/{influx,influxd} /usr/local/bin/ +sudo cp influxdb_2.0.0-beta.3_darwin_amd64/{influx,influxd} /usr/local/bin/ ``` {{% note %}} @@ -106,8 +106,8 @@ influxd --reporting-disabled ### Download and install InfluxDB v2.0 beta Download the InfluxDB v2.0 beta package appropriate for your chipset. -InfluxDB v2.0 beta (amd64) -InfluxDB v2.0 beta (arm) +InfluxDB v2.0 beta (amd64) +InfluxDB v2.0 beta (arm) ### Place the executables in your $PATH Unpackage the downloaded archive and place the `influx` and `influxd` executables in your system `$PATH`. @@ -116,10 +116,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-beta.1_linux_amd64.tar.gz +tar xvzf path/to/influxdb_2.0.0-beta.3_linux_amd64.tar.gz # Copy the influx and influxd binary to your $PATH -sudo cp influxdb_2.0.0-beta.1_linux_amd64/{influx,influxd} /usr/local/bin/ +sudo cp influxdb_2.0.0-beta.3_linux_amd64/{influx,influxd} /usr/local/bin/ ``` {{% note %}} @@ -170,6 +170,7 @@ the [InfluxDB HTTP API](/v2.0/reference/api/). ```sh docker run --name influxdb -p 9999:9999 quay.io/influxdb/influxdb:2.0.0-beta ``` +_To run InfluxDB in [detached mode](https://docs.docker.com/engine/reference/run/#detached-vs-foreground), include the `-d` flag in the `docker run` command._ {{% note %}} #### InfluxDB "phone home" diff --git a/content/v2.0/organizations/buckets/create-bucket.md b/content/v2.0/organizations/buckets/create-bucket.md index 6616e838a..87790d539 100644 --- a/content/v2.0/organizations/buckets/create-bucket.md +++ b/content/v2.0/organizations/buckets/create-bucket.md @@ -36,7 +36,7 @@ to create a new bucket. A bucket requires the following: - A retention period in nanoseconds ```sh -# Pattern +# Syntax influx bucket create -n -o -r # Example diff --git a/content/v2.0/organizations/buckets/delete-bucket.md b/content/v2.0/organizations/buckets/delete-bucket.md index 8c25b4948..db45745fa 100644 --- a/content/v2.0/organizations/buckets/delete-bucket.md +++ b/content/v2.0/organizations/buckets/delete-bucket.md @@ -31,7 +31,7 @@ to delete a bucket. Deleting a bucket requires the following: - The name or ID of the organization to which the bucket belongs ```sh -# Pattern +# Syntax influx bucket delete -i # Example diff --git a/content/v2.0/organizations/buckets/update-bucket.md b/content/v2.0/organizations/buckets/update-bucket.md index 0bbfef353..15cef3f05 100644 --- a/content/v2.0/organizations/buckets/update-bucket.md +++ b/content/v2.0/organizations/buckets/update-bucket.md @@ -54,7 +54,7 @@ to update a bucket. Updating a bucket requires the following: ##### Update the name of a bucket ```sh -# Pattern +# Syntax influx bucket update -i -o -n # Example @@ -63,7 +63,7 @@ influx bucket update -i 034ad714fdd6f000 -o my-org -n my-new-bucket ##### Update a bucket's retention policy ```sh -# Pattern +# Syntax influx bucket update -i -o -r # Example diff --git a/content/v2.0/organizations/create-org.md b/content/v2.0/organizations/create-org.md index 96f96973f..b4131e978 100644 --- a/content/v2.0/organizations/create-org.md +++ b/content/v2.0/organizations/create-org.md @@ -33,7 +33,7 @@ to create a new organization. A new organization requires the following: - A name for the organization ```sh -# Pattern +# Syntax influx org create -n # Example diff --git a/content/v2.0/organizations/delete-org.md b/content/v2.0/organizations/delete-org.md index 75f574b66..7776c98dd 100644 --- a/content/v2.0/organizations/delete-org.md +++ b/content/v2.0/organizations/delete-org.md @@ -32,7 +32,7 @@ to delete an organization. Deleting an organization requires the following: - The organization ID _(provided in the output of `influx org find`)_ ```sh -# Pattern +# Syntax influx org delete -i # Example diff --git a/content/v2.0/organizations/members/remove-member.md b/content/v2.0/organizations/members/remove-member.md index 87fa6b0f3..2e74f76d0 100644 --- a/content/v2.0/organizations/members/remove-member.md +++ b/content/v2.0/organizations/members/remove-member.md @@ -37,7 +37,7 @@ to remove a member from an organization. Removing a member requires the followin - The member ID _(provided in the output of [`influx org members list`](/v2.0/reference/cli/influx/org/members/list/))_ ```sh -# Pattern +# Syntax influx org members remove -o -i # Example diff --git a/content/v2.0/organizations/members/view-members.md b/content/v2.0/organizations/members/view-members.md index def11ca31..6752a8ea1 100644 --- a/content/v2.0/organizations/members/view-members.md +++ b/content/v2.0/organizations/members/view-members.md @@ -29,7 +29,7 @@ to list members of an organization. Listing an organization's members requires t - The name or ID of the organization ```sh -# Pattern +# Syntax influx org members list -n # Example diff --git a/content/v2.0/organizations/update-org.md b/content/v2.0/organizations/update-org.md index 6b3a2a8c6..2c3e14f11 100644 --- a/content/v2.0/organizations/update-org.md +++ b/content/v2.0/organizations/update-org.md @@ -42,7 +42,7 @@ to update an organization. Updating an organization requires the following: ##### Update the name of a organization ```sh -# Pattern +# Syntax influx org update -i -n # Example diff --git a/content/v2.0/process-data/common-tasks/downsample-data.md b/content/v2.0/process-data/common-tasks/downsample-data.md index 62f000ae5..eaf995f32 100644 --- a/content/v2.0/process-data/common-tasks/downsample-data.md +++ b/content/v2.0/process-data/common-tasks/downsample-data.md @@ -55,7 +55,7 @@ option task = { // Defines a data source data = from(bucket: "system-data") - |> range(start: -task.every * 2) + |> range(start: -duration(v: int(v: task.every) * 2)) |> filter(fn: (r) => r._measurement == "mem") data diff --git a/content/v2.0/process-data/manage-tasks/create-task.md b/content/v2.0/process-data/manage-tasks/create-task.md index 270a0d1c2..dae3e5f1a 100644 --- a/content/v2.0/process-data/manage-tasks/create-task.md +++ b/content/v2.0/process-data/manage-tasks/create-task.md @@ -91,7 +91,7 @@ It accepts either a file path or raw Flux. ###### Create a task using a file ```sh -# Pattern +# Syntax influx task create --org @ # Example diff --git a/content/v2.0/process-data/manage-tasks/delete-task.md b/content/v2.0/process-data/manage-tasks/delete-task.md index eab5c0a54..1ae4dbd05 100644 --- a/content/v2.0/process-data/manage-tasks/delete-task.md +++ b/content/v2.0/process-data/manage-tasks/delete-task.md @@ -28,7 +28,7 @@ Use the `influx task delete` command to delete a task. _This command requires a task ID, which is available in the output of `influx task find`._ ```sh -# Pattern +# Syntax influx task delete -i # Example diff --git a/content/v2.0/process-data/manage-tasks/update-task.md b/content/v2.0/process-data/manage-tasks/update-task.md index 5e152b355..0a2ae7a54 100644 --- a/content/v2.0/process-data/manage-tasks/update-task.md +++ b/content/v2.0/process-data/manage-tasks/update-task.md @@ -47,7 +47,7 @@ Modified [task options](/v2.0/process-data/task-options) defined in the Flux script are also updated. ```sh -# Pattern +# Syntax influx task update -i @/path/to/updated-task-script # Example @@ -61,7 +61,7 @@ command with the `--status` flag. _Possible arguments of the `--status` flag are `active` or `inactive`._ ```sh -# Pattern +# Syntax influx task update -i --status < active | inactive > # Example diff --git a/content/v2.0/reference/cli/influx/_index.md b/content/v2.0/reference/cli/influx/_index.md index 141a73c48..d50966f3a 100644 --- a/content/v2.0/reference/cli/influx/_index.md +++ b/content/v2.0/reference/cli/influx/_index.md @@ -46,6 +46,7 @@ retrieving authentication tokens._ | Command | Description | |:------- |:----------- | | [auth](/v2.0/reference/cli/influx/auth) | Authorization management commands | +| [backup](/v2.0/reference/cli/influx/backup) | Back up data | | [bucket](/v2.0/reference/cli/influx/bucket) | Bucket management commands | | [delete](/v2.0/reference/cli/influx/delete) | Delete points from InfluxDB | | [help](/v2.0/reference/cli/influx/help) | Help about any command | @@ -54,6 +55,7 @@ retrieving authentication tokens._ | [pkg](/v2.0/reference/cli/influx/pkg) | Manage InfluxDB packages | | [query](/v2.0/reference/cli/influx/query) | Execute a Flux query | | [repl](/v2.0/reference/cli/influx/repl) | Interactive REPL (read-eval-print-loop) | +| [secret](/v2.0/reference/cli/influx/secret) | Manage secrets | | [setup](/v2.0/reference/cli/influx/setup) | Create default username, password, org, bucket, etc. | | [task](/v2.0/reference/cli/influx/task) | Task management commands | | [transpile](/v2.0/reference/cli/influx/transpile) | Manually transpile an InfluxQL query to Flux | diff --git a/content/v2.0/reference/cli/influx/backup/_index.md b/content/v2.0/reference/cli/influx/backup/_index.md new file mode 100644 index 000000000..470e5a7ab --- /dev/null +++ b/content/v2.0/reference/cli/influx/backup/_index.md @@ -0,0 +1,27 @@ +--- +title: influx backup – Back up data in InfluxDB +description: The 'influx backup' command backs up data stored in InfluxDB. +menu: + v2_0_ref: + name: influx backup + parent: influx +weight: 101 +v2.0/tags: [backup] +related: + - /v2.0/backup-restore/backup/ +--- + +The `influx backup` command backs up data stored in InfluxDB. + +## Usage +``` +influx backup [flags] +``` + +## Flags +| Flag | Description | Input type | +|:---- |:----------- |:----------:| +| `-h`, `--help` | Help for the `backup` command | | +| `-p`, `--path` | Directory path to write backup files to | string | + +{{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/org/_index.md b/content/v2.0/reference/cli/influx/org/_index.md index 931e1abef..6487c43eb 100644 --- a/content/v2.0/reference/cli/influx/org/_index.md +++ b/content/v2.0/reference/cli/influx/org/_index.md @@ -23,11 +23,11 @@ influx org [command] ## Subcommands | Subcommand | Description | |:---------- |:----------- | -| [create](/v2.0/reference/cli/influx/org/create) | Create organization | -| [delete](/v2.0/reference/cli/influx/org/delete) | Delete organization | +| [create](/v2.0/reference/cli/influx/org/create) | Create an organization | +| [delete](/v2.0/reference/cli/influx/org/delete) | Delete an organization | | [find](/v2.0/reference/cli/influx/org/find) | Find organizations | | [members](/v2.0/reference/cli/influx/org/members) | Organization membership commands | -| [update](/v2.0/reference/cli/influx/org/update) | Update organization | +| [update](/v2.0/reference/cli/influx/org/update) | Update an organization | ## Flags | Flag | Description | diff --git a/content/v2.0/reference/cli/influx/org/create.md b/content/v2.0/reference/cli/influx/org/create.md index 6da222fcc..37d49e0e3 100644 --- a/content/v2.0/reference/cli/influx/org/create.md +++ b/content/v2.0/reference/cli/influx/org/create.md @@ -16,9 +16,10 @@ influx org create [flags] ``` ## Flags -| Flag | Description | Input type | -|:---- |:----------- |:----------: | -| `-h`, `--help` | Help for `create` | | -| `-n`, `--name` | The name of organization that will be created | string | +| Flag | Description | Input type | +|:---- |:----------- |:----------: | +| `-d`, `--description` | Description of the organization | | +| `-h`, `--help` | Help for `create` | | +| `-n`, `--name` | Name of organization | string | {{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/org/delete.md b/content/v2.0/reference/cli/influx/org/delete.md index f49e79328..95032e481 100644 --- a/content/v2.0/reference/cli/influx/org/delete.md +++ b/content/v2.0/reference/cli/influx/org/delete.md @@ -16,9 +16,9 @@ influx org delete [flags] ``` ## Flags -| Flag | Description | Input type | -|:---- |:----------- |:----------: | -| `-h`, `--help` | Help for `delete` | | -| `-i`, `--id` | The organization ID **(Required)** | string | +| Flag | Description | Input type | +|:---- |:----------- |:----------: | +| `-h`, `--help` | Help for `delete` | | +| `-i`, `--id` | **(Required)** Organization ID | string | {{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/org/find.md b/content/v2.0/reference/cli/influx/org/find.md index e14ae59ac..10308a700 100644 --- a/content/v2.0/reference/cli/influx/org/find.md +++ b/content/v2.0/reference/cli/influx/org/find.md @@ -16,10 +16,10 @@ influx org find [flags] ``` ## Flags -| Flag | Description | Input type | -|:---- |:----------- |:----------: | -| `-h`, `--help` | Help for `find` | | -| `-i`, `--id` | The organization ID | string | -| `-n`, `--name` | The organization name | string | +| Flag | Description | Input type | +|:---- |:----------- |:----------: | +| `-h`, `--help` | Help for `find` | | +| `-i`, `--id` | Organization ID | string | +| `-n`, `--name` | Organization name | string | {{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/org/update.md b/content/v2.0/reference/cli/influx/org/update.md index 18961b297..45e4c5468 100644 --- a/content/v2.0/reference/cli/influx/org/update.md +++ b/content/v2.0/reference/cli/influx/org/update.md @@ -16,10 +16,11 @@ influx org update [flags] ``` ## Flags -| Flag | Description | Input type | -|:---- |:----------- |:----------: | -| `-h`, `--help` | Help for `update` | | -| `-i`, `--id` | The organization ID **(Required)** | string | -| `-n`, `--name` | The organization name | string | +| Flag | Description | Input type | +|:---- |:----------- |:----------:| +| `-d`, `--description` | Description for the organization | string | +| `-h`, `--help` | Help for `update` | | +| `-i`, `--id` | **(Required)** Organization ID | string | +| `-n`, `--name` | Organization name | string | {{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/pkg/_index.md b/content/v2.0/reference/cli/influx/pkg/_index.md index 7b0b29356..70b84dff4 100644 --- a/content/v2.0/reference/cli/influx/pkg/_index.md +++ b/content/v2.0/reference/cli/influx/pkg/_index.md @@ -21,22 +21,25 @@ influx pkg [command] | Command | Description | |:------- |:----------- | | [export](/v2.0/reference/cli/influx/pkg/export/) | Export existing resources as a package | -| [new](/v2.0/reference/cli/influx/pkg/new/) | Create a reusable pkg to create resources in a declarative manner | | [summary](/v2.0/reference/cli/influx/pkg/summary/) | Summarize the provided package | | [validate](/v2.0/reference/cli/influx/pkg/validate/) | Validate the provided package | ## Flags -| Flag | Description | Input Type | -|:---- |:----------------------------- |:---------- | -| `-c`, `--color` | Enable color in output _(default is true) _ | | -| `-f`, `--file` | Path to package file | string | -| `--force` | Ignore warnings about destructive changes | | -| `-h`, `--help` | Help for the `pkg` command | | -| `-o`, `--org` | The name of the organization that owns the bucket | string | -| `--org-id` | The ID of the organization that owns the bucket | string | -| `-q`, `--quiet` | Disable output printing | | -| `--secret` | Secrets to provide alongside the package (format: `--secret=SECRET_KEY::SECRET_VALUE`) | string | -| `--table-borders` | Enable table borders _(default is true)_ | | +| Flag | Description | Input Type | +|:---- |:----------------------------- |:---------- | +| `-c`, `--disable-color` | Disable color in output | | +| `--disable-table-borders` | Disable table borders | | +| `-e`, `--encoding` | Encoding of the input stream | string | +| `--env-ref` | Environment references to provide alongside the package (format: `--env-ref=REF_KEY=REF_VALUE`) | string | +| `-f`, `--file` | Path to package file | string | +| `--force` | Ignore warnings about destructive changes | | +| `-h`, `--help` | Help for the `pkg` command | | +| `-o`, `--org` | The name of the organization that owns the bucket | string | +| `--org-id` | The ID of the organization that owns the bucket | string | +| `-q`, `--quiet` | Disable output printing | | +| `-R`, `--recurse` | Recurse through files in the directory specified in `-f`, `--file` | | +| `--secret` | Secrets to provide alongside the package (format: `--secret=SECRET_KEY=SECRET_VALUE`) | string | +| `-u`, `--url` | URL of package file | string | {{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/pkg/export/_index.md b/content/v2.0/reference/cli/influx/pkg/export/_index.md index cfe7c15b7..d4b9e5d04 100644 --- a/content/v2.0/reference/cli/influx/pkg/export/_index.md +++ b/content/v2.0/reference/cli/influx/pkg/export/_index.md @@ -27,17 +27,14 @@ influx pkg export [command] | `--buckets` | Comma-separated list of bucket IDs | string | | `--checks` | Comma-separated list of check IDs | string | | `--dashboards` | Comma-separated list of dashboard IDs | string | -| `-d`, `--description` | Package description | string | | `--endpoints` | Comma-separated list of notification endpoint IDs | string | | `-f`, `--file` | Package output file. Defaults to stdout. Use `.yml` or `.json` file extensions. | string | | `-h`, `--help` | Help for the `export` command | | | `--labels` | Comma-separated list of label IDs | string | -| `-n`, `--name` | Package name | string | | `--resource-type` | Resource type associated with all IDs via stdin | string | | `--rules` | Comma-separated list of notification rule IDs | string | | `--tasks` | Comma-separated list of task IDs | string | | `--telegraf-configs` | Comma-separated list of Telegraf configuration IDs | string | | `--variables` | Comma-separated list of variable IDs | string | -| `-v`, `--version` | Package version | string | {{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/pkg/export/all.md b/content/v2.0/reference/cli/influx/pkg/export/all.md index b31f2f596..8e6bc35a1 100644 --- a/content/v2.0/reference/cli/influx/pkg/export/all.md +++ b/content/v2.0/reference/cli/influx/pkg/export/all.md @@ -20,12 +20,9 @@ influx pkg export all [flags] | Flag | Description | Input Type | |:---- |:----------- |:---------- | -| `-d`, `--description` | Package description | string | | `-f`, `--file` | Package output file. Defaults to stdout. Use `.yml` or `.json` file extensions. | string | | `-h`, `--help` | Help for the `export` command | | -| `-n`, `--name` | Package name | string | | `-o`, `--org` | The name of the organization that owns the resources | string | | `--org-id` | The ID of the organization that owns the resources | string | -| `-v`, `--version` | Package version | string | {{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/pkg/summary.md b/content/v2.0/reference/cli/influx/pkg/summary.md index d06d32d7e..faecc8318 100644 --- a/content/v2.0/reference/cli/influx/pkg/summary.md +++ b/content/v2.0/reference/cli/influx/pkg/summary.md @@ -17,11 +17,15 @@ influx pkg summary [flags] ## Flags -| Flag | Description | Input Type | -|:---- |:----------- |:---------- | -| `-c`, `--color` | Enable color in output _(default is true) _ | | -| `-f`, `--file` | Package file to summarize | string | -| `-h`, `--help` | Help for the `summary` command | | -| `--table-borders` | Enable table borders _(default is true)_ | | +| Flag | Description | Input Type | +|:---- |:----------- |:---------- | +| `-c`, `--disable-color` | Disable color in output | | +| `--disable-table-borders` | Disable table borders | | +| `-e`, `--encoding` | Encoding of the input stream | string | +| `-f`, `--file` | Package file to summarize | string | +| `-h`, `--help` | Help for the `summary` command | | +| `-R`, `--recurse` | Recurse through files in the directory specified in `-f`, `--file` | | +| `-u`, `--url` | URL of package file to summarize | string | + {{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/pkg/validate.md b/content/v2.0/reference/cli/influx/pkg/validate.md index b6ef70a59..e0c8e0dc2 100644 --- a/content/v2.0/reference/cli/influx/pkg/validate.md +++ b/content/v2.0/reference/cli/influx/pkg/validate.md @@ -17,9 +17,12 @@ influx pkg validate [flags] ## Flags -| Flag | Description | Input Type | -|:---- |:----------- |:---------- | -| `-f`, `--file` | Package file to validate | string | -| `-h`, `--help` | Help for the `validate` command | | +| Flag | Description | Input Type | +|:---- |:----------- |:---------- | +| `-e`, `--encoding` | Encoding of the input stream | string | +| `-f`, `--file` | Package file to validate | string | +| `-h`, `--help` | Help for the `validate` command | | +| `-R`, `--recurse` | Recurse through files in the directory specified in `-f`, `--file` | | +| `-u`, `--url` | URL of package file to validate | string | {{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/secret/_index.md b/content/v2.0/reference/cli/influx/secret/_index.md new file mode 100644 index 000000000..e61f397e2 --- /dev/null +++ b/content/v2.0/reference/cli/influx/secret/_index.md @@ -0,0 +1,32 @@ +--- +title: influx secret – Manage secrets +description: The 'influx secret' command manages secrets. +menu: + v2_0_ref: + name: influx secret + parent: influx +weight: 101 +v2.0/tags: [secrets] +--- + +The `influx secret` command manages secrets. + +## Usage +``` +influx secret [flags] +influx secret [subcommand] +``` + +## Subcommands +| Subcommand | Description | +|:---------- |:----------- | +| [delete](/v2.0/reference/cli/influx/secret/delete/) | Delete a secret | +| [find](/v2.0/reference/cli/influx/secret/find/) | Find secrets | +| [update](/v2.0/reference/cli/influx/secret/update/) | Add or update a secret | + +## Flags +| Flag | Description | +|:---- |:----------- | +| `-h`, `--help` | Help for the `secret` command | + +{{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/secret/delete.md b/content/v2.0/reference/cli/influx/secret/delete.md new file mode 100644 index 000000000..5cb3185b5 --- /dev/null +++ b/content/v2.0/reference/cli/influx/secret/delete.md @@ -0,0 +1,27 @@ +--- +title: influx secret delete +description: The 'influx secret delete' command deletes secrets. +menu: + v2_0_ref: + name: influx secret delete + parent: influx secret +weight: 101 +v2.0/tags: [secrets] +--- + +The `influx secret delete` command deletes secrets. + +## Usage +``` +influx secret delete [flags] +``` + +## Flags +| Flag | Description | Input type | +|:---- |:----------- |:----------:| +| `-h`, `--help` | Help for `secret delete` | | +| `-k`, `--key` | Secret key _**(required)**_ | string | +| `-o`, `--org` | Organization name | string | +| `--org-id` | Organization ID | string | + +{{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/secret/find.md b/content/v2.0/reference/cli/influx/secret/find.md new file mode 100644 index 000000000..7191e2a15 --- /dev/null +++ b/content/v2.0/reference/cli/influx/secret/find.md @@ -0,0 +1,26 @@ +--- +title: influx secret find +description: The 'influx secret find' command lists secret keys. +menu: + v2_0_ref: + name: influx secret find + parent: influx secret +weight: 101 +v2.0/tags: [secrets] +--- + +The `influx secret find` command lists secret keys. + +## Usage +``` +influx secret find [flags] +``` + +## Flags +| Flag | Description | Input type | +|:---- |:----------- |:----------:| +| `-h`, `--help` | Help for `secret find` | | +| `-o`, `--org` | Organization name | string | +| `--org-id` | Organization ID | string | + +{{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/secret/update.md b/content/v2.0/reference/cli/influx/secret/update.md new file mode 100644 index 000000000..cf6f938be --- /dev/null +++ b/content/v2.0/reference/cli/influx/secret/update.md @@ -0,0 +1,29 @@ +--- +title: influx secret update +description: The 'influx secret update' command adds and updates secrets. +menu: + v2_0_ref: + name: influx secret update + parent: influx secret +weight: 101 +v2.0/tags: [secrets] +--- + +The `influx secret update` command adds and updates secrets. +Provide the secret key with the `-k` or `--key` flag. +When prompted, enter and confirm the secret value. + +## Usage +``` +influx secret update [flags] +``` + +## Flags +| Flag | Description | Input type | +|:---- |:----------- |:----------:| +| `-h`, `--help` | Help for `secret update` | | +| `-k`, `--key` | Secret key _**(required)**_ | string | +| `-o`, `--org` | Organization name | string | +| `--org-id` | Organization ID | string | + +{{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/user/_index.md b/content/v2.0/reference/cli/influx/user/_index.md index 5de96de1a..5b0a25675 100644 --- a/content/v2.0/reference/cli/influx/user/_index.md +++ b/content/v2.0/reference/cli/influx/user/_index.md @@ -18,12 +18,13 @@ influx user [command] ``` ## Subcommands -| Subcommand | Description | -|:---------- |:----------- | -| [create](/v2.0/reference/cli/influx/user/create) | Create user | -| [delete](/v2.0/reference/cli/influx/user/delete) | Delete user | -| [find](/v2.0/reference/cli/influx/user/find) | Find user | -| [update](/v2.0/reference/cli/influx/user/update) | Update user | +| Subcommand | Description | +|:---------- |:----------- | +| [create](/v2.0/reference/cli/influx/user/create) | Create a user | +| [delete](/v2.0/reference/cli/influx/user/delete) | Delete a user | +| [find](/v2.0/reference/cli/influx/user/find) | Find a user | +| [password](/v2.0/reference/cli/influx/user/password) | Update a user's password | +| [update](/v2.0/reference/cli/influx/user/update) | Update a user | ## Flags | Flag | Description | diff --git a/content/v2.0/reference/cli/influx/user/password.md b/content/v2.0/reference/cli/influx/user/password.md new file mode 100644 index 000000000..601b9bae3 --- /dev/null +++ b/content/v2.0/reference/cli/influx/user/password.md @@ -0,0 +1,27 @@ +--- +title: influx user password +description: The `influx user password` command updates the password for a user in InfluxDB. +menu: + v2_0_ref: + name: influx user password + parent: influx user +weight: 201 +related: + - /v2.0/users/change-password/ +--- + +The `influx user password` command updates the password for a user in InfluxDB. + +## Usage +``` +influx user password [flags] +``` + +## Flags +| Flag | Description | Input type | +|:---- |:----------- |:----------: | +| `-h`, `--help` | Help for `password` | | +| `-i`, `--id` | The user ID | string | +| `-n`, `--name` | The username | string | + +{{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influxd/_index.md b/content/v2.0/reference/cli/influxd/_index.md index b73470582..8b9406312 100644 --- a/content/v2.0/reference/cli/influxd/_index.md +++ b/content/v2.0/reference/cli/influxd/_index.md @@ -24,6 +24,7 @@ influxd [command] |:------- |:----------- | | [generate](/v2.0/reference/cli/influxd/generate) | Generate time series data sets using TOML schema. | | [inspect](/v2.0/reference/cli/influxd/inspect) | Inspect on-disk database data. | +| [restore](/v2.0/reference/cli/influxd/restore) | Restore data and metadata from a backup file set | | [run](/v2.0/reference/cli/influxd/run) | Start the influxd server _**(default)**_ | | [version](/v2.0/reference/cli/influxd/version) | Output the current version of InfluxDB | diff --git a/content/v2.0/reference/cli/influxd/restore.md b/content/v2.0/reference/cli/influxd/restore.md new file mode 100644 index 000000000..7cc458195 --- /dev/null +++ b/content/v2.0/reference/cli/influxd/restore.md @@ -0,0 +1,48 @@ +--- +title: influxd restore +description: The `influxd restore` command restores backup data and metadata from an InfluxDB backup directory. +v2.0/tags: [restore] +menu: + v2_0_ref: + parent: influxd +weight: 201 +related: + - /v2.0/backup-restore/restore/ +--- + +The `influxd restore` command restores backup data and metadata from an InfluxDB backup directory. + +{{% warn %}} +Shut down the `influxd` server before restoring data. +{{% /warn %}} + +### The restore process +When restoring data from a backup file set, InfluxDB temporarily moves existing +data and metadata while `restore` runs. +After `restore` completes, the temporary data is deleted. +If the restore process fails, InfluxDB preserves the data in the temporary location. + +_For information about recovering from a failed restore process, see +[Restore data](/v2.0/backup-restore/restore/#recover-from-a-failed-restore)._ + +By default, `restore` rebuilds the index and series file using the default options +for [`influxd inspect build-tsi`](/v2.0/reference/cli/influxd/inspect/build-tsi/). +To customize the [`build-tsi` performance options](/v2.0/reference/cli/influxd/inspect/build-tsi/#adjust-performance), +include `--rebuild-index false` with `influxd restore`, then manually run `influxd inspect build-tsi`. + +## Usage + +``` +influxd restore [flags] +``` + +## Flags + +| Flag | Description | Input type | +|:---- |:----------- |:----------:| +| `--bolt-path` | Path to target boltdb database (default is `~/.influxdbv2/influxd.bolt`) | string | +| `--engine-path` | Path to target persistent engine files (default is `~/.influxdbv2/engine`) | string | +| `--credentials-path` | Path to target persistent credentials files (default is `~/.influxdbv2/credentials`) | string | +| `--backup-path` | Path to backup files | string | +| `--rebuild-index` | Rebuild the TSI index and series file based on the `--engine-path` (default is `true`) | | +| `-h`, `--help` | Help for `restore` | | diff --git a/content/v2.0/reference/flux/language/assignment-scope.md b/content/v2.0/reference/flux/language/assignment-scope.md index 2b20f7ce8..bd8448c77 100644 --- a/content/v2.0/reference/flux/language/assignment-scope.md +++ b/content/v2.0/reference/flux/language/assignment-scope.md @@ -33,7 +33,7 @@ An identifier assigned to a variable in a block cannot be reassigned in the same An identifier can be reassigned or shadowed in an inner block. ```js -VariableAssignment = identifier "=" Expression +VariableAssignment = identifier "=" Expression . ``` ##### Examples of variable assignment @@ -55,7 +55,7 @@ f = () => { ## Option assignment ```js -OptionAssignment = "option" [ identifier "." ] identifier "=" Expression +OptionAssignment = "option" [ identifier "." ] identifier "=" Expression . ``` An option assignment creates an option bound to an identifier and gives it a type and a value. diff --git a/content/v2.0/reference/flux/language/expressions.md b/content/v2.0/reference/flux/language/expressions.md index 1dc60a210..db43d3690 100644 --- a/content/v2.0/reference/flux/language/expressions.md +++ b/content/v2.0/reference/flux/language/expressions.md @@ -31,6 +31,7 @@ Literal = int_lit | string_lit | regex_lit | duration_lit + | date_time_lit | pipe_receive_lit | ObjectLiteral | ArrayLiteral @@ -187,8 +188,8 @@ If `obj` contains an entry with property `k`, both `obj.k` and `obj["k"]` return If `obj` does **not** contain an entry with property `k`, both `obj.k` and `obj["k"]` return _null_. ```js -MemberExpression = DotExpression | MemberBracketExpression -DotExpression = "." identifer +MemberExpression = DotExpression | MemberBracketExpression . +DotExpression = "." identifier . MemberBracketExpression = "[" string_lit "]" . ``` @@ -246,16 +247,16 @@ LogicalExpression = UnaryLogicalExpression LogicalOperator = "and" | "or" . UnaryLogicalExpression = ComparisonExpression | UnaryLogicalOperator UnaryLogicalExpression . -UnaryLogicalOperator = "not" | "exists". -ComparisonExpression = MultiplicativeExpression - | ComparisonExpression ComparisonOperator MultiplicativeExpression . +UnaryLogicalOperator = "not" | "exists" . +ComparisonExpression = AdditiveExpression + | ComparisonExpression ComparisonOperator AdditiveExpression . ComparisonOperator = "==" | "!=" | "<" | "<=" | ">" | ">=" | "=~" | "!~" . AdditiveExpression = MultiplicativeExpression | AdditiveExpression AdditiveOperator MultiplicativeExpression . AdditiveOperator = "+" | "-" . MultiplicativeExpression = PipeExpression | MultiplicativeExpression MultiplicativeOperator PipeExpression . -MultiplicativeOperator = "*" | "/" | "%" | "^". +MultiplicativeOperator = "*" | "/" | "%" | "^" . PipeExpression = PostfixExpression | PipeExpression PipeOperator UnaryExpression . PipeOperator = "|>" . diff --git a/content/v2.0/reference/flux/language/statements.md b/content/v2.0/reference/flux/language/statements.md index e3335228b..7a83d5ee8 100644 --- a/content/v2.0/reference/flux/language/statements.md +++ b/content/v2.0/reference/flux/language/statements.md @@ -27,7 +27,7 @@ Statement = OptionAssignment ## Import declaration ```js -ImportDeclaration = "import" [identifier] string_lit +ImportDeclaration = "import" [identifier] string_lit . ``` A package name and an import path is associated with every package. @@ -86,7 +86,7 @@ A named type can be created using a type assignment statement. A named type is equivalent to the type it describes and may be used interchangeably. ```js -TypeAssignment = "type" identifier "=" TypeExpression +TypeAssignment = "type" identifier "=" TypeExpression . TypeExpression = identifier | TypeParameter | ObjectType diff --git a/content/v2.0/reference/flux/language/system-built-ins.md b/content/v2.0/reference/flux/language/system-built-ins.md index de25578e2..ae519868d 100644 --- a/content/v2.0/reference/flux/language/system-built-ins.md +++ b/content/v2.0/reference/flux/language/system-built-ins.md @@ -16,7 +16,7 @@ When a built-in value is not expressible in Flux, its value may be defined by th All such values must have a corresponding builtin statement to declare the existence and type of the built-in value. ```js -BuiltinStatement = "builtin" identifer ":" TypeExpression +BuiltinStatement = "builtin" identifier ":" TypeExpression . ``` ##### Example diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/aggregates/derivative.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/aggregates/derivative.md index fbfebd257..e6ab8db9a 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/aggregates/derivative.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/aggregates/derivative.md @@ -22,7 +22,7 @@ _**Output data type:** Float_ derivative( unit: 1s, nonNegative: false, - column: "_value", + columns: ["_value"], timeSrc: "_time" ) ``` @@ -41,9 +41,9 @@ When set to `true`, if a value is less than the previous value, it is assumed th _**Data type:** Boolean_ -### column -The column to use to compute the derivative. -Defaults to `"_value"`. +### columns +The columns to use to compute the derivative. +Defaults to `["_value"]`. _**Data type:** String_ diff --git a/content/v2.0/reference/glossary.md b/content/v2.0/reference/glossary.md index 0a612a772..3ed8234cb 100644 --- a/content/v2.0/reference/glossary.md +++ b/content/v2.0/reference/glossary.md @@ -836,7 +836,12 @@ The series cardinality would remain unchanged at 6, as `firstname` is already sc Related entries: [field key](#field-key),[measurement](#measurement), [tag key](#tag-key), [tag set](#tag-set) -## series key +### series file + +A file created and used by the [InfluxDB storage engine](/v2.0/reference/internals/storage-engine/) +that contains a set of all series keys across the entire database. + +### series key A series key identifies a particular series by measurement, tag set, and field key. diff --git a/content/v2.0/reference/release-notes/flux.md b/content/v2.0/reference/release-notes/flux.md index b6660262b..0237f0d81 100644 --- a/content/v2.0/reference/release-notes/flux.md +++ b/content/v2.0/reference/release-notes/flux.md @@ -11,11 +11,65 @@ aliases: --- {{% note %}} -_The latest release of InfluxDB v2.0 alpha includes **Flux v0.58.0**. +_The latest release of InfluxDB v2.0 beta includes **Flux v0.59.5**. Though newer versions of Flux may be available, they will not be included with InfluxDB until the next InfluxDB v2.0 release._ {{% /note %}} +## v0.59.5 [2020-01-24] + +### Bug fixes +- Revert window optimizations to fix regression in output row sorting. + +--- + +## v0.59.4 [2020-01-21] + +### Bug fixes +- Remove `tags` line from local tags. +- Handle malformed data as well as EOF. + +--- + +## v0.59.3 [2020-01-16] + +### Bug fixes +- Link both `libflux` and `libstd` for flux-config. + +--- + +## v0.59.2 [2020-01-16] + +### Bug fixes +- Link `libstd` into the lib directory instead of `libflux`. + +--- + +## v0.59.1 [2020-01-16] + +### Bug fixes +- Flux-config correctly copies `stdlib` when using a module. +- UUID security. + +--- + +## v0.59.0 [2020-01-14] + +### Features +- Add Go/Rust API for getting semantic graph.. +- Optimize `limit()` transformation. +- Optimize `group()` transformation. + +### Bug fixes +- AST json serialization glitches. +- Better messaging for malformed CSV. +- Skip stdlib symlink was removed erroneously. +- Ensure stdlib directory is created. +- Correctly skip the stdlib symlink in libflux. +- Ensure that stdlib is present when building with flux-config. + +--- + ## v0.58.4 [2020-01-07] ### Bug fixes diff --git a/content/v2.0/reference/release-notes/influxdb.md b/content/v2.0/reference/release-notes/influxdb.md index 7c7870324..9382a5296 100644 --- a/content/v2.0/reference/release-notes/influxdb.md +++ b/content/v2.0/reference/release-notes/influxdb.md @@ -8,7 +8,39 @@ menu: weight: 101 --- -## v2.0.0-beta.1 [2019-01-08] +## v2.0.0-beta.3 [2020-02-11] + +### Features +- Extend `influx cli pkg command` with ability to take multiple files and directories. +- Extend `influx cli pkg command` with ability to take multiple URLs, files, + directories, and stdin at the same time. +- `influx` CLI can manage secrets. + +### Bug Fixes +- Fix notification rule renaming panics in UI. +- Fix the tooltip for stacked line graphs. +- Fixed false success notification for read-only users creating dashboards. +- Fix issue with pkger/http stack crashing on duplicate content type. + +## v2.0.0-beta.2 [2020-01-24] + +### Features +- Change Influx packages to be CRD compliant. +- Allow trailing newline in credentials file and CLI integration. +- Add support for prefixed cursor search to ForwardCursor types. +- Add backup and restore. +- Introduce resource logger to tasks, buckets and organizations. + +### Bug Fixes +- Check engine closed before collecting index metrics. +- Reject writes which use any of the reserved tag keys. + +### UI Improvements +- Swap `billingURL` with `checkoutURL`. +- Move Cloud navigation to top of page instead of within left side navigation. +- Adjust aggregate window periods to use duration input with validation. + +## v2.0.0-beta.1 [2020-01-08] ### Features - Add support for notification endpoints to `influx` templates and packages. diff --git a/content/v2.0/security/secrets/manage-secrets.md b/content/v2.0/security/secrets/manage-secrets.md deleted file mode 100644 index 9b4054267..000000000 --- a/content/v2.0/security/secrets/manage-secrets.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: Manage secrets -description: Manage secrets in InfluxDB with the InfluxDB API. -v2.0/tags: [secrets, security] -menu: - v2_0: - parent: Store and use secrets -weight: 201 ---- - - -Manage secrets using the InfluxDB `/org/{orgID}/secrets` API endpoint. -All secrets belong to an organization and are stored in your [secret-store](/v2.0/security/secrets/). -Include your [organization ID](/v2.0/organizations/view-orgs/#view-your-organization-id) -and [authentication token](/v2.0/security/tokens/view-tokens/) with each request. - -### Add a secret -Use the `PATCH` request method to add a new secret to your organization. -Pass the secret key-value pair in the request body. - -```sh -curl -XPATCH http://localhost:9999/api/v2/orgs//secrets \ - -H 'authorization: Token YOURAUTHTOKEN' \ - -H 'Content-type: application/json' \ - --data '{ - "": "" -}' -``` - -### View secret keys -Use the `GET` request method to view your organization's secrets keys. - -```sh -curl -XGET http://localhost:9999/api/v2/orgs//secrets \ - -H 'authorization: Token YOURAUTHTOKEN' -``` - -### Delete a secret -Use the `POST` request method and the `orgs/{orgID}/secrets/delete` API endpoint -to delete one or more secrets. -Include an array of secret keys to delete in the requests body in the following format. - -```bash -curl -XGET http://localhost:9999/api/v2/orgs//secrets/delete \ - --H 'authorization: Token YOURAUTHTOKEN' - --data '{ - "secrets": [ - "" - ] -}' -``` - -## Use secrets in a query -Import the `influxdata/influxd/secrets` package and use the `secrets.get()` function -to populate sensitive data in queries with secrets from your secret store. - -```js -import "influxdata/influxdb/secrets" -import "sql" - -username = secrets.get(key: "POSTGRES_USERNAME") -password = secrets.get(key: "POSTGRES_PASSWORD") - -sql.from( - driverName: "postgres", - dataSourceName: "postgresql://${username}:${password}@localhost", - query:"SELECT * FROM example-table" -) -``` diff --git a/content/v2.0/security/secrets/manage-secrets/_index.md b/content/v2.0/security/secrets/manage-secrets/_index.md new file mode 100644 index 000000000..6f7723252 --- /dev/null +++ b/content/v2.0/security/secrets/manage-secrets/_index.md @@ -0,0 +1,34 @@ +--- +title: Manage secrets +description: Manage secrets in InfluxDB with the InfluxDB API. +v2.0/tags: [secrets, security] +menu: + v2_0: + parent: Store and use secrets +weight: 201 +--- + +Manage secrets using the [`influx` command line interface (CLI)](/v2.0/reference/cli/influx/) or the InfluxDB API. +All secrets belong to an organization and are stored in your [secret-store](/v2.0/security/secrets/). + +{{< children >}} + +--- + +## Use secrets in a query +Import the `influxdata/influxd/secrets` package and use the `secrets.get()` function +to populate sensitive data in queries with secrets from your secret store. + +```js +import "influxdata/influxdb/secrets" +import "sql" + +username = secrets.get(key: "POSTGRES_USERNAME") +password = secrets.get(key: "POSTGRES_PASSWORD") + +sql.from( + driverName: "postgres", + dataSourceName: "postgresql://${username}:${password}@localhost", + query:"SELECT * FROM example-table" +) +``` diff --git a/content/v2.0/security/secrets/manage-secrets/add.md b/content/v2.0/security/secrets/manage-secrets/add.md new file mode 100644 index 000000000..4bdcefa25 --- /dev/null +++ b/content/v2.0/security/secrets/manage-secrets/add.md @@ -0,0 +1,45 @@ +--- +title: Add secrets +description: Add secrets using the `influx` CLI or the InfluxDB API. +v2.0/tags: [secrets, security] +menu: + v2_0: + parent: Manage secrets +weight: 301 +--- + +Add secrets using the `influx` command line interface (CLI) or the InfluxDB API. + +## Add a secret using the influx CLI +Use the [`influx secret update` command](/v2.0/reference/cli/influx/secret/update/) +to add a new secret to your organization. +Provide the secret key with the `-k` or `--key` flag. +When prompted, enter and confirm the secret value. + +```sh +# Syntax +influx secret update -k + +# Example +influx secret update -k foo +``` + +## Add a secret using the InfluxDB API +Use the `PATCH` request method and the `/orgs/{orgID}/secrets` API endpoint to +add a new secret to your organization. + +**Include the following:** + +- Your [organization ID](/v2.0/organizations/view-orgs/#view-your-organization-id) in the request URL +- Your [authentication token](/v2.0/security/tokens/view-tokens/) in the `Authorization` header +- The secret key-value pair in the request body + + +```sh +curl -XPATCH http://localhost:9999/api/v2/orgs//secrets \ + -H 'Authorization: Token YOURAUTHTOKEN' \ + -H 'Content-type: application/json' \ + --data '{ + "": "" +}' +``` diff --git a/content/v2.0/security/secrets/manage-secrets/delete.md b/content/v2.0/security/secrets/manage-secrets/delete.md new file mode 100644 index 000000000..9a25fa035 --- /dev/null +++ b/content/v2.0/security/secrets/manage-secrets/delete.md @@ -0,0 +1,45 @@ +--- +title: Delete secrets +description: Delete secrets using the `influx` CLI or the InfluxDB API. +v2.0/tags: [secrets, security] +menu: + v2_0: + parent: Manage secrets +weight: 304 +--- + +Delete secrets using the `influx` command line interface (CLI) or the InfluxDB API. + +## Delete a secret using the influx CLI +Use the [`influx secret delete` command](/v2.0/reference/influx/secret/delete/) +to delete a secret key-value pair from your organization. +Provide the secret key to delete with the `-k` or `--key` flag. + +```sh +# Syntax +influx secret delete -k + +# Example +influx secret delete -k foo +``` + +## Delete secrets using the InfluxDB API +Use the `POST` request method and the `orgs/{orgID}/secrets/delete` API endpoint +to delete one or more secrets. + +**Include the following:** + +- Your [organization ID](/v2.0/organizations/view-orgs/#view-your-organization-id) in the request URL +- Your [authentication token](/v2.0/security/tokens/view-tokens/) in the `Authorization` header +- An array of secret keys to delete in the request body + + +```bash +curl -XGET http://localhost:9999/api/v2/orgs//secrets/delete \ + --H 'Authorization: Token YOURAUTHTOKEN' + --data '{ + "secrets": [ + "" + ] +}' +``` diff --git a/content/v2.0/security/secrets/manage-secrets/update.md b/content/v2.0/security/secrets/manage-secrets/update.md new file mode 100644 index 000000000..0ea92e509 --- /dev/null +++ b/content/v2.0/security/secrets/manage-secrets/update.md @@ -0,0 +1,45 @@ +--- +title: Update secrets +description: Update secrets using the `influx` CLI or the InfluxDB API. +v2.0/tags: [secrets, security] +menu: + v2_0: + parent: Manage secrets +weight: 303 +--- + +Update secrets using the `influx` command line interface (CLI) or the InfluxDB API. + +## Update a secret using the influx CLI +Use the [`influx secret update` command](/v2.0/reference/cli/influx/secret/update/) +to update a secret in your organization. +Provide the secret key to update with the `-k` or `--key` flag. +When prompted, enter and confirm the secret value. + +```sh +# Syntax +influx secret update -k + +# Example +influx secret update -k foo +``` + +## Update a secret using the InfluxDB API +Use the `PATCH` request method and the InfluxDB `/orgs/{orgID}/secrets` API endpoint +to update a secret in your organization. + +**Include the following:** + +- Your [organization ID](/v2.0/organizations/view-orgs/#view-your-organization-id) in the request URL +- Your [authentication token](/v2.0/security/tokens/view-tokens/) in the `Authorization` header +- The updated secret key-value pair in the request body + + +```sh +curl -XPATCH http://localhost:9999/api/v2/orgs//secrets \ + -H 'Authorization: Token YOURAUTHTOKEN' \ + -H 'Content-type: application/json' \ + --data '{ + "": "" +}' +``` diff --git a/content/v2.0/security/secrets/manage-secrets/view.md b/content/v2.0/security/secrets/manage-secrets/view.md new file mode 100644 index 000000000..b14fdd0bb --- /dev/null +++ b/content/v2.0/security/secrets/manage-secrets/view.md @@ -0,0 +1,34 @@ +--- +title: View secret keys +description: View secret keys using the `influx` CLI or the InfluxDB API. +v2.0/tags: [secrets, security] +menu: + v2_0: + parent: Manage secrets +weight: 302 +--- + +View secret keys using the `influx` command line interface (CLI) or the InfluxDB API. + +## View secret keys using the influx CLI +Use the [`influx secret find` command](/v2.0/reference/cli/influx/secret/find/) +to list your organization's secret keys. + +```sh +influx secret find +``` + +## View secret keys using the InfluxDB API +Use the `GET` request method and the InfluxDB `/orgs/{orgID}/secrets` API endpoint +to view your organization's secrets keys. + +**Include the following:** + +- Your [organization ID](/v2.0/organizations/view-orgs/#view-your-organization-id) in the request URL +- Your [authentication token](/v2.0/security/tokens/view-tokens/) in the `Authorization` header + + +```sh +curl -XGET http://localhost:9999/api/v2/orgs//secrets \ + -H 'Authorization: Token YOURAUTHTOKEN' +``` diff --git a/content/v2.0/security/tokens/create-token.md b/content/v2.0/security/tokens/create-token.md index 0352c5a6c..683e830dd 100644 --- a/content/v2.0/security/tokens/create-token.md +++ b/content/v2.0/security/tokens/create-token.md @@ -35,7 +35,7 @@ Include flags with the command to grant specific permissions to the token. See the [available flags](/v2.0/reference/cli/influx/auth/create#flags). ```sh -# Pattern +# Syntax influx auth create -o [permission-flags] # Example diff --git a/content/v2.0/security/tokens/delete-token.md b/content/v2.0/security/tokens/delete-token.md index b96e308af..e7ea5fb89 100644 --- a/content/v2.0/security/tokens/delete-token.md +++ b/content/v2.0/security/tokens/delete-token.md @@ -32,7 +32,7 @@ to delete a token. _This command requires an auth ID, which is available in the output of `influx auth find`._ ```sh -# Pattern +# Syntax influx auth delete -i # Example diff --git a/content/v2.0/users/change-password.md b/content/v2.0/users/change-password.md new file mode 100644 index 000000000..374f6554f --- /dev/null +++ b/content/v2.0/users/change-password.md @@ -0,0 +1,35 @@ +--- +title: Change your password +seotitle: Change your password in InfluxDB +description: Change your password in InfluxDB using the influx CLI. +menu: + v2_0: + name: Change your password + parent: Manage users +weight: 105 +--- + +Use `influx` command line interface (CLI) to update your password. + +{{% note %}} +User passwords cannot be updated in the InfluxDB UI. +{{% /note %}} + +## Change your password using the influx CLI + +Use the [`influx user password` command](/v2.0/reference/cli/influx/user/password) +to update a password for a user. To update a password, you need the following: + +- Username or user ID _(provided in the output of `influx user find`)_ +- New password + +##### Update a password +```sh +# Syntax +influx user password -n + +# Example +influx user password -n johndoe +``` + +When prompted, enter and confirm the new password. diff --git a/content/v2.0/users/create-user.md b/content/v2.0/users/create-user.md index 2343be7ad..04bfbc708 100644 --- a/content/v2.0/users/create-user.md +++ b/content/v2.0/users/create-user.md @@ -28,7 +28,7 @@ and include the following: [`influx org find`](/v2.0/reference/cli/influx/org/find/))_ ```sh -# Pattern +# Syntax influx user create -n -o # Example @@ -45,7 +45,7 @@ include a password and organization ID with the `influx user create` command. - Password ```sh -# Pattern +# Syntax influx user create -n -p -o # Example diff --git a/content/v2.0/users/delete-user.md b/content/v2.0/users/delete-user.md index 8aad48dc4..ea05e6b81 100644 --- a/content/v2.0/users/delete-user.md +++ b/content/v2.0/users/delete-user.md @@ -32,7 +32,7 @@ to delete a user. Deleting a user requires the following: - The user ID _(provided in the output of `influx user find`)_ ```sh -# Pattern +# Syntax influx user delete -i # Example diff --git a/content/v2.0/users/update-user.md b/content/v2.0/users/update-user.md index 2d696b099..83927a7f9 100644 --- a/content/v2.0/users/update-user.md +++ b/content/v2.0/users/update-user.md @@ -27,7 +27,7 @@ to update a user. Updating a user requires the following: ##### Update the name of a user ```sh -# Pattern +# Syntax influx user update -i -n # Example diff --git a/content/v2.0/visualize-data/explore-metrics.md b/content/v2.0/visualize-data/explore-metrics.md index deb754251..663a3af1e 100644 --- a/content/v2.0/visualize-data/explore-metrics.md +++ b/content/v2.0/visualize-data/explore-metrics.md @@ -30,13 +30,17 @@ See [Get started with Flux](/v2.0/query-data/get-started) to learn more about Fl {{< nav-icon "data-explorer" >}} -2. Use the Flux builder in the bottom panel to select a bucket and filters such as measurement, field or tag. - Alternatively, click **Script Editor** to manually edit the query. +2. Use the Flux builder in the bottom panel to create a Flux query: + - Select a bucket to define your data source. + - Edit your time range with the [time range option](/select-time-range/) in the dropdown menu. + - Add filters to narrow your data by selecting attributes or columns in the dropdown menu. + - Select **Group** from the **Filter** dropdown menu to group data into tables. For more about how grouping data in Flux works, see [Group data](/v2.0/query-data/guides/group-data/). +3. Alternatively, click **Script Editor** to manually edit the query. To switch back to the query builder, click **Query Builder**. Note that your updates from the Script Editor will not be saved. -3. Use the **Functions** list to review the available Flux functions. +4. Use the **Functions** list to review the available Flux functions. Click on a function from the list to add it to your query. -4. Click **Submit** (or press `Control+Enter`) to run your query. You can then preview your graph in the above pane. -5. To work on multiple queries at once, click the {{< icon "plus" >}} to add another tab. +5. Click **Submit** (or press `Control+Enter`) to run your query. You can then preview your graph in the above pane. +6. To work on multiple queries at once, click the {{< icon "plus" >}} to add another tab. * Click the eye icon on a tab to hide or show a query's visualization. * Click on the name of the query in the tab to rename it.