resolved merge conflicts
commit
8447307db3
|
@ -117,6 +117,7 @@
|
|||
"article/tags",
|
||||
"article/telegraf-plugins",
|
||||
"article/truncate",
|
||||
"article/video",
|
||||
"article/warn";
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
.video {
|
||||
width: 100%;
|
||||
max-width: 620px;
|
||||
margin: 2rem 0;
|
||||
}
|
|
@ -13,4 +13,6 @@ menu:
|
|||
Collaborate with others using these features.
|
||||
By default, each user has full permissions on resources in your organization.
|
||||
|
||||
{{< youtube Qg7Zs3uM_wo >}}
|
||||
|
||||
{{< children >}}
|
||||
|
|
|
@ -88,6 +88,105 @@ References to the InfluxDB user interface (UI) or localhost:9999 refer to your
|
|||
{{< cloud-name >}} UI.
|
||||
{{% /cloud %}}
|
||||
|
||||
### (Optional) Download and install the influx CLI
|
||||
|
||||
To use the `influx` CLI to manage and interact with your InfluxDB Cloud instance, complete the following steps:
|
||||
|
||||
{{< tabs-wrapper >}}
|
||||
{{% tabs %}}
|
||||
[macOS](#)
|
||||
[Linux](#)
|
||||
{{% /tabs %}}
|
||||
|
||||
<!-------------------------------- BEGIN macOS -------------------------------->
|
||||
{{% tab-content %}}
|
||||
|
||||
#### Download influx CLI for macOS
|
||||
|
||||
Click the following button to download and install `influx` CLI for macOS.
|
||||
|
||||
<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb_client_2.0.0-beta.12_darwin_amd64.tar.gz" download>influx CLI (macOS)</a>
|
||||
|
||||
#### Unpackage the influx binary
|
||||
|
||||
**Note:** The commands below are examples. Adjust the file names, paths, and utilities to your own needs.
|
||||
|
||||
To unpackage the downloaded archive, **double click the archive file in Finder**
|
||||
or run the following command in a macOS command prompt application such
|
||||
**Terminal** or **[iTerm2](https://www.iterm2.com/)**:
|
||||
|
||||
```sh
|
||||
# Unpackage contents to the current working directory
|
||||
tar zxvf ~/Downloads/influxdb_client_2.0.0-beta.12_darwin_amd64.tar.gz
|
||||
```
|
||||
|
||||
#### (Optional) Place the binary in your $PATH
|
||||
|
||||
If you choose, you can place `influx` in your `$PATH` or you can
|
||||
prefix the executable with `./` to run in place. If the binary is on your $PATH, you can run `influx` from any directory. Otherwise, you must specify the location of the CLI (for example, `./influx`or `path/to/influx`).
|
||||
|
||||
**Note:** If you have the 1.x binary on your $PATH, moving the 2.0 binary to your $PATH will overwrite the 1.x binary because they have the same name.
|
||||
|
||||
```sh
|
||||
# Copy the influx binary to your $PATH
|
||||
sudo cp influxdb_client_2.0.0-beta.12_darwin_amd64/influx /usr/local/bin/
|
||||
```
|
||||
|
||||
{{% note %}}
|
||||
If you rename the binary, all references to `influx` in this documentation refer to the renamed binary.
|
||||
{{% /note %}}
|
||||
|
||||
##### Run influx CLI on macOS Catalina
|
||||
|
||||
If you're running `influx` on macOS Catalina, you must [manually authorize the InfluxDB binaries](/v2.0/get-started/#run-influxdb-on-macos-catalina).
|
||||
|
||||
Now, you're ready to [Use the influx CLI](#use-the-influx-cli).
|
||||
|
||||
{{% /tab-content %}}
|
||||
<!--------------------------------- END macOS --------------------------------->
|
||||
|
||||
<!-------------------------------- BEGIN Linux -------------------------------->
|
||||
{{% tab-content %}}
|
||||
|
||||
#### Download influx CLI for Linux
|
||||
|
||||
Click one of the following buttons to download and install the `influx` CLI appropriate for your chipset.
|
||||
|
||||
<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb_client_2.0.0-beta.12_linux_amd64.tar.gz" download >influx CLI (amd64)</a>
|
||||
<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb_client_2.0.0-beta.12_linux_arm64.tar.gz" download >influx CLI (arm)</a>
|
||||
|
||||
#### Unpackage the influx binary
|
||||
|
||||
**Note:** The commands below are examples. Adjust the file names, paths, and utilities to your own needs.
|
||||
|
||||
```sh
|
||||
# Unpackage contents to the current working directory
|
||||
tar xvfz influxdb_client_2.0.0-beta.12_linux_amd64.tar.gz
|
||||
```
|
||||
|
||||
#### (Optional) Place the binary in your $PATH
|
||||
|
||||
If you choose, you can place `influx` in your `$PATH` or you can
|
||||
prefix the executable with `./` to run in place. If the binary is on your $PATH, you can run `influx` from any directory. Otherwise, you must specify the location of the CLI (for example, `./influx`or `path/to/influx`).
|
||||
|
||||
**Note:** If you have the 1.x binary on your $PATH, moving the 2.0 binary to your $PATH will overwrite the 1.x binary because they have the same name.
|
||||
|
||||
```sh
|
||||
# Copy the influx and influxd binary to your $PATH
|
||||
sudo cp influxdb_client_2.0.0-beta.12_linux_amd64/influx /usr/local/bin/
|
||||
```
|
||||
|
||||
{{% note %}}
|
||||
If you rename the binary, all references to `influx` in this documentation refer to the renamed binary.
|
||||
{{% /note %}}
|
||||
|
||||
Now, you're ready to [Use the influx CLI](#use-the-influx-cli).
|
||||
|
||||
{{% /tab-content %}}
|
||||
<!--------------------------------- END Linux --------------------------------->
|
||||
|
||||
{{< /tabs-wrapper >}}
|
||||
|
||||
### Sign in
|
||||
|
||||
Sign in to [InfluxDB Cloud 2.0](https://cloud2.influxdata.com) using your email address and password.
|
||||
|
@ -95,6 +194,7 @@ Sign in to [InfluxDB Cloud 2.0](https://cloud2.influxdata.com) using your email
|
|||
<a class="btn" href="https://cloud2.influxdata.com">Sign in to InfluxDB Cloud 2.0 now</a>
|
||||
|
||||
### Start working with your time series data
|
||||
|
||||
With {{< cloud-name "short" >}} setup, see [Next steps](#next-steps) for what to do next.
|
||||
|
||||
---
|
||||
|
@ -115,11 +215,13 @@ executables, and running the initial setup process.
|
|||
<!-------------------------------- BEGIN macOS -------------------------------->
|
||||
{{% tab-content %}}
|
||||
### 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.12_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**
|
||||
or run the following command in a macOS command prompt application such
|
||||
**Terminal** or **[iTerm2](https://www.iterm2.com/)**:
|
||||
|
@ -130,6 +232,7 @@ tar zxvf ~/Downloads/influxdb_2.0.0-beta.12_darwin_amd64.tar.gz
|
|||
```
|
||||
|
||||
#### (Optional) Place the binaries in your $PATH
|
||||
|
||||
If you choose, you can place `influx` and `influxd` in your `$PATH` or you can
|
||||
prefix the executables with `./` to run then in place.
|
||||
|
||||
|
@ -146,10 +249,12 @@ If you rename the binaries, all references to `influx` and `influxd` in this doc
|
|||
{{% /note %}}
|
||||
|
||||
#### Networking ports
|
||||
|
||||
By default, InfluxDB uses TCP port `9999` for client-server communication over
|
||||
the [InfluxDB HTTP API](/v2.0/reference/api/).
|
||||
|
||||
### Start InfluxDB
|
||||
|
||||
Start InfluxDB by running the `influxd` daemon:
|
||||
|
||||
```bash
|
||||
|
@ -157,6 +262,7 @@ influxd
|
|||
```
|
||||
{{% warn %}}
|
||||
#### Run InfluxDB on macOS Catalina
|
||||
|
||||
macOS Catalina requires downloaded binaries to be signed by registered Apple developers.
|
||||
Currently, when you first attempt to run `influxd` or `influx`, macOS will prevent it from running.
|
||||
To manually authorize the InfluxDB binaries:
|
||||
|
@ -179,6 +285,7 @@ To install `influx` shell completion scripts, see [`influx completion`](/v2.0/re
|
|||
|
||||
{{% note %}}
|
||||
#### InfluxDB "phone home"
|
||||
|
||||
By default, InfluxDB sends telemetry data back to InfluxData.
|
||||
The [InfluxData telemetry](https://www.influxdata.com/telemetry) page provides
|
||||
information about what data is collected and how it is used.
|
||||
|
@ -197,12 +304,14 @@ influxd --reporting-disabled
|
|||
<!-------------------------------- BEGIN Linux -------------------------------->
|
||||
{{% tab-content %}}
|
||||
### 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.12_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.12_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`.
|
||||
|
||||
_**Note:** The following commands are examples. Adjust the file names, paths, and utilities to your own needs._
|
||||
|
@ -223,10 +332,12 @@ If you rename the binaries, all references to `influx` and `influxd` in this doc
|
|||
{{% /note %}}
|
||||
|
||||
#### Networking ports
|
||||
|
||||
By default, InfluxDB uses TCP port `9999` for client-server communication over
|
||||
the [InfluxDB HTTP API](/v2.0/reference/api/).
|
||||
|
||||
### Start InfluxDB
|
||||
|
||||
Start InfluxDB by running the `influxd` daemon:
|
||||
|
||||
```bash
|
||||
|
@ -242,6 +353,7 @@ To install `influx` shell completion scripts, see [`influx completion`](/v2.0/re
|
|||
|
||||
{{% note %}}
|
||||
#### InfluxDB "phone home"
|
||||
|
||||
By default, InfluxDB sends telemetry data back to InfluxData.
|
||||
The [InfluxData telemetry](https://www.influxdata.com/telemetry) page provides
|
||||
information about what data is collected and how it is used.
|
||||
|
@ -260,6 +372,7 @@ influxd --reporting-disabled
|
|||
<!-------------------------------- BEGIN Docker ------------------------------->
|
||||
{{% tab-content %}}
|
||||
### Download and run InfluxDB v2.0 beta
|
||||
|
||||
Use `docker run` to download and run the InfluxDB v2.0 beta Docker image.
|
||||
Expose port `9999`, which InfluxDB uses for client-server communication over
|
||||
the [InfluxDB HTTP API](/v2.0/reference/api/).
|
||||
|
@ -271,6 +384,7 @@ _To run InfluxDB in [detached mode](https://docs.docker.com/engine/reference/run
|
|||
|
||||
{{% note %}}
|
||||
#### InfluxDB "phone home"
|
||||
|
||||
By default, InfluxDB sends telemetry data back to InfluxData.
|
||||
The [InfluxData telemetry](https://www.influxdata.com/telemetry) page provides
|
||||
information about what data is collected and how it is used.
|
||||
|
@ -284,6 +398,7 @@ docker run -p 9999:9999 quay.io/influxdb/influxdb:2.0.0-beta --reporting-disable
|
|||
{{% /note %}}
|
||||
|
||||
### Console into the InfluxDB Container (Optional)
|
||||
|
||||
To use the `influx` command line interface, console into the `influxdb` Docker container:
|
||||
|
||||
```bash
|
||||
|
@ -351,6 +466,7 @@ The instructions below use Minikube, but the steps should be similar in any Kube
|
|||
{{< /tabs-wrapper >}}
|
||||
|
||||
## Set up InfluxDB
|
||||
|
||||
The initial setup process for InfluxDB walks through creating a default organization,
|
||||
user, and bucket.
|
||||
The setup process is available in both the InfluxDB user interface (UI) and in
|
||||
|
@ -381,8 +497,9 @@ InfluxDB is now initialized with a primary user, organization, and bucket.
|
|||
You are ready to [write or collect data](/v2.0/write-data).
|
||||
|
||||
{{% note %}}
|
||||
#### Using the influx CLI after setting up InfluxDB through the UI
|
||||
To use the [`influx` CLI](/v2.0/reference/cli/influx) after setting up InfluxDB through the UI, provide your [authentication token](/v2.0/users/tokens/), which is automatically generated during the setup process. For instructions on viewing your token via CLI or UI, see [View tokens](/v2.0/security/tokens/view-tokens/).
|
||||
#### Use the influx CLI
|
||||
|
||||
To use the [`influx` CLI](/v2.0/reference/cli/influx) after setting up InfluxDB, provide your [authentication token](/v2.0/users/tokens/), which is automatically generated during the setup process. For instructions on viewing your token via CLI or UI, see [View tokens](/v2.0/security/tokens/view-tokens/).
|
||||
|
||||
Use one of the following methods to provide your authentication token to the CLI:
|
||||
|
||||
|
@ -404,6 +521,7 @@ retrieving authentication tokens._
|
|||
<!------------------------------ BEGIN CLI Setup ------------------------------>
|
||||
{{% tab-content %}}
|
||||
### Set up InfluxDB through the influx CLI
|
||||
|
||||
Begin the InfluxDB setup process via the `influx` CLI by running:
|
||||
|
||||
```bash
|
||||
|
@ -415,11 +533,10 @@ influx setup
|
|||
3. **Confirm your password** by entering it again.
|
||||
4. Enter a name for your **primary organization**.
|
||||
5. Enter a name for your **primary bucket**.
|
||||
6. Enter a **retention period** (in hours) for your primary bucket.
|
||||
Enter nothing for an infinite retention period.
|
||||
6. Enter a **retention period** for your primary bucket—valid units are nanoseconds (`ns`), microseconds (`us` or `µs`), milliseconds (`ms`), seconds (`s`), minutes (`m`), hours (`h`), days (`d`), and weeks (`w`). Enter nothing for an infinite retention period.
|
||||
7. Confirm the details for your primary user, organization, and bucket.
|
||||
|
||||
InfluxDB is now initialized with a primary user, organization, bucket, and authentication token. It has also create a config profile for you so that you don't have to add organization and token to every command. To view that config profile, use the [`influx config list`](/v2.0/reference/cli/influx/config) command.
|
||||
InfluxDB is now initialized with a primary user, organization, bucket, and authentication token. InfluxDB also creates a configuration profile for you so that you don't have to add organization and token to every command. To view that config profile, use the [`influx config list`](/v2.0/reference/cli/influx/config) command.
|
||||
|
||||
To continue to use InfluxDB via the CLI, you need the authentication token created during setup. To view the token, log into the UI with the credentials created above. (For instructions, see [View tokens in the InfluxDB UI](/v2.0/security/tokens/view-tokens/#view-tokens-in-the-influxdb-ui).)
|
||||
|
||||
|
@ -463,7 +580,7 @@ For information about using the InfluxDB v2 API, `influx` CLI, and client librar
|
|||
see [Write data to InfluxDB](/v2.0/write-data/).
|
||||
|
||||
#### Demo data
|
||||
If using **{{< cloud-name "short" >}}**, [add a demo data bucket](/v2.0/write-data/sample-data/demo-data/)
|
||||
If using **{{< cloud-name "short" >}}**, [add a demo data bucket](/v2.0/reference/sample-data/#influxdb-cloud-demo-data)
|
||||
for quick, **free** access to time series data.
|
||||
|
||||
### Query data
|
||||
|
|
|
@ -13,8 +13,17 @@ from dashboards and Telegraf configurations to notifications and alerts.
|
|||
Use InfluxDB templates to quickly set up a fresh instance of InfluxDB, back up your
|
||||
dashboard configuration, or share your configuration with the InfluxData community.
|
||||
|
||||
**InfluxDB templates do the following:**
|
||||
|
||||
- Reduce setup time
|
||||
- Facilitate secure, portable, source-controlled InfluxDB platform states.
|
||||
- Simplify sharing and using pre-built InfluxDB solutions.
|
||||
|
||||
{{< youtube 2JjW4Rym9XE >}}
|
||||
|
||||
## Template manifests
|
||||
A template is defined in a single file known as a **manifest**.
|
||||
A template consists of a single file known as a **manifest** that defines the
|
||||
InfluxDB state and associated [resources](#template-resources).
|
||||
Template manifests support the following formats:
|
||||
|
||||
- [YAML](https://yaml.org/)
|
||||
|
@ -26,6 +35,11 @@ Template manifests are compatible with
|
|||
[Kubernetes Custom Resource Definitions (CRD)](https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/).
|
||||
{{% /note %}}
|
||||
|
||||
The `metadata.name` field in manifests uniquely identifies each resource in the template.
|
||||
`metadata.name` values must be [DNS-1123](https://tools.ietf.org/html/rfc1123) compliant.
|
||||
If resources in the template depend on other InfluxDB resources, all dependencies
|
||||
must be included in the template.
|
||||
|
||||
_See [Create an InfluxDB template](/v2.0/influxdb-templates/create/) for information about
|
||||
generating template manifests._
|
||||
|
||||
|
@ -42,6 +56,13 @@ Include the following **resources** in a template:
|
|||
- tasks
|
||||
- Telegraf configurations
|
||||
|
||||
## Stacks
|
||||
**InfluxDB stacks** are stateful InfluxDB templates.
|
||||
When you apply a template, InfluxDB associates resources in the template with a stack.
|
||||
Use stacks to add, update, or remove templated resources over time.
|
||||
|
||||
For more information, see [InfluxDB Stacks](#influxdb-stacks) below.
|
||||
|
||||
---
|
||||
|
||||
{{< children >}}
|
||||
|
|
|
@ -15,12 +15,12 @@ v2.0/tags: [templates]
|
|||
products: [cloud]
|
||||
---
|
||||
|
||||
If using InfluxDB Cloud, download and use the [`influx` command line interface (CLI)](/v2.0/reference/cli/influx/)
|
||||
Use the [`influx` command line interface (CLI)](/v2.0/reference/cli/influx/)
|
||||
to apply and manage templates in your InfluxDB Cloud account.
|
||||
|
||||
InfluxDB OSS 2.0 includes the InfluxDB CLI (`influx`). If you haven’t already, do the following:
|
||||
If you haven’t already, do the following:
|
||||
|
||||
1. [Download and install InfluxDB 2.0 OSS](/v2.0/get-started/#start-with-influxdb-oss).
|
||||
1. [Download and install `influx` CLI](/v2.0/get-started/#optional-download-and-install-the-influx-cli).
|
||||
2. [Configure the `influx` CLI](/v2.0/get-started/#set-up-influxdb) to use your
|
||||
InfluxDB Cloud instance URL, organization, and tokens.
|
||||
3. [Use the `influx` CLI](/v2.0/reference/cli/influx/) to use, manage, and create
|
||||
|
|
|
@ -19,6 +19,8 @@ create InfluxDB templates.
|
|||
Add resources (buckets, Telegraf configurations, tasks, and more) in the InfluxDB
|
||||
UI and export the resources as a template.
|
||||
|
||||
{{< youtube 714uHkxKM6U >}}
|
||||
|
||||
{{% note %}}
|
||||
Templatable resources are scoped to a single organization, so the simplest way to create a
|
||||
template is to create a new organization, build the template within the organization,
|
||||
|
@ -56,8 +58,9 @@ Dashboard cells that use table visualization are not included in exported templa
|
|||
## Export a template
|
||||
Do one of the following to export a template:
|
||||
|
||||
1. Export all resources in an organization _(recommended)_
|
||||
2. Export specific resources in an organization
|
||||
- [Export all resources in an organization](#export-all-resources)
|
||||
- [Export specific resources in an organization](#export-specific-resources)
|
||||
- [Export a stack and its associated resources](#export-a-stack)
|
||||
|
||||
### Export all resources
|
||||
To export all templatable resources within an organization to a template manifest,
|
||||
|
@ -139,6 +142,35 @@ influx export all \
|
|||
--telegraf-configs=00000x0x000X0x0X0
|
||||
```
|
||||
|
||||
### Export a stack
|
||||
To export a stack and all its associated resources as a template, use the
|
||||
`influx export stack` command.
|
||||
Provide the following:
|
||||
|
||||
- **Organization name** or **ID**
|
||||
- **Authentication token** with read access to the organization
|
||||
- **Destination path and filename** for the template manifest.
|
||||
The filename extension determines the template format—both **YAML** (`.yml`) and
|
||||
**JSON** (`.json`) are supported.
|
||||
- **Stack ID**
|
||||
|
||||
###### Export a stack as a template
|
||||
```sh
|
||||
# Syntax
|
||||
influx export stack \
|
||||
-o <org-name> \
|
||||
-t <token> \
|
||||
-f <file-path> \
|
||||
<stack-id>
|
||||
|
||||
# Example
|
||||
influx export stack \
|
||||
-o my-org \
|
||||
-t mYSuP3RS3CreTt0K3n
|
||||
-f ~/templates/awesome-template.yml \
|
||||
05dbb791a4324000
|
||||
```
|
||||
|
||||
## Include user-definable resource names
|
||||
After exporting a template manifest, replace resource names with **environment references**
|
||||
to let users customize resource names when installing your template.
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
---
|
||||
title: InfluxDB stacks
|
||||
description: >
|
||||
InfluxDB stacks are stateful InfluxDB templates that let you add,
|
||||
update, and remove templated resources over time, avoid duplicating resources
|
||||
when applying the same or similar templates more than once, and apply
|
||||
changes to distributed instances of InfluxDB OSS or InfluxDB Cloud.
|
||||
menu:
|
||||
v2_0:
|
||||
parent: InfluxDB templates
|
||||
weight: 105
|
||||
related:
|
||||
- /v2.0/reference/cli/influx/pkg/stack/
|
||||
---
|
||||
|
||||
**InfluxDB stacks** are **stateful [InfluxDB templates](/v2.0/influxdb-templates)**
|
||||
that let you add, update, and remove templated resources over time, avoid
|
||||
duplicating resources when applying the same or similar templates more than once,
|
||||
and apply changes to distributed instances of InfluxDB OSS or InfluxDB Cloud.
|
||||
|
||||
## Ideal use cases for InfluxDB stacks
|
||||
Stacks help save time and effort in the following use cases:
|
||||
|
||||
- [Actively develop and extend templates](#actively-develop-and-extend-templates)
|
||||
- [Apply updates from source-controlled templates](#apply-updates-from-source-controlled-templates)
|
||||
- [Apply template updates across multiple InfluxDB instances](#apply-template-updates-across-multiple-influxdb-instances)
|
||||
|
||||
### Actively develop and extend templates
|
||||
InfluxDB stacks aid in developing and maintaining InfluxDB templates.
|
||||
Stacks let you modify and update template manifests and apply those changes in
|
||||
any stack that uses the template.
|
||||
|
||||
### Apply updates from source-controlled templates
|
||||
You can use a variety of InfluxDB templates from many different sources including
|
||||
[Community Templates](https://github.com/influxdata/community-templates/) or
|
||||
self-built custom templates.
|
||||
As templates are updated over time, stacks allow template users to gracefully
|
||||
apply updates without creating duplicate resources.
|
||||
|
||||
### Apply template updates across multiple InfluxDB instances
|
||||
In many cases, users have more than one instance of InfluxDB running and apply
|
||||
the same template to each separate instance.
|
||||
By using stacks, you can make changes to a stack on one instance,
|
||||
[export the stack as a template](/v2.0/influxdb-templates/create/#export-a-stack)
|
||||
and then apply the changes to your other InfluxDB instances.
|
||||
|
||||
## Manage InfluxDB Stacks
|
||||
|
||||
{{< children type="anchored-list" >}}
|
||||
|
||||
{{< children readmore=true >}}
|
|
@ -0,0 +1,73 @@
|
|||
---
|
||||
title: Initialize an InfluxDB stack
|
||||
list_title: Initialize a stack
|
||||
description: >
|
||||
InfluxDB automatically creates a new stack each time you [apply an InfluxDB template](/v2.0/influxdb-templates/use/)
|
||||
**without providing a stack ID**.
|
||||
To manually create or initialize a new stack, use the [`influx stacks init` command](/v2.0/reference/cli/influx/stacks/init/).
|
||||
menu:
|
||||
v2_0:
|
||||
parent: InfluxDB stacks
|
||||
name: Initialize a stack
|
||||
weight: 201
|
||||
related:
|
||||
- /v2.0/reference/cli/influx/stacks/init/
|
||||
list_code_example: |
|
||||
```sh
|
||||
influx apply \
|
||||
-o example-org \
|
||||
-f path/to/template.yml
|
||||
```
|
||||
```sh
|
||||
influx stacks init \
|
||||
-o example-org \
|
||||
-n "Example Stack" \
|
||||
-d "InfluxDB stack for monitoring some awesome stuff" \
|
||||
-u https://example.com/template-1.yml \
|
||||
-u https://example.com/template-2.yml
|
||||
```
|
||||
---
|
||||
|
||||
InfluxDB automatically creates a new stack each time you [apply an InfluxDB template](/v2.0/influxdb-templates/use/)
|
||||
**without providing a stack ID**.
|
||||
To manually create or initialize a new stack, use the [`influx stacks init` command](/v2.0/reference/cli/influx/stacks/init/).
|
||||
|
||||
## Initialize a stack when applying a template
|
||||
To automatically create a new stack when [applying an InfluxDB template](/v2.0/influxdb-templates/use/)
|
||||
**don't provide a stack ID**.
|
||||
InfluxDB applies the resources in the template to a new stack and provides the **stack ID** the output.
|
||||
|
||||
```sh
|
||||
influx apply \
|
||||
-o example-org \
|
||||
-f path/to/template.yml
|
||||
```
|
||||
|
||||
## Manually initialize a new stack
|
||||
Use the [`influx stacks init` command](/v2.0/reference/cli/influx/stacks/init/)
|
||||
to create or initialize a new InfluxDB stack.
|
||||
|
||||
**Provide the following:**
|
||||
|
||||
- Organization name or ID
|
||||
- Stack name
|
||||
- Stack description
|
||||
- InfluxDB template URLs
|
||||
|
||||
<!-- -->
|
||||
```sh
|
||||
# Syntax
|
||||
influx stacks init \
|
||||
-o <org-name> \
|
||||
-n <stack-name> \
|
||||
-d <stack-description \
|
||||
-u <package-url>
|
||||
|
||||
# Example
|
||||
influx stacks init \
|
||||
-o example-org \
|
||||
-n "Example Stack" \
|
||||
-d "InfluxDB stack for monitoring some awesome stuff" \
|
||||
-u https://example.com/template-1.yml \
|
||||
-u https://example.com/template-2.yml
|
||||
```
|
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
title: Remove an InfluxDB stack
|
||||
list_title: Remove a stack
|
||||
description: >
|
||||
Use the [`influx stacks remove` command](/v2.0/reference/cli/influx/stacks/remove/)
|
||||
to remove an InfluxDB stack and all its associated resources.
|
||||
menu:
|
||||
v2_0:
|
||||
parent: InfluxDB stacks
|
||||
name: Remove a stack
|
||||
weight: 204
|
||||
related:
|
||||
- /v2.0/reference/cli/influx/stacks/remove/
|
||||
list_code_example: |
|
||||
```sh
|
||||
influx stacks remove \
|
||||
-o example-org \
|
||||
--stack-id=12ab34cd56ef
|
||||
```
|
||||
---
|
||||
|
||||
Use the [`influx stacks remove` command](/v2.0/reference/cli/influx/stacks/remove/)
|
||||
to remove an InfluxDB stack and all its associated resources.
|
||||
|
||||
**Provide the following:**
|
||||
|
||||
- Organization name or ID
|
||||
- Stack ID
|
||||
|
||||
<!-- -->
|
||||
```sh
|
||||
# Syntax
|
||||
influx stacks remove -o <org-name> --stack-id=<stack-id>
|
||||
|
||||
# Example
|
||||
influx stacks remove \
|
||||
-o example-org \
|
||||
--stack-id=12ab34cd56ef
|
||||
```
|
|
@ -0,0 +1,56 @@
|
|||
---
|
||||
title: Update an InfluxDB stack
|
||||
list_title: Update a stack
|
||||
description: >
|
||||
Use the [`influx apply` command](/v2.0/reference/cli/influx/apply/)
|
||||
to update a stack with a modified template.
|
||||
When applying a template to an existing stack, InfluxDB checks to see if the
|
||||
resources in the template match existing resources.
|
||||
InfluxDB updates, adds, and removes resources to resolve differences between
|
||||
the current state of the stack and the newly applied template.
|
||||
menu:
|
||||
v2_0:
|
||||
parent: InfluxDB stacks
|
||||
name: Update a stack
|
||||
weight: 202
|
||||
related:
|
||||
- /v2.0/reference/cli/influx/apply
|
||||
- /v2.0/reference/cli/influx/stacks/update/
|
||||
list_code_example: |
|
||||
```sh
|
||||
influx applyapply \
|
||||
-o example-org \
|
||||
-u http://example.com/template-1.yml \
|
||||
-u http://example.com/template-2.yml \
|
||||
--stack-id=12ab34cd56ef
|
||||
```
|
||||
---
|
||||
|
||||
Use the [`influx apply` command](/v2.0/reference/cli/influx/apply/)
|
||||
to update a stack with a modified template.
|
||||
When applying a template to an existing stack, InfluxDB checks to see if the
|
||||
resources in the template match existing resources.
|
||||
InfluxDB updates, adds, and removes resources to resolve differences between
|
||||
the current state of the stack and the newly applied template.
|
||||
|
||||
Each stack is uniquely identified by a **stack ID**.
|
||||
For information about retrieving your stack ID, see [View stacks](/v2.0/influxdb-templates/stacks/view/).
|
||||
|
||||
**Provide the following:**
|
||||
|
||||
- Organization name or ID
|
||||
- Stack ID
|
||||
- InfluxDB template URLs to apply
|
||||
|
||||
<!-- -->
|
||||
```sh
|
||||
influx apply \
|
||||
-o example-org \
|
||||
-u http://example.com/template-1.yml \
|
||||
-u http://example.com/template-2.yml \
|
||||
--stack-id=12ab34cd56ef
|
||||
```
|
||||
|
||||
Template resources are uniquely identified by their `metadata.name` field.
|
||||
If errors occur when applying changes to a stack, all applied changes are
|
||||
reversed and the stack is returned to its previous state.
|
|
@ -0,0 +1,66 @@
|
|||
---
|
||||
title: View InfluxDB stacks
|
||||
list_title: View stacks
|
||||
description: >
|
||||
Use the [`influx stacks` command](/v2.0/reference/cli/influx/stacks/)
|
||||
to view installed InfluxDB stacks and their associated resources.
|
||||
menu:
|
||||
v2_0:
|
||||
parent: InfluxDB stacks
|
||||
name: View stacks
|
||||
weight: 203
|
||||
related:
|
||||
- /v2.0/reference/cli/influx/stacks/
|
||||
list_code_example: |
|
||||
```sh
|
||||
influx stacks -o example-org
|
||||
```
|
||||
---
|
||||
|
||||
Use the [`influx stacks` command](/v2.0/reference/cli/influx/stacks/)
|
||||
to view installed InfluxDB stacks and their associated resources.
|
||||
|
||||
**Provide the following:**
|
||||
|
||||
- Organization name or ID
|
||||
|
||||
<!-- -->
|
||||
```sh
|
||||
# Syntax
|
||||
influx stacks -o <org-name>
|
||||
|
||||
# Example
|
||||
influx stacks -o example-org
|
||||
```
|
||||
|
||||
### Filter stacks
|
||||
To output information about specific stacks, use the `--stack-name` or `--stack-id`
|
||||
flags to filter output by stack names or stack IDs.
|
||||
|
||||
##### Filter by stack name
|
||||
```sh
|
||||
# Syntax
|
||||
influx stacks \
|
||||
-o <org-name> \
|
||||
--stack-name=<stack-name>
|
||||
|
||||
# Example
|
||||
influx stacks \
|
||||
-o example-org \
|
||||
--stack-name=stack1 \
|
||||
--stack-name=stack2
|
||||
```
|
||||
|
||||
### Filter by stack ID
|
||||
```sh
|
||||
# Syntax
|
||||
influx stacks \
|
||||
-o <org-name> \
|
||||
--stack-id=<stack-id>
|
||||
|
||||
# Example
|
||||
influx stacks \
|
||||
-o example-org \
|
||||
--stack-id=12ab34cd56ef \
|
||||
--stack-id=78gh910i11jk
|
||||
```
|
|
@ -31,6 +31,8 @@ others in the InfluxData community.
|
|||
Apply community templates directly from GitHub using a template's download URL
|
||||
or download the template.
|
||||
|
||||
{{< youtube 2JjW4Rym9XE >}}
|
||||
|
||||
{{% note %}}
|
||||
When attempting to access the community templates via the URL, the templates use the following
|
||||
as the root of the URL:
|
||||
|
@ -119,6 +121,14 @@ from your local filesystem or from URLs.
|
|||
- [Define environment references](#define-environment-references)
|
||||
- [Include a secret when installing a template](#include-a-secret-when-installing-a-template)
|
||||
|
||||
{{% note %}}
|
||||
#### Apply templates to an existing stack
|
||||
To apply a template to an existing stack, include the stack ID when applying the template.
|
||||
Any time you apply a template without a stack ID, InfluxDB initializes a new stack
|
||||
and all new resources.
|
||||
For more information, see [InfluxDB stacks](/v2.0/influxdb-templates/stacks/).
|
||||
{{% /note %}}
|
||||
|
||||
### Apply a template from a file
|
||||
To install templates stored on your local machine, use the `-f` or `--file` flag
|
||||
to provide the **file path** of the template manifest.
|
||||
|
|
|
@ -42,7 +42,6 @@ There are two places you can create a bucket in the UI.
|
|||
- **Older than** to choose a specific retention policy.
|
||||
5. Click **Create** to create the bucket.
|
||||
|
||||
|
||||
## Create a bucket using the influx CLI
|
||||
|
||||
Use the [`influx bucket create` command](/v2.0/reference/cli/influx/bucket/create)
|
||||
|
@ -50,7 +49,15 @@ to create a new bucket. A bucket requires the following:
|
|||
|
||||
- bucket name
|
||||
- organization name or ID
|
||||
- retention period duration (`ns`, `us`, `ms`, `s`, or `h`)
|
||||
- retention period (duration to keep data) in one of the following units:
|
||||
- nanoseconds (`ns`)
|
||||
- microseconds (`us` or `µs`)
|
||||
- milliseconds (`ms`)
|
||||
- seconds (`s`)
|
||||
- minutes (`m`)
|
||||
- hours (`h`)
|
||||
- days (`d`)
|
||||
- weeks (`w`)
|
||||
|
||||
```sh
|
||||
# Syntax
|
||||
|
|
|
@ -21,7 +21,6 @@ Note that updating an bucket's name will affect any assets that reference the bu
|
|||
|
||||
If you change a bucket name, be sure to update the bucket in the above places as well.
|
||||
|
||||
|
||||
## Update a bucket's name in the InfluxDB UI
|
||||
|
||||
1. In the navigation menu on the left, select **Data (Load Data)** > **Buckets**.
|
||||
|
@ -52,6 +51,7 @@ to update a bucket. Updating a bucket requires the following:
|
|||
- The name or ID of the organization the bucket belongs to.
|
||||
|
||||
##### Update the name of a bucket
|
||||
|
||||
```sh
|
||||
# Syntax
|
||||
influx bucket update -i <bucket-id> -o <org-name> -n <new-bucket-name>
|
||||
|
@ -61,6 +61,9 @@ influx bucket update -i 034ad714fdd6f000 -o my-org -n my-new-bucket
|
|||
```
|
||||
|
||||
##### Update a bucket's retention policy
|
||||
|
||||
Valid retention policy duration units are nanoseconds (`ns`), microseconds (`us` or `µs`), milliseconds (`ms`), seconds (`s`), minutes (`m`), hours (`h`), days (`d`), or weeks (`w`).
|
||||
|
||||
```sh
|
||||
# Syntax
|
||||
influx bucket update -i <bucket-id> -r <retention period in nanoseconds>
|
||||
|
|
|
@ -4,7 +4,7 @@ seotitle: Query using conditional logic in Flux
|
|||
list_title: Conditional logic
|
||||
description: >
|
||||
This guide describes how to use Flux conditional expressions, such as `if`,
|
||||
`else`, and `then`, to query and transform data.
|
||||
`else`, and `then`, to query and transform data. **Flux evaluates statements from left to right and stops evaluating once a condition matches.**
|
||||
v2.0/tags: [conditionals, flux]
|
||||
menu:
|
||||
v2_0:
|
||||
|
@ -48,6 +48,21 @@ Conditional expressions are most useful in the following contexts:
|
|||
[`map()`](/v2.0/reference/flux/stdlib/built-in/transformations/map/),
|
||||
[`reduce()`](/v2.0/reference/flux/stdlib/built-in/transformations/aggregates/reduce) ).
|
||||
|
||||
## Evaluating conditional expressions
|
||||
|
||||
Flux evaluates statements in order and stops evaluating once a condition matches.
|
||||
|
||||
For example, given the following statement:
|
||||
|
||||
```js
|
||||
if r._value > 95.0000001 and r._value <= 100.0 then "critical"
|
||||
else if r._value > 85.0000001 and r._value <= 95.0 then "warning"
|
||||
else if r._value > 70.0000001 and r._value <= 85.0 then "high"
|
||||
else "normal"
|
||||
```
|
||||
|
||||
When `r._value` is 96, the output is "critical" and the remaining conditions are not evaluated.
|
||||
|
||||
## Examples
|
||||
|
||||
- [Conditionally set the value of a variable](#conditionally-set-the-value-of-a-variable)
|
||||
|
|
|
@ -53,11 +53,6 @@ in an input table.
|
|||
)
|
||||
```
|
||||
|
||||
{{% note %}}
|
||||
To preserve existing columns, [use the `with` operator](/v2.0/reference/flux/stdlib/built-in/transformations/aggregates/reduce/#preserve-columns)
|
||||
when mapping values in the `r` object.
|
||||
{{% /note %}}
|
||||
|
||||
To illustrate how this function works, take this simplified table for example:
|
||||
|
||||
| _time | _value |
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: influx - InfluxDB command line interface
|
||||
seotitle: influx - InfluxDB command line interface
|
||||
description: >
|
||||
The influx CLI includes commands to manage many aspects of InfluxDB,
|
||||
The `influx` CLI includes commands to manage many aspects of InfluxDB,
|
||||
including buckets, organizations, users, tasks, etc.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx apply
|
||||
description: The 'influx apply' command applies InfluxDB templates.
|
||||
description: The `influx apply` command applies InfluxDB templates.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx apply
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx auth
|
||||
description: The 'influx auth' command and its subcommands manage authorizations in InfluxDB.
|
||||
description: The `influx auth` command and its subcommands manage authorizations in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx auth
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx auth active
|
||||
description: The 'influx auth active' command activates an authorization.
|
||||
description: The `influx auth active` command activates an authorization.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx auth active
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx auth create
|
||||
description: The 'influx auth create' creates an authorization in InfluxDB.
|
||||
description: The `influx auth create` creates an authorization in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx auth create
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx auth delete
|
||||
description: The 'influx auth delete' command deletes an authorization in InfluxDB.
|
||||
description: The `influx auth delete` command deletes an authorization in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx auth delete
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx auth inactive
|
||||
description: The 'influx auth inactive' inactivates an authorization in InfluxDB.
|
||||
description: The `influx auth inactive` inactivates an authorization in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx auth inactive
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx auth list
|
||||
description: The 'influx auth list' command lists and searches authorizations in InfluxDB.
|
||||
description: The `influx auth list` command lists and searches authorizations in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx auth list
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx backup
|
||||
description: The 'influx backup' command backs up data stored in InfluxDB.
|
||||
description: The `influx backup` command backs up data stored in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx backup
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx bucket
|
||||
description: The 'influx bucket' command and its subcommands manage buckets in InfluxDB.
|
||||
description: The `influx bucket` command and its subcommands manage buckets in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx bucket
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx bucket create
|
||||
description: The 'influx bucket create' command creates a new bucket in InfluxDB.
|
||||
description: The `influx bucket create` command creates a new bucket in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx bucket create
|
||||
|
@ -29,3 +29,8 @@ influx bucket create [flags]
|
|||
| `-r` | `--retention` | Duration bucket will retain data (0 is infinite, default is 0) | duration | |
|
||||
| | `--skip-verify` | Skip TLS certificate verification | | |
|
||||
| `-t` | `--token` | Authentication token | string | `INFLUX_TOKEN` |
|
||||
|
||||
{{% note %}}
|
||||
Valid `--retention` units are nanoseconds (`ns`), microseconds (`us` or `µs`),
|
||||
milliseconds (`ms`), seconds (`s`), minutes (`m`), hours (`h`), days (`d`), and weeks (`w`).
|
||||
{{% /note %}}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx bucket delete
|
||||
description: The 'influx bucket delete' command deletes a bucket from InfluxDB and all the data it contains.
|
||||
description: The `influx bucket delete` command deletes a bucket from InfluxDB and all the data it contains.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx bucket delete
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx bucket list
|
||||
description: The 'influx bucket list' command lists and searches for buckets in InfluxDB.
|
||||
description: The `influx bucket list` command lists and searches for buckets in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx bucket list
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx bucket update
|
||||
description: The 'influx bucket update' command updates information associated with buckets in InfluxDB.
|
||||
description: The `influx bucket update` command updates information associated with buckets in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx bucket update
|
||||
|
@ -28,3 +28,8 @@ influx bucket update [flags]
|
|||
| `-r` | `--retention` | New duration bucket will retain data | duration | |
|
||||
| | `--skip-verify` | Skip TLS certificate verification | | |
|
||||
| `-t` | `--token` | Authentication token | string | `INFLUX_TOKEN` |
|
||||
|
||||
{{% note %}}
|
||||
Valid `--retention` units are nanoseconds (`ns`), microseconds (`us` or `µs`),
|
||||
milliseconds (`ms`), seconds (`s`), minutes (`m`), hours (`h`), days (`d`), and weeks (`w`).
|
||||
{{% /note %}}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: influx completion
|
||||
description: >
|
||||
The 'influx completion' command outputs `influx` shell completion scripts for a
|
||||
The `influx completion` command outputs `influx` shell completion scripts for a
|
||||
specified shell (`bash` or `zsh`).
|
||||
menu:
|
||||
v2_0_ref:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx config
|
||||
description: The 'influx config' command and subcommands manage multiple InfluxDB connection configurations.
|
||||
description: The `influx config` command and subcommands manage multiple InfluxDB connection configurations.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx config
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx config create
|
||||
description: The 'influx config create' command creates a new InfluxDB connection configuration.
|
||||
description: The `influx config create` command creates a new InfluxDB connection configuration.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx config create
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx config list
|
||||
description: The 'influx config list' command lists all InfluxDB connection configurations.
|
||||
description: The `influx config list` command lists all InfluxDB connection configurations.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx config list
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx config rm
|
||||
description: The 'influx config rm' command removes an InfluxDB connection configuration.
|
||||
description: The `influx config rm` command removes an InfluxDB connection configuration.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx config rm
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx config set
|
||||
description: The 'influx config set' command updates an InfluxDB connection configuration.
|
||||
description: The `influx config set` command updates an InfluxDB connection configuration.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx config set
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx delete
|
||||
description: The 'influx delete' command deletes points from an InfluxDB bucket.
|
||||
description: The `influx delete` command deletes points from an InfluxDB bucket.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx delete
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx export
|
||||
description: The 'influx export' command exports existing resources as an InfluxDB template.
|
||||
description: The `influx export` command exports existing resources as an InfluxDB template.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
parent: influx
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: influx export all
|
||||
description: >
|
||||
The 'influx export all' command exports all resources in an organization as an InfluxDB template.
|
||||
The `influx export all` command exports all resources in an organization as an InfluxDB template.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
parent: influx export
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: influx export stack
|
||||
description: >
|
||||
The 'influx export stack' command exports all resources associated with a stack as an InfluxDB template.
|
||||
The `influx export stack` command exports all resources associated with a stack as an InfluxDB template.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
parent: influx export
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx help
|
||||
description: The 'influx help' command provides help for any command in the `influx` command line interface.
|
||||
description: The `influx help` command provides help for any command in the `influx` command line interface.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx help
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx org
|
||||
description: The 'influx org' command and its subcommands manage organization information in InfluxDB.
|
||||
description: The `influx org` command and its subcommands manage organization information in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx org
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx org create
|
||||
description: The 'influx org create' creates a new organization in InfluxDB.
|
||||
description: The `influx org create` creates a new organization in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx org create
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx org delete
|
||||
description: The 'influx org delete' command deletes an organization in InfluxDB.
|
||||
description: The `influx org delete` command deletes an organization in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx org delete
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx org list
|
||||
description: The 'influx org list' lists and searches for organizations in InfluxDB.
|
||||
description: The `influx org list` lists and searches for organizations in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx org list
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx org members - Organization membership management commands
|
||||
description: The 'influx org members' command and its subcommands manage organization members in InfluxDB.
|
||||
title: influx org members
|
||||
description: The `influx org members` command and its subcommands manage organization members in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx org members
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx org members add
|
||||
description: The 'influx org members add' command adds a new member to an organization in InfluxDB.
|
||||
description: The `influx org members add` command adds a new member to an organization in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx org members add
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx org members list
|
||||
description: The 'influx org members list' command lists members within an organization in InfluxDB.
|
||||
description: The `influx org members list` command lists members within an organization in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx org members list
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx org members remove
|
||||
description: The 'influx org members remove' command removes a member from an organization in InfluxDB.
|
||||
description: The `influx org members remove` command removes a member from an organization in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx org members remove
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx org update
|
||||
description: The 'influx org update' command updates information related to organizations in InfluxDB.
|
||||
description: The `influx org update` command updates information related to organizations in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx org update
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: influx query
|
||||
description: >
|
||||
The 'influx query' command executes a literal Flux query provided as a string
|
||||
The `influx query` command executes a literal Flux query provided as a string
|
||||
or a literal Flux query contained in a file by specifying the file prefixed with an '@' sign.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: influx repl
|
||||
description: >
|
||||
The 'influx repl' command opens an interactive read-eval-print-loop (REPL)
|
||||
The `influx repl` command opens an interactive read-eval-print-loop (REPL)
|
||||
from which you can run Flux commands.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx secret
|
||||
description: The 'influx secret' command manages secrets.
|
||||
description: The `influx secret` command manages secrets.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx secret
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx secret delete
|
||||
description: The 'influx secret delete' command deletes secrets.
|
||||
description: The `influx secret delete` command deletes secrets.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx secret delete
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx secret list
|
||||
description: The 'influx secret list' command lists secret keys.
|
||||
description: The `influx secret list` command lists secret keys.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx secret list
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx secret update
|
||||
description: The 'influx secret update' command adds and updates secrets.
|
||||
description: The `influx secret update` command adds and updates secrets.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx secret update
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: influx setup
|
||||
description: >
|
||||
The 'influx setup' command walks through the initial InfluxDB setup process,
|
||||
The `influx setup` command walks through the initial InfluxDB setup process,
|
||||
creating a default user, organization, and bucket.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
|
@ -32,3 +32,8 @@ influx setup [flags]
|
|||
| | `--skip-verify` | Skip TLS certificate verification | | |
|
||||
| `-t` | `--token` | Token for admin user (auto-generated by default) | string | `INFLUX_TOKEN` |
|
||||
| `-u` | `--username` | Primary username | string | |
|
||||
|
||||
{{% note %}}
|
||||
Valid `--retention` units are nanoseconds (`ns`), microseconds (`us` or `µs`),
|
||||
milliseconds (`ms`), seconds (`s`), minutes (`m`), hours (`h`), days (`d`), and weeks (`w`).
|
||||
{{% /note %}}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: influx stacks
|
||||
description: >
|
||||
The 'influx stacks' command and its subcommands list and manage InfluxDB stacks
|
||||
The `influx stacks` command and its subcommands list and manage InfluxDB stacks
|
||||
and associated resources.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx stacks init
|
||||
description: The 'influx stacks init' command initializes an InfluxDB stack.
|
||||
description: The `influx stacks init` command initializes an InfluxDB stack.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx stacks init
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx stacks remove
|
||||
description: The 'influx stacks remove' command removes an InfluxDB stack and all associated resources.
|
||||
description: The `influx stacks remove` command removes an InfluxDB stack and all associated resources.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx stacks remove
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx task
|
||||
description: The 'influx task' command and its subcommands manage tasks in InfluxDB.
|
||||
description: The `influx task` command and its subcommands manage tasks in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx task
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx task create
|
||||
description: The 'influx task create' command creates a new task in InfluxDB.
|
||||
description: The `influx task create` command creates a new task in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx task create
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx task delete
|
||||
description: The 'influx task delete' command deletes a task in InfluxDB.
|
||||
description: The `influx task delete` command deletes a task in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx task delete
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx task list
|
||||
description: The 'influx task list' command lists and searches for tasks in InfluxDB.
|
||||
description: The `influx task list` command lists and searches for tasks in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx task list
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
---
|
||||
title: influx task log
|
||||
description: The 'influx task log' and its subcommand 'list' output log information related related to a task.
|
||||
description: >
|
||||
The `influx task log` and its subcommand, `list`, output log information
|
||||
related to a task.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx task log
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx task log list
|
||||
description: The 'influx task log list' command outputs log information related to a task.
|
||||
description: The `influx task log list` command outputs log information related to a task.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx task log list
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: influx task run
|
||||
description: >
|
||||
The 'influx task run' command and its subcommand 'list' output information
|
||||
The `influx task run` command and its subcommand, `list` output information
|
||||
related to runs of a task.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx task run list
|
||||
description: The 'influx task run list' command outputs information related to runs of a task.
|
||||
description: The `influx task run list` command outputs information related to runs of a task.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx task run list
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx task run retry
|
||||
description: The 'influx task run retry' command retries to run a task in InfluxDB.
|
||||
description: The `influx task run retry` command retries to run a task in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx task run retry
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx task update
|
||||
description: The 'influx task update' command updates information related to tasks in InfluxDB.
|
||||
description: The `influx task update` command updates information related to tasks in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx task update
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx template
|
||||
description: The 'influx template' command summarizes the specified InfluxDB template.
|
||||
description: The `influx template` command summarizes the specified InfluxDB template.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx template
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: influx template validate
|
||||
description: >
|
||||
The 'influx template validate' command validates the provided InfluxDB template.
|
||||
The `influx template validate` command validates the provided InfluxDB template.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
parent: influx template
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: influx transpile
|
||||
description: >
|
||||
The 'influx transpile' command transpiles an InfluxQL query to Flux source code.
|
||||
The `influx transpile` command transpiles an InfluxQL query to Flux source code.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx transpile
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx user
|
||||
description: The 'influx user' command and its subcommands manage user information in InfluxDB.
|
||||
description: The `influx user` command and its subcommands manage user information in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx user
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx user create
|
||||
description: The 'influx user create' command creates a user in InfluxDB.
|
||||
description: The `influx user create` command creates a user in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx user create
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx user delete
|
||||
description: The 'influx user delete' command deletes a specified user.
|
||||
description: The `influx user delete` command deletes a specified user.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx user delete
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influx user list
|
||||
description: The 'influx user list' lists users in InfluxDB.
|
||||
description: The `influx user list` lists users in InfluxDB.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx user list
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: influx user update
|
||||
description: >
|
||||
The 'influx user update' command updates information related to a user such as their user name.
|
||||
The `influx user update` command updates information related to a user such as their user name.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: influx user update
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: influx write dryrun
|
||||
description: >
|
||||
The 'influx write dryrun' command prints write output to stdout instead of writing
|
||||
The `influx write dryrun` command prints write output to stdout instead of writing
|
||||
to InfluxDB. Use this command to test writing data.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: influxd - InfluxDB daemon
|
||||
description: The influxd daemon starts and runs all the processes necessary for InfluxDB to function.
|
||||
title: influxd - InfluxDB service
|
||||
description: The `influxd` service starts and runs all the processes necessary for InfluxDB to function.
|
||||
v2.0/tags: [influxd, cli]
|
||||
menu:
|
||||
v2_0_ref:
|
||||
|
|
|
@ -7,7 +7,7 @@ description: >
|
|||
menu:
|
||||
v2_0_ref:
|
||||
name: Configuration options
|
||||
weight: 3
|
||||
weight: 3
|
||||
products: [oss]
|
||||
related:
|
||||
- /v2.0/reference/cli/influxd
|
||||
|
|
|
@ -24,7 +24,7 @@ _**Output data type:** Integer_
|
|||
```js
|
||||
import "strings"
|
||||
|
||||
strings.lastIndex(v: "go gopher", t: "go")
|
||||
strings.lastIndex(v: "go gopher", substr: "go")
|
||||
|
||||
// returns 3
|
||||
```
|
||||
|
|
|
@ -7,7 +7,7 @@ menu:
|
|||
v2_0_ref:
|
||||
name: testing.assertEmpty
|
||||
parent: Testing
|
||||
weight: 301
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `testing.assertEmpty()` function tests if an input stream is empty.
|
||||
|
|
|
@ -7,7 +7,7 @@ menu:
|
|||
v2_0_ref:
|
||||
name: testing.diff
|
||||
parent: Testing
|
||||
weight: 301
|
||||
weight: 301
|
||||
---
|
||||
|
||||
The `testing.diff()` function produces a diff between two streams.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: Glossary
|
||||
description: >
|
||||
Terms related to InfluxData products and platforms.
|
||||
weight: 7
|
||||
weight: 8
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: Glossary
|
||||
|
@ -395,7 +395,7 @@ Columns with unique values in each row are not part of the group key.
|
|||
### gzip
|
||||
|
||||
gzip is a type of data compression that compress chunks of data, which is restored by unzipping compressed gzip files.
|
||||
the gzip file extension is `.gz`.
|
||||
The gzip file extension is `.gz`.
|
||||
|
||||
## H
|
||||
|
||||
|
@ -439,11 +439,11 @@ Related entries: [explict block](#explicit-block), [block](#block)
|
|||
|
||||
### influx
|
||||
|
||||
A command line interface (CLI) that interacts with the InfluxDB daemon (influxd).
|
||||
`influx` is a command line interface (CLI) that interacts with the InfluxDB daemon (influxd).
|
||||
|
||||
### influxd
|
||||
|
||||
The InfluxDB daemon that runs the InfluxDB server and other required processes.
|
||||
`influxd` is the InfluxDB daemon that runs the InfluxDB server and other required processes.
|
||||
|
||||
### InfluxDB
|
||||
|
||||
|
@ -457,6 +457,7 @@ The graphical web interface provided by InfluxDB for visualizing data and managi
|
|||
### InfluxQL
|
||||
|
||||
The SQL-like query language used to query data in InfluxDB 1.x.
|
||||
The prefered method for querying data in InfluxDB 2.0 is the [Flux](#flux) language.
|
||||
|
||||
### input plugin
|
||||
|
||||
|
@ -489,7 +490,7 @@ For example, an "admin" token sent to a client can prove the client is logged in
|
|||
Tokens are signed by one party's private key (typically, the server).
|
||||
Private keys are used by both parties to verify that a token is legitimate.
|
||||
|
||||
JWT uses an open standard [RFC 7519](https://tools.ietf.org/html/rfc7519).
|
||||
JWT uses an open standard specified in [RFC 7519](https://tools.ietf.org/html/rfc7519).
|
||||
|
||||
### Jaeger
|
||||
|
||||
|
@ -757,7 +758,7 @@ See [Query data in InfluxDB](/v2.0/query-data/).
|
|||
|
||||
### REPL
|
||||
|
||||
A read-eval-print-loop is an interactive programming environment where you type a command and immediately see the result.
|
||||
A read-eval-print-loop (REPL) is an interactive programming environment where you type a command and immediately see the result.
|
||||
See [Use the influx CLI's REPL](/v2.0/query-data/get-started/syntax-basics/#use-the-influx-cli-s-repl).
|
||||
|
||||
### record
|
||||
|
@ -1015,7 +1016,7 @@ Related entries: [function](#function)
|
|||
|
||||
A plugin-driven agent that collects, processes, aggregates, and writes metrics.
|
||||
|
||||
Related entries: [Automatically configure Telegraf](/v2.0/write-data/use-telegraf/auto-config/), [Manually configure Telegraf](/v2.0/write-data/use-telegraf/manual-config/), [Telegraf plugins](/v2.0/reference/telegraf-plugins/), [Use Telegraf to collect data](/v2.0/write-data/use-telegraf/), [View a Telegraf configuration](/v2.0/write-data/use-telegraf/auto-config/view-telegraf-config/)
|
||||
Related entries: [Automatically configure Telegraf](/v2.0/write-data/no-code/use-telegraf/auto-config/), [Manually configure Telegraf](/v2.0/write-data/no-code/use-telegraf/manual-config/), [Telegraf plugins](/v2.0/reference/telegraf-plugins/), [Use Telegraf to collect data](/v2.0/write-data/use-telegraf/), [View a Telegraf configuration](/v2.0/write-data/no-code/use-telegraf/auto-config/view-telegraf-config/)
|
||||
|
||||
### time (data type)
|
||||
|
||||
|
@ -1064,7 +1065,7 @@ TSI uses the operating system's page cache to pull frequently accessed data into
|
|||
|
||||
### TSL
|
||||
|
||||
The Time Series Logs (TSL) extension (.tsl) identifies Time Series Index (TSI) log files, generated by the tsi1 engine.
|
||||
The Time Series Logs (TSL) extension (`.tsl`) identifies Time Series Index (TSI) log files, generated by the tsi1 engine.
|
||||
|
||||
### TSM (Time Structured Merge tree)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ title: InfluxDB Internals
|
|||
menu:
|
||||
v2_0_ref:
|
||||
name: InfluxDB Internals
|
||||
weight: 8
|
||||
weight: 8
|
||||
---
|
||||
|
||||
{{< children >}}
|
||||
|
|
|
@ -18,8 +18,8 @@ InfluxDB also provides a **tabular data schema** that includes the following:
|
|||
|
||||
- [Annotation rows](#annotation-rows)
|
||||
- [Header row](#header-row)
|
||||
- [Data rows](#data-row)
|
||||
- [Data columns](#data-columns)
|
||||
- [Data rows](#data-rows)
|
||||
- [Other columns](#other-columns)
|
||||
- [Group keys](#group-keys)
|
||||
|
||||
The **tabular data schema is used for the following**:
|
||||
|
|
|
@ -4,7 +4,7 @@ description: Find important information about what's included in new versions of
|
|||
menu:
|
||||
v2_0_ref:
|
||||
name: Release notes
|
||||
weight: 1
|
||||
weight: 1
|
||||
---
|
||||
|
||||
Find important information about what's included in new versions of our products:
|
||||
|
|
|
@ -12,6 +12,7 @@ weight: 101
|
|||
|
||||
### Features
|
||||
|
||||
- Add option for Cloud users to use the `influx` CLI to interact with a Cloud instance. For more information, see how to [download and install the influx CLI](/v2.0/get-started/#optional-download-and-install-the-influx-cli) and then learn more about how the [influx - InfluxDB command line interface](/v2.0/reference/cli/influx/) works.
|
||||
- Consolidate `influx apply` commands under templates. Remove some nesting of the `influx` CLI commands.
|
||||
- Make all `influx apply` applications stateful through stacks.
|
||||
- Add ability to export a stack's existing resource state using `influx export`.
|
||||
|
|
|
@ -4,18 +4,20 @@ description: >
|
|||
Use sample data to familiarize yourself with time series data and InfluxDB.
|
||||
InfluxData provides many sample time series datasets to use with InfluxDB
|
||||
and InfluxDB Cloud.
|
||||
menu:
|
||||
v2_0:
|
||||
parent: Write data
|
||||
weight: 105
|
||||
aliases:
|
||||
- /v2.0/write-data/sample-data/
|
||||
menu: v2_0_ref
|
||||
weight: 7
|
||||
---
|
||||
|
||||
Use sample data to familiarize yourself with time series data and InfluxDB.
|
||||
InfluxData provides many sample time series datasets to use with **InfluxDB** and **InfluxDB Cloud**.
|
||||
InfluxData provides many sample time series datasets to use with **InfluxDB Cloud** and **InfluxDB**.
|
||||
|
||||
{{< children hlevel="h2" >}}
|
||||
## InfluxDB Cloud demo data
|
||||
Use [InfluxDB Cloud demo data buckets](/v2.0/write-data/quick-start) for quick,
|
||||
free access to different types of sample data.
|
||||
|
||||
---
|
||||
{{< youtube GSaByPC1Bdc >}}
|
||||
|
||||
## Sample data sets
|
||||
The following sample data sets are used as examples in [InfluxDB query guides](/v2.0/query-data/flux)
|
|
@ -2,9 +2,11 @@
|
|||
title: Write data to InfluxDB
|
||||
list_title: Write data
|
||||
description: >
|
||||
Collect and write time series data to InfluxDB using line protocol, Telegraf, data scrapers,
|
||||
the InfluxDB v2 API, `influx` CLI, the InfluxDB UI, client libraries, and third-party technologies.
|
||||
Collect and write time series data to InfluxDB Cloud and InfluxDB OSS.
|
||||
weight: 2
|
||||
aliases:
|
||||
- /v2.0/write-data/quick-start/
|
||||
- /v2.0/write-data/sample-data/demo-data/
|
||||
menu:
|
||||
v2_0:
|
||||
name: Write data
|
||||
|
@ -17,17 +19,14 @@ related:
|
|||
- /v2.0/reference/cli/influx/write
|
||||
---
|
||||
|
||||
Collect and write time series data to InfluxDB using [line protocol](/v2.0/reference/syntax/line-protocol),
|
||||
Telegraf, data scrapers, the InfluxDB v2 API, `influx` command line interface (CLI),
|
||||
the InfluxDB user interface (UI), client libraries, and third-party technologies.
|
||||
Collect and write time series data to InfluxDB Cloud and InfluxDB OSS. Discover how to quickly start collecting data, and then explore other ways to write data using no-code solutions or developer tools.
|
||||
|
||||
|
||||
- [What you'll need](#what-you-ll-need)
|
||||
- [Ways to write data into InfluxDB](#ways-to-write-data-into-influxdb)
|
||||
- [User Interface](#user-interface)
|
||||
- [influx CLI](#influx-cli)
|
||||
- [InfluxDB API](#influxdb-api)
|
||||
- [Third-party technologies (with native line protocol support)](#third-party-technologies)
|
||||
- [Other ways to write data](#other-ways-to-write-data)
|
||||
- [Quickly start collecting data](#quickly-start-collecting-data)
|
||||
- [Demo data for InfluxDB Cloud](#demo-data-for-influxdb-cloud)
|
||||
- [Quick Start for InfluxDB OSS](#quick-start-for-influxdb-oss)
|
||||
- [Other ways to write data](#other-ways-to-write-data)
|
||||
- [Next steps](#next-steps)
|
||||
|
||||
### What you'll need
|
||||
|
@ -65,7 +64,7 @@ InfluxDB uses the current system time (UTC) of its host machine.
|
|||
|
||||
The default precision for timestamps is in nanoseconds.
|
||||
If the precision of the timestamps is anything other than nanoseconds (`ns`),
|
||||
you must specify the precision in your [write request](#ways-to-write-data-into-influxdb).
|
||||
you must **specify the precision in your write request**.
|
||||
InfluxDB accepts the following precisions:
|
||||
|
||||
- `ns` - Nanoseconds
|
||||
|
@ -76,232 +75,102 @@ InfluxDB accepts the following precisions:
|
|||
_For more details about line protocol, see the [Line protocol reference](/v2.0/reference/syntax/line-protocol)
|
||||
and [Best practices for writing data](/v2.0/write-data/best-practices/)._
|
||||
|
||||
## Ways to write data into InfluxDB
|
||||
## Quickly start collecting data
|
||||
|
||||
To write data into InfluxDB, use one of the following methods:
|
||||
Familiarize yourself with querying, visualizing, and processing data in InfluxDB Cloud and InfluxDB OSS by collecting data right away. The following options are available:
|
||||
|
||||
- [User Interface](#user-interface)
|
||||
- [influx CLI](#influx-cli)
|
||||
- [InfluxDB API](#influxdb-api)
|
||||
- [Demo data for InfluxDB Cloud](#demo-data-for-influxdb-cloud)
|
||||
- [Quick Start for InfluxDB OSS](#quick-start-for-influxdb-oss)
|
||||
|
||||
### User Interface
|
||||
|
||||
To quickly start writing data, use the provided user interface.
|
||||
## Demo data for InfluxDB Cloud
|
||||
Use **InfluxDB Cloud** demo data buckets for quick and easy access to different
|
||||
types of demo data that let you explore and familiarize yourself with InfluxDB Cloud.
|
||||
|
||||
1. Do one of the following:
|
||||
- _**InfluxDB 2.0 OSS**_:
|
||||
In your terminal, run `influxd` and then in your browser, go to the location
|
||||
where you're hosting the UI (by default, **localhost:9999**).
|
||||
- _**InfluxDB 2.0 Cloud**_:
|
||||
In your browser, go to https://cloud2.influxdata.com/.
|
||||
2. In the navigation menu on the left, select **Data** (**Load Data**) > **Buckets**.
|
||||
3. Under the bucket you want to write data to, click **{{< icon "plus" >}} Add Data**.
|
||||
4. Select from the following options:
|
||||
{{< youtube GSaByPC1Bdc >}}
|
||||
|
||||
- [Add a demo data bucket](#add-a-demo-data-bucket)
|
||||
- [Explore demo data](#explore-demo-data)
|
||||
- [View demo data dashboards](#view-demo-data-dashboards)
|
||||
|
||||
{{% note %}}
|
||||
#### Free to use and read-only
|
||||
- InfluxDB Cloud demo data buckets are **free to use** and are **_not_ subject to
|
||||
[Free Plan](/v2.0/account-management/pricing-plans/#free-plan) rate limits**.
|
||||
- Demo data buckets are **read-only**. You cannot write data into demo data buckets.
|
||||
{{% /note %}}
|
||||
|
||||
## Demo data sets
|
||||
Choose from the following demo data sets:
|
||||
|
||||
- **Website Monitoring**
|
||||
Explore, visualize, and monitor HTTP response metrics from InfluxData websites.
|
||||
|
||||
|
||||
## Add a demo data bucket
|
||||
1. In the navigation menu on the left, click **Data (Load Data)** > **Buckets**.
|
||||
|
||||
{{< nav-icon "data" >}}
|
||||
|
||||
2. Click **{{< icon "plus" >}} Add Demo Data**, and then select the demo data bucket to add.
|
||||
3. The Demo Data bucket appears in your list of buckets.
|
||||
|
||||
## Explore demo data
|
||||
Use the [Data Explorer](https://v2.docs.influxdata.com/v2.0/visualize-data/explore-metrics/)
|
||||
to query and visualize data in demo data buckets.
|
||||
|
||||
In the navigation menu on the left, click **Explore (Data Explorer)**.
|
||||
|
||||
{{< nav-icon "explore" >}}
|
||||
|
||||
## View demo data dashboards
|
||||
After adding a demo data bucket, view the pre-built dashboard specific to the demo data set:
|
||||
|
||||
1. In the navigation menu on the left, click **Boards (Dashboards)**.
|
||||
|
||||
{{< nav-icon "dashboards" >}}
|
||||
|
||||
2. Click the name of the dashboard that corresponds to your demo data bucket.
|
||||
|
||||
{{% note %}}
|
||||
#### Other sample data sets
|
||||
See [Sample data](/v2.0/reference/sample-data) for more sample InfluxDB data sets.
|
||||
{{% /note %}}
|
||||
|
||||
## Quick Start for InfluxDB OSS
|
||||
|
||||
Select **Quick Start** in the last step of the InfluxDB user interface's (UI)
|
||||
[setup process](/v2.0/get-started/#set-up-influxdb) to quickly start collecting data with InfluxDB.
|
||||
Quick Start creates a data scraper that collects metrics from the InfluxDB `/metrics` endpoint.
|
||||
The scraped data provides a robust dataset of internal InfluxDB metrics that you can query, visualize, and process.
|
||||
|
||||
### Use Quick Start to collect InfluxDB metrics
|
||||
After [setting up InfluxDB v2.0](/v2.0/get-started/#set-up-influxdb),
|
||||
the "Let's start collecting data!" page displays options for collecting data.
|
||||
Click **Quick Start**.
|
||||
|
||||
InfluxDB creates and configures a new [scraper](/v2.0/write-data/scrape-data/).
|
||||
The target URL points to the `/metrics` HTTP endpoint of your local InfluxDB instance
|
||||
(for example, `http://localhost:9999/metrics`), which outputs internal InfluxDB
|
||||
metrics in the [Prometheus data format](https://prometheus.io/docs/instrumenting/exposition_formats/).
|
||||
The scraper stores the scraped metrics in the bucket created during the
|
||||
[initial setup process](/v2.0/get-started/#set-up-influxdb).
|
||||
|
||||
{{% note %}}
|
||||
Quick Start is only available in the last step of the setup process.
|
||||
If you missed the Quick Start option, you can [manually create a scraper](/v2.0/write-data/scrape-data)
|
||||
that scrapes data from the `/metrics` endpoint.
|
||||
{{% /note %}}
|
||||
|
||||
- [Configure Telegraf Agent](#configure-telegraf-agent)
|
||||
- [Line Protocol](#line-protocol)
|
||||
- [Scrape Metrics](#scrape-metrics)
|
||||
|
||||
---
|
||||
|
||||
#### Configure Telegraf Agent
|
||||
|
||||
To configure a Telegraf agent, see [Automatically create a Telegraf configuration](/v2.0/write-data/use-telegraf/auto-config/#create-a-telegraf-configuration).
|
||||
|
||||
---
|
||||
|
||||
#### Line Protocol
|
||||
|
||||
1. Select **Upload File** or **Enter Manually**.
|
||||
- **Upload File:**
|
||||
Select the time precision of your data.
|
||||
Drag and drop the line protocol file into the UI or click to select the
|
||||
file from your file manager.
|
||||
- **Enter Manually:**
|
||||
Select the time precision of your data.
|
||||
Manually enter line protocol.
|
||||
2. Click **Write Data**.
|
||||
A message indicates whether data is successfully written to InfluxDB.
|
||||
3. To add more data or correct line protocol, click **Previous**.
|
||||
4. Click **Finish**.
|
||||
|
||||
---
|
||||
|
||||
#### Scrape Metrics
|
||||
|
||||
To scrape metrics, see [Create a scraper](/v2.0/write-data/scrape-data/manage-scrapers/create-a-scraper/#create-a-scraper-in-the-influxdb-ui).
|
||||
|
||||
{{% cloud %}}{{< cloud-name >}} does not support scrapers.
|
||||
{{% /cloud %}}
|
||||
|
||||
### influx CLI
|
||||
|
||||
From the command line, use the [`influx write` command](/v2.0/reference/cli/influx/write/) to write data to InfluxDB.
|
||||
Include the following in your command:
|
||||
|
||||
| Requirement | Include by |
|
||||
|:----------- |:---------- |
|
||||
| Organization | Use the `-o`,`--org`, or `--org-id` flags. |
|
||||
| Bucket | Use the `-b`, `--bucket`, or `--bucket-id` flags. |
|
||||
| Precision | Use the `-p`, `--precision` flag. |
|
||||
| Authentication token | Set the `INFLUX_TOKEN` environment variable or use the `t`, `--token` flag. |
|
||||
| Data | Write data using **line protocol** or **annotated CSV**. Pass a file with the `-f`, `--file` flag. |
|
||||
|
||||
_See [Line protocol](/v2.0/reference/syntax/line-protocol/) and [Annotated CSV](/v2.0/reference/syntax/annotated-csv)_
|
||||
|
||||
#### Example influx write commands
|
||||
|
||||
##### Write a single line of line protocol
|
||||
```sh
|
||||
influx write \
|
||||
-b bucketName \
|
||||
-o orgName \
|
||||
-p s \
|
||||
'myMeasurement,host=myHost testField="testData" 1556896326'
|
||||
```
|
||||
|
||||
##### Write line protocol from a file
|
||||
```sh
|
||||
influx write \
|
||||
-b bucketName \
|
||||
-o orgName \
|
||||
-p s \
|
||||
--format=lp
|
||||
-f /path/to/line-protocol.txt
|
||||
```
|
||||
|
||||
##### Write annotated CSV from a file
|
||||
```sh
|
||||
influx write \
|
||||
-b bucketName \
|
||||
-o orgName \
|
||||
-p s \
|
||||
--format=csv
|
||||
-f /path/to/data.csv
|
||||
```
|
||||
|
||||
### InfluxDB API
|
||||
|
||||
Write data to InfluxDB using an HTTP request to the InfluxDB API `/write` endpoint.
|
||||
Use the `POST` request method and include the following in your request:
|
||||
|
||||
| Requirement | Include by |
|
||||
|:----------- |:---------- |
|
||||
| Organization | Use the `org` query parameter in your request URL. |
|
||||
| Bucket | Use the `bucket` query parameter in your request URL. |
|
||||
| Precision | Use the `precision` query parameter in your request URL. |
|
||||
| Authentication token | Use the `Authorization: Token` header. |
|
||||
| Line protocol | Pass as plain text in your request body. |
|
||||
|
||||
#### Example API write request
|
||||
|
||||
Below is an example API write request using `curl`.
|
||||
The URL depends on the version and location of your InfluxDB 2.0 instance _(see [InfluxDB URLs](/v2.0/reference/urls/))_.
|
||||
|
||||
To compress data when writing to InfluxDB, set the `Content-Encoding` header to `gzip`.
|
||||
Compressing write requests reduces network bandwidth, but increases server-side load.
|
||||
|
||||
{{< code-tabs-wrapper >}}
|
||||
{{% code-tabs %}}
|
||||
[Uncompressed](#)
|
||||
[Compressed](#)
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
```sh
|
||||
curl -XPOST "http://localhost:9999/api/v2/write?org=YOUR_ORG&bucket=YOUR_BUCKET&precision=s" \
|
||||
--header "Authorization: Token YOURAUTHTOKEN" \
|
||||
--data-raw "
|
||||
mem,host=host1 used_percent=23.43234543 1556896326
|
||||
mem,host=host2 used_percent=26.81522361 1556896326
|
||||
mem,host=host1 used_percent=22.52984738 1556896336
|
||||
mem,host=host2 used_percent=27.18294630 1556896336
|
||||
"
|
||||
```
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
```bash
|
||||
curl -XPOST "http://localhost:9999/api/v2/write?org=YOUR_ORG&bucket=YOUR_BUCKET&precision=s" \
|
||||
--header "Authorization: Token YOURAUTHTOKEN" \
|
||||
--header "Content-Encoding: gzip" \
|
||||
--data-raw "
|
||||
mem,host=host1 used_percent=23.43234543 1556896326
|
||||
mem,host=host2 used_percent=26.81522361 1556896326
|
||||
mem,host=host1 used_percent=22.52984738 1556896336
|
||||
mem,host=host2 used_percent=27.18294630 1556896336
|
||||
"
|
||||
```
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
||||
_For information about **InfluxDB API response codes**, see
|
||||
[InfluxDB API Write documentation](/v2.0/api/#operation/PostWrite)._
|
||||
|
||||
### Third-party technologies
|
||||
|
||||
A number of third-party technologies can be configured to send line protocol directly to InfluxDB.
|
||||
|
||||
If you're using any of the following technologies, check out the handy links below to configure these technologies to write data to InfluxDB (**no additional software to download or install**):
|
||||
|
||||
- (Write metrics only) [Vector 0.9 or later](#configure-vector)
|
||||
|
||||
- [Apache NiFi 1.8 or later](#configure-apache-nifi)
|
||||
|
||||
- [OpenHAB 3.0 or later](#configure-openhab)
|
||||
|
||||
- [Apache JMeter 5.2 or later](#configure-apache-jmeter)
|
||||
|
||||
- [FluentD 1.x or later](#configure-fluentd)
|
||||
|
||||
#### Configure Vector
|
||||
|
||||
1. On the Vector.dev docs site, see the [InfluxDB Metrics Sink](https://vector.dev/docs/reference/sinks/influxdb_metrics/) page.
|
||||
2. Under **Configuration**, click **v2** to view configuration settings.
|
||||
3. Scroll down to [How It Works](https://vector.dev/docs/reference/sinks/influxdb_metrics/#how-it-works) for more detail.
|
||||
|
||||
#### Configure Apache NiFi
|
||||
|
||||
See the _[InfluxDB Processors for Apache NiFi Readme](https://github.com/influxdata/nifi-influxdb-bundle#influxdb-processors-for-apache-nifi)_ for details.
|
||||
|
||||
#### Configure OpenHAB
|
||||
|
||||
See the _[InfluxDB Persistence Readme](https://github.com/openhab/openhab-addons/tree/master/bundles/org.openhab.persistence.influxdb)_ for details.
|
||||
|
||||
#### Configure Apache JMeter
|
||||
|
||||
<!-- after doc updates are made, we can simplify to: See the _[Apache JMeter User's Manual - JMeter configuration](https://jmeter.apache.org/usermanual/realtime-results.html#jmeter-configuration)_ for details. -->
|
||||
|
||||
To configure Apache JMeter, complete the following steps in InfluxDB and JMeter.
|
||||
|
||||
##### In InfluxDB
|
||||
|
||||
1. [Find the name of your organization](https://v2.docs.influxdata.com/v2.0/organizations/view-orgs/) (needed to create a bucket and token).
|
||||
2. [Create a bucket using the influx CLI](https://v2.docs.influxdata.com/v2.0/organizations/buckets/create-bucket/#create-a-bucket-using-the-influx-cli) and name it `jmeter`.
|
||||
3. [Create a token](https://v2.docs.influxdata.com/v2.0/security/tokens/create-token/).
|
||||
|
||||
##### In JMeter
|
||||
|
||||
1. Create a [Backend Listener](https://jmeter.apache.org/usermanual/component_reference.html#Backend_Listener) using the _InfluxDBBackendListenerClient_ implementation.
|
||||
2. In the **Backend Listener implementation** field, enter _org.apache.jmeter.visualizers.backend.influxdb.influxdbBackendListenerClient_
|
||||
3. Under **Parameters**, specify the following:
|
||||
- **influxdbMetricsSender**: _org.apache.jmeter.visualizers.backend.influxdb.HttpMetricsSender_
|
||||
- **influxdbUrl**: _http://localhost:9999/api/v2/write?org=my-org&bucket=jmeter_ (include the bucket and org you created in InfluxDB)
|
||||
- **application**: _InfluxDB2_
|
||||
- **influxdbToken**: _my-token_ (include the token you created in InfluxDB)
|
||||
- Include additional parameters as needed.
|
||||
4. Click **Add** to add the _InfluxDBBackendListenerClient_ implementation.
|
||||
|
||||
#### Configure FluentD
|
||||
|
||||
See the _[influxdb-plugin-fluent Readme](https://github.com/influxdata/influxdb-plugin-fluent)_ for details.
|
||||
|
||||
## Other ways to write data
|
||||
|
||||
{{< children >}}
|
||||
There are multiple options for writing data into InfluxDB, including both no-code and developer solutions.
|
||||
|
||||
### InfluxDB client libraries
|
||||
|
||||
Use language-specific client libraries to integrate with the InfluxDB v2 API.
|
||||
See [Client libraries reference](/v2.0/reference/api/client-libraries/) for more information.
|
||||
- [No-code solutions](/v2.0/write-data/no-code)
|
||||
- [Developer tools](/v2.0/write-data/developer-tools)
|
||||
|
||||
---
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
title: Developer tools
|
||||
seotitle: Write data to InfluxDB with developer tools
|
||||
list_title: Use developer tools
|
||||
weight: 102
|
||||
description: >
|
||||
Write data to InfluxDB with developer tools.
|
||||
menu:
|
||||
v2_0:
|
||||
name: Developer tools
|
||||
parent: Write data
|
||||
---
|
||||
|
||||
Write data to InfluxDB with developer tools.
|
||||
|
||||
{{< children >}}
|
|
@ -0,0 +1,65 @@
|
|||
---
|
||||
title: InfluxDB API
|
||||
seotitle: Write data with the InfluxDB API
|
||||
list_title: Write data with the InfluxDB API
|
||||
weight: 206
|
||||
description: >
|
||||
Write data to InfluxDB using the InfluxDB API.
|
||||
menu:
|
||||
v2_0:
|
||||
name: InfluxDB API
|
||||
parent: Developer tools
|
||||
---
|
||||
Write data to InfluxDB using an HTTP request to the InfluxDB API `/write` endpoint.
|
||||
Use the `POST` request method and include the following in your request:
|
||||
|
||||
| Requirement | Include by |
|
||||
|:----------- |:---------- |
|
||||
| Organization | Use the `org` query parameter in your request URL. |
|
||||
| Bucket | Use the `bucket` query parameter in your request URL. |
|
||||
| Precision | Use the `precision` query parameter in your request URL. |
|
||||
| Authentication token | Use the `Authorization: Token` header. |
|
||||
| Line protocol | Pass as plain text in your request body. |
|
||||
|
||||
#### Example API write request
|
||||
|
||||
Below is an example API write request using `curl`.
|
||||
The URL depends on the version and location of your InfluxDB 2.0 instance _(see [InfluxDB URLs](/v2.0/reference/urls/))_.
|
||||
|
||||
To compress data when writing to InfluxDB, set the `Content-Encoding` header to `gzip`.
|
||||
Compressing write requests reduces network bandwidth, but increases server-side load.
|
||||
|
||||
{{< code-tabs-wrapper >}}
|
||||
{{% code-tabs %}}
|
||||
[Uncompressed](#)
|
||||
[Compressed](#)
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
```sh
|
||||
curl -XPOST "http://localhost:9999/api/v2/write?org=YOUR_ORG&bucket=YOUR_BUCKET&precision=s" \
|
||||
--header "Authorization: Token YOURAUTHTOKEN" \
|
||||
--data-raw "
|
||||
mem,host=host1 used_percent=23.43234543 1556896326
|
||||
mem,host=host2 used_percent=26.81522361 1556896326
|
||||
mem,host=host1 used_percent=22.52984738 1556896336
|
||||
mem,host=host2 used_percent=27.18294630 1556896336
|
||||
"
|
||||
```
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
```bash
|
||||
curl -XPOST "http://localhost:9999/api/v2/write?org=YOUR_ORG&bucket=YOUR_BUCKET&precision=s" \
|
||||
--header "Authorization: Token YOURAUTHTOKEN" \
|
||||
--header "Content-Encoding: gzip" \
|
||||
--data-raw "
|
||||
mem,host=host1 used_percent=23.43234543 1556896326
|
||||
mem,host=host2 used_percent=26.81522361 1556896326
|
||||
mem,host=host1 used_percent=22.52984738 1556896336
|
||||
mem,host=host2 used_percent=27.18294630 1556896336
|
||||
"
|
||||
```
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
||||
_For information about **InfluxDB API response codes**, see
|
||||
[InfluxDB API Write documentation](/v2.0/api/#operation/PostWrite)._
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
title: Client libraries
|
||||
seotitle: Write data with client libraries
|
||||
list_title: Write data with client libraries
|
||||
weight: 204
|
||||
description: >
|
||||
Write data to InfluxDB using client libraries.
|
||||
menu:
|
||||
v2_0:
|
||||
name: Client libraries
|
||||
parent: Developer tools
|
||||
---
|
||||
|
||||
Use language-specific client libraries to integrate with the InfluxDB v2 API.
|
||||
|
||||
See [Client libraries reference](/v2.0/reference/api/client-libraries/) for more information.
|
|
@ -7,8 +7,10 @@ description: >
|
|||
menu:
|
||||
v2_0:
|
||||
name: Write CSV data
|
||||
parent: Write data
|
||||
weight: 104
|
||||
parent: Developer tools
|
||||
aliases:
|
||||
- /v2.0/write-data/csv/
|
||||
weight: 204
|
||||
related:
|
||||
- /v2.0/reference/syntax/line-protocol/
|
||||
- /v2.0/reference/syntax/annotated-csv/
|
||||
|
@ -112,12 +114,12 @@ date,sighted,loc
|
|||
{{% flex-content %}}
|
||||
##### Resulting line protocol
|
||||
```
|
||||
birds,loc=Boise sighted=12 1577836800000000000
|
||||
birds,loc=Boise sighted=78 1590969600000000000
|
||||
birds,loc=Seattle sighted=54 1577836800000000000
|
||||
birds,loc=Seattle sighted=112 1590969600000000000
|
||||
birds,loc=Detroit sighted=9 1577836800000000000
|
||||
birds,loc=Detroit sighted=135 1590969600000000000
|
||||
birds,loc=Boise sighted=12i 1577836800000000000
|
||||
birds,loc=Boise sighted=78i 1590969600000000000
|
||||
birds,loc=Seattle sighted=54i 1577836800000000000
|
||||
birds,loc=Seattle sighted=112i 1590969600000000000
|
||||
birds,loc=Detroit sighted=9i 1577836800000000000
|
||||
birds,loc=Detroit sighted=135i 1590969600000000000
|
||||
```
|
||||
{{% /flex-content %}}
|
||||
{{< /flex >}}
|
||||
|
@ -157,12 +159,12 @@ date,sighted,loc
|
|||
|
||||
##### Resulting line protocol
|
||||
```
|
||||
birds,loc=Boise sighted=12 1577836800000000000
|
||||
birds,loc=Boise sighted=78 1590969600000000000
|
||||
birds,loc=Seattle sighted=54 1577836800000000000
|
||||
birds,loc=Seattle sighted=112 1590969600000000000
|
||||
birds,loc=Detroit sighted=9 1577836800000000000
|
||||
birds,loc=Detroit sighted=135 1590969600000000000
|
||||
birds,loc=Boise sighted=12i 1577836800000000000
|
||||
birds,loc=Boise sighted=78i 1590969600000000000
|
||||
birds,loc=Seattle sighted=54i 1577836800000000000
|
||||
birds,loc=Seattle sighted=112i 1590969600000000000
|
||||
birds,loc=Detroit sighted=9i 1577836800000000000
|
||||
birds,loc=Detroit sighted=135i 1590969600000000000
|
||||
```
|
||||
|
||||
## Skip annotation headers
|
||||
|
@ -228,6 +230,7 @@ Skipped rows are ignored and are not written to InfluxDB.
|
|||
|
||||
- [Define constants](#define-constants)
|
||||
- [Annotation shorthand](#annotation-shorthand)
|
||||
- [Ignore columns](#ignore-columns)
|
||||
- [Use alternate numeric formats](#use-alternate-numeric-formats)
|
||||
- [Use alternate boolean format](#use-alternate-boolean-format)
|
||||
- [Use different timestamp formats](#use-different-timestamp-formats)
|
||||
|
@ -326,10 +329,39 @@ example,18,2020-01-04T00:00:00Z
|
|||
{{% flex-content %}}
|
||||
##### Resulting line protocol
|
||||
```
|
||||
example count=1 1577836800000000000
|
||||
example count=4 1577923200000000000
|
||||
example count=0 1578009600000000000
|
||||
example count=18 1578096000000000000
|
||||
example count=1i 1577836800000000000
|
||||
example count=4i 1577923200000000000
|
||||
example count=0i 1578009600000000000
|
||||
example count=18i 1578096000000000000
|
||||
```
|
||||
{{% /flex-content %}}
|
||||
{{< /flex >}}
|
||||
|
||||
---
|
||||
|
||||
### Ignore columns
|
||||
Use the Extended annotated CSV [`#datatype ignored` annotation](/v2.0/reference/syntax/annotated-csv/extended/#ignored)
|
||||
to ignore columns when writing CSV data to InfluxDB.
|
||||
|
||||
{{< flex >}}
|
||||
{{% flex-content %}}
|
||||
##### CSV data with ignored column
|
||||
```
|
||||
#datatype measurement,long,time,ignored
|
||||
m,count,time,foo
|
||||
example,1,2020-01-01T00:00:00Z,bar
|
||||
example,4,2020-01-02T00:00:00Z,bar
|
||||
example,9,2020-01-03T00:00:00Z,baz
|
||||
example,18,2020-01-04T00:00:00Z,baz
|
||||
```
|
||||
{{% /flex-content %}}
|
||||
{{% flex-content %}}
|
||||
##### Resulting line protocol
|
||||
```
|
||||
m count=1i 1577836800000000000
|
||||
m count=4i 1577923200000000000
|
||||
m count=9i 1578009600000000000
|
||||
m count=18i 1578096000000000000
|
||||
```
|
||||
{{% /flex-content %}}
|
||||
{{< /flex >}}
|
|
@ -0,0 +1,58 @@
|
|||
---
|
||||
title: Influx CLI
|
||||
seotitle: Write data with the influx CLI
|
||||
list_title: Write data with the influx CLI
|
||||
weight: 205
|
||||
description: >
|
||||
Write data to InfluxDB using the `influx` CLI.
|
||||
menu:
|
||||
v2_0:
|
||||
name: Influx CLI
|
||||
parent: Developer tools
|
||||
related:
|
||||
- /v2.0/write-data/developer-tools/csv/
|
||||
---
|
||||
|
||||
To write data from the command line, use the [`influx write` command](/v2.0/reference/cli/influx/write/).
|
||||
Include the following in your command:
|
||||
|
||||
| Requirement | Include by |
|
||||
|:----------- |:---------- |
|
||||
| Organization | Use the `-o`,`--org`, or `--org-id` flags. |
|
||||
| Bucket | Use the `-b`, `--bucket`, or `--bucket-id` flags. |
|
||||
| Precision | Use the `-p`, `--precision` flag. |
|
||||
| Authentication token | Set the `INFLUX_TOKEN` environment variable or use the `t`, `--token` flag. |
|
||||
| Data | Write data using **line protocol** or **annotated CSV**. Pass a file with the `-f`, `--file` flag. |
|
||||
|
||||
_See [Line protocol](/v2.0/reference/syntax/line-protocol/) and [Annotated CSV](/v2.0/reference/syntax/annotated-csv)_
|
||||
|
||||
#### Example influx write commands
|
||||
|
||||
##### Write a single line of line protocol
|
||||
```sh
|
||||
influx write \
|
||||
-b bucketName \
|
||||
-o orgName \
|
||||
-p s \
|
||||
'myMeasurement,host=myHost testField="testData" 1556896326'
|
||||
```
|
||||
|
||||
##### Write line protocol from a file
|
||||
```sh
|
||||
influx write \
|
||||
-b bucketName \
|
||||
-o orgName \
|
||||
-p s \
|
||||
--format=lp
|
||||
-f /path/to/line-protocol.txt
|
||||
```
|
||||
|
||||
##### Write annotated CSV from a file
|
||||
```sh
|
||||
influx write \
|
||||
-b bucketName \
|
||||
-o orgName \
|
||||
-p s \
|
||||
--format=csv
|
||||
-f /path/to/data.csv
|
||||
```
|
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
title: No-code solutions
|
||||
seotitle: Write data to InfluxDB without coding
|
||||
list_title: Write data to InfluxDB without coding
|
||||
weight: 101
|
||||
description: >
|
||||
Write data to InfluxDB without writing code.
|
||||
aliases:
|
||||
- /v2.0/collect-data/advanced-telegraf
|
||||
- /v2.0/collect-data/use-telegraf
|
||||
menu:
|
||||
v2_0:
|
||||
name: No-code solutions
|
||||
parent: Write data
|
||||
---
|
||||
|
||||
The following options let you write data to InfluxDB without writing any code. Some options require a minimal amount of configuration.
|
||||
|
||||
{{< children >}}
|
|
@ -8,11 +8,12 @@ description: >
|
|||
aliases:
|
||||
- /v2.0/collect-data/scraper-metrics-endpoint
|
||||
- /v2.0/collect-data/scrape-data
|
||||
- /v2.0/write-data/scrapable-endpoints
|
||||
v2.0/tags: [scraper]
|
||||
menu:
|
||||
v2_0:
|
||||
name: Scrape data
|
||||
parent: Write data
|
||||
parent: No-code solutions
|
||||
products: [oss]
|
||||
---
|
||||
|
|
@ -4,6 +4,7 @@ seotitle: Manage InfluxDB scrapers
|
|||
description: Create, update, and delete InfluxDB data scrapers in the InfluxDB user interface.
|
||||
aliases:
|
||||
- /v2.0/collect-data/scrape-data/manage-scrapers
|
||||
- /v2.0/write-data/scrape-data/manage-scrapers
|
||||
menu:
|
||||
v2_0:
|
||||
name: Manage scrapers
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue