commit
8b284f13c1
|
|
@ -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:
|
||||
|
|
@ -7139,18 +7145,24 @@ components:
|
|||
type: string
|
||||
package:
|
||||
$ref: "#/components/schemas/Pkg"
|
||||
packages:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/Pkg"
|
||||
secrets:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
remote:
|
||||
type: object
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
contentType:
|
||||
type: string
|
||||
required: ["url"]
|
||||
remotes:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
contentType:
|
||||
type: string
|
||||
required: ["url"]
|
||||
PkgCreate:
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -7284,6 +7296,10 @@ components:
|
|||
type: string
|
||||
labelID:
|
||||
type: string
|
||||
missingEnvRefs:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
missingSecrets:
|
||||
type: array
|
||||
items:
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb_2.0.0-beta.2_darwin_amd64.tar.gz" download>InfluxDB v2.0 beta (macOS)</a>
|
||||
<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb_2.0.0-beta.3_darwin_amd64.tar.gz" download>InfluxDB v2.0 beta (macOS)</a>
|
||||
|
||||
### 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.2_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.2_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.
|
||||
|
||||
<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb_2.0.0-beta.2_linux_amd64.tar.gz" download >InfluxDB v2.0 beta (amd64)</a>
|
||||
<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb_2.0.0-beta.2_linux_arm64.tar.gz" download >InfluxDB v2.0 beta (arm)</a>
|
||||
<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb_2.0.0-beta.3_linux_amd64.tar.gz" download >InfluxDB v2.0 beta (amd64)</a>
|
||||
<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb_2.0.0-beta.3_linux_arm64.tar.gz" download >InfluxDB v2.0 beta (arm)</a>
|
||||
|
||||
### 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.2_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.2_linux_amd64/{influx,influxd} /usr/local/bin/
|
||||
sudo cp influxdb_2.0.0-beta.3_linux_amd64/{influx,influxd} /usr/local/bin/
|
||||
```
|
||||
|
||||
{{% note %}}
|
||||
|
|
|
|||
|
|
@ -55,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 |
|
||||
|
|
|
|||
|
|
@ -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`, `--disable-color` | Disable color in output | |
|
||||
| `-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 |
|
||||
| `--disable-table-borders` | Disable table borders | |
|
||||
| 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 %}}
|
||||
|
|
|
|||
|
|
@ -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 %}}
|
||||
|
|
|
|||
|
|
@ -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 %}}
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
---
|
||||
title: influx pkg new
|
||||
description: >
|
||||
The 'influx pkg new' command creates a reusable package that create resources
|
||||
in a declarative manner.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
parent: influx pkg
|
||||
weight: 101
|
||||
---
|
||||
|
||||
The `influx pkg new` command creates a reusable package that create resources in
|
||||
a declarative manner.
|
||||
|
||||
## Usage
|
||||
```
|
||||
influx pkg new [flags]
|
||||
```
|
||||
|
||||
## 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 `new` command | |
|
||||
| `-n`, `--name` | Package name | string |
|
||||
| `-q`, `--quiet` | Skip interactive mode | |
|
||||
| `-v`, `--version` | Package version | string |
|
||||
|
||||
{{% influx-cli-global-flags %}}
|
||||
|
|
@ -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 %}}
|
||||
|
|
|
|||
|
|
@ -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 %}}
|
||||
|
|
|
|||
|
|
@ -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 %}}
|
||||
|
|
@ -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 %}}
|
||||
|
|
@ -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 %}}
|
||||
|
|
@ -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 %}}
|
||||
|
|
@ -8,6 +8,20 @@ menu:
|
|||
weight: 101
|
||||
---
|
||||
|
||||
## 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
|
||||
|
|
|
|||
|
|
@ -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/<org-id>/secrets \
|
||||
-H 'authorization: Token YOURAUTHTOKEN' \
|
||||
-H 'Content-type: application/json' \
|
||||
--data '{
|
||||
"<secret-key>": "<secret-value>"
|
||||
}'
|
||||
```
|
||||
|
||||
### View secret keys
|
||||
Use the `GET` request method to view your organization's secrets keys.
|
||||
|
||||
```sh
|
||||
curl -XGET http://localhost:9999/api/v2/orgs/<org-id>/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/<org-id>/secrets/delete \
|
||||
--H 'authorization: Token YOURAUTHTOKEN'
|
||||
--data '{
|
||||
"secrets": [
|
||||
"<secret-key>"
|
||||
]
|
||||
}'
|
||||
```
|
||||
|
||||
## 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"
|
||||
)
|
||||
```
|
||||
|
|
@ -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"
|
||||
)
|
||||
```
|
||||
|
|
@ -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 <secret-key>
|
||||
|
||||
# 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/<org-id>/secrets \
|
||||
-H 'Authorization: Token YOURAUTHTOKEN' \
|
||||
-H 'Content-type: application/json' \
|
||||
--data '{
|
||||
"<secret-key>": "<secret-value>"
|
||||
}'
|
||||
```
|
||||
|
|
@ -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 <secret-key>
|
||||
|
||||
# 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/<org-id>/secrets/delete \
|
||||
--H 'Authorization: Token YOURAUTHTOKEN'
|
||||
--data '{
|
||||
"secrets": [
|
||||
"<secret-key>"
|
||||
]
|
||||
}'
|
||||
```
|
||||
|
|
@ -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 <secret-key>
|
||||
|
||||
# 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/<org-id>/secrets \
|
||||
-H 'Authorization: Token YOURAUTHTOKEN' \
|
||||
-H 'Content-type: application/json' \
|
||||
--data '{
|
||||
"<secret-key>": "<secret-value>"
|
||||
}'
|
||||
```
|
||||
|
|
@ -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/<org-id>/secrets \
|
||||
-H 'Authorization: Token YOURAUTHTOKEN'
|
||||
```
|
||||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue