diff --git a/api-docs/v2.0/swagger.yml b/api-docs/v2.0/swagger.yml index 6eb562e3e..a481596f8 100644 --- a/api-docs/v2.0/swagger.yml +++ b/api-docs/v2.0/swagger.yml @@ -4375,6 +4375,84 @@ paths: schema: $ref: "#/components/schemas/Error" /packages/stacks: + get: + operationId: ListStacks + tags: + - InfluxPackages + summary: Grab a list of installed Influx packages + parameters: + - in: query + name: orgID + required: true + schema: + type: string + description: The organization id of the stacks + - in: query + name: name + schema: + type: string + description: A collection of names to filter the list by. + - in: query + name: stackID + schema: + type: string + description: A collection of stackIDs to filter the list by. + responses: + '200': + description: Influx stacks found + content: + application/json: + schema: + type: array + items: + type: object + properties: + id: + type: string + orgID: + type: string + name: + type: string + description: + type: string + urls: + type: array + items: + type: string + createdAt: + type: string + format: date-time + readOnly: true + updatedAt: + type: string + format: date-time + readOnly: true + resources: + type: object + properties: + apiVersion: + type: string + resourceID: + type: string + kind: + type: string + pkgName: + type: string + associations: + type: array + items: + type: object + properties: + kind: + type: string + pkgName: + type: string + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" post: operationId: CreateStack tags: @@ -4432,6 +4510,34 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" + /packages/stacks/{stack_id}: + delete: + operationId: DeleteStack + tags: + - InfluxPackages + summary: Delete a stack and remove all its associated resources + parameters: + - in: path + name: stack_id + required: true + schema: + type: string + description: The stack id to be removed + - in: query + name: orgID + required: true + schema: + type: string + description: The organization id of the user + responses: + '204': + description: Stack and all its associated resources are deleted + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" /tasks: get: operationId: GetTasks @@ -4936,6 +5042,27 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" + /flags: + get: + operationId: GetFlags + tags: + - Users + summary: Return the feature flags for the currently authenticated user + parameters: + - $ref: '#/components/parameters/TraceSpan' + responses: + '200': + description: Feature flags for the currently authenticated user + content: + application/json: + schema: + $ref: "#/components/schemas/Flags" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" /me: get: operationId: GetMe @@ -8138,6 +8265,9 @@ components: type: array items: $ref: "#/components/schemas/User" + Flags: + type: object + additionalProperties: true ResourceMember: allOf: - $ref: "#/components/schemas/User" @@ -8223,6 +8353,9 @@ components: me: type: string format: uri + flags: + type: string + format: uri orgs: type: string format: uri diff --git a/assets/styles/layouts/article/_lists.scss b/assets/styles/layouts/article/_lists.scss index c9e88b9d8..62335622e 100644 --- a/assets/styles/layouts/article/_lists.scss +++ b/assets/styles/layouts/article/_lists.scss @@ -13,32 +13,29 @@ ul { } ol { - list-style-type: none; + list-style: none; counter-reset: item; - margin: 0; - padding: 0; -} -ol > li { - display: table; - counter-increment: item; - margin-bottom: 0.6em; + li { + position: relative; + counter-increment: item; - &:before { - content: counters(item, ".") ". "; - display: table-cell; - padding-right: 0.6em; - letter-spacing: .05rem; - color: $article-bold; - font-weight: bold; - } -} + &:before { + content: counter(item) ". "; + position: absolute; + left: -1.6em; + color: $article-bold; + font-weight: bold; + } -li ol > li { - margin: .5rem 0; + & > ol li:before { content: counter(item, lower-latin) ". "; } + & > ol li ol li:before { content: counter(item) ". "; } + & > ol li ol li ol li:before { content: counter(item, lower-latin) ". "; } + & > ol li ol li ol li ol li:before { content: counter(item) ". "; } - &:before { - content: counters(item, ".") "."; + ul { + counter-reset: item; + } } } diff --git a/content/v2.0/account-management/multi-member/_index.md b/content/v2.0/account-management/multi-member/_index.md new file mode 100644 index 000000000..6fe8b6980 --- /dev/null +++ b/content/v2.0/account-management/multi-member/_index.md @@ -0,0 +1,20 @@ +--- +title: Manage multiple members +description: > + View and manage multiple members in an InfluxDB Cloud account. +weight: 4 +menu: + v2_0: + parent: Account management + name: Manage multiple members +--- + +{{< cloud-name >}} accounts support multiple members in an organization. +Collaborate with others using these features. +By default, each member has full permissions on resources in your organization. + +{{< children >}} + +{{% cloud %}} +**Known issue**: Currently, checks created before a member is added are not visible to that member. +{{% /cloud %}} diff --git a/content/v2.0/account-management/multi-member/invite-member.md b/content/v2.0/account-management/multi-member/invite-member.md new file mode 100644 index 000000000..7f1bf84d4 --- /dev/null +++ b/content/v2.0/account-management/multi-member/invite-member.md @@ -0,0 +1,28 @@ +--- +title: Invite a member +list_title: Invite a member +description: > + Invite a member to collaborate in InfluxDB Cloud. +weight: 103 +menu: + v2_0: + parent: Manage multiple members + name: Invite a member +--- + +1. Navigate to the **Members** page under **Organizations** in the left navigation bar. + {{< nav-icon "org" >}} +2. Under **Add a new member to your organization**, enter the email address of the member to invite. + (Members must be invited one at a time.) +3. Click **Add & Invite**. + +An invitation with an activation link is sent to the specified email address. +The activation link expires after 72 hours. + +Once activated, the new member is added as an **Owner** with permissions to read and write all resources. + +{{% warn %}} +Currently, Cloud 2.0 has only one permission level: Owner. +With Owner permissions, a member can delete resources and other members from your organization. +Take care when inviting a member. +{{% /warn %}} diff --git a/content/v2.0/account-management/multi-member/remove-memberr.md b/content/v2.0/account-management/multi-member/remove-memberr.md new file mode 100644 index 000000000..614bebe14 --- /dev/null +++ b/content/v2.0/account-management/multi-member/remove-memberr.md @@ -0,0 +1,16 @@ +--- +title: Remove a member +seotitle: Remove a member from your InfluxDB Cloud organization +description: > + Remove a member from an InfluxDB Cloud organization. +weight: 103 +menu: + v2_0: + parent: Manage multiple members + identifier: remove_member_cloud +--- + +1. Navigate to the **Members** page under **Organizations** in the left navigation bar. + {{< nav-icon "org" >}} +2. Click the {{< icon "delete" >}} next to the member you want to remove. +3. Confirm the removal. diff --git a/content/v2.0/get-started.md b/content/v2.0/get-started.md index dc25fc8f2..7a0050dfb 100644 --- a/content/v2.0/get-started.md +++ b/content/v2.0/get-started.md @@ -116,7 +116,7 @@ executables, and running the initial setup process. ### Download and install InfluxDB v2.0 beta Download InfluxDB v2.0 beta for macOS. -InfluxDB v2.0 beta (macOS) +InfluxDB v2.0 beta (macOS) ### Unpackage the InfluxDB binaries To unpackage the downloaded archive, **double click the archive file in Finder** @@ -125,7 +125,7 @@ or run the following command in a macOS command prompt application such ```sh # Unpackage contents to the current working directory -tar zxvf ~/Downloads/influxdb_2.0.0-beta.9_darwin_amd64.tar.gz +tar zxvf ~/Downloads/influxdb_2.0.0-beta.10_darwin_amd64.tar.gz ``` #### (Optional) Place the binaries in your $PATH @@ -134,7 +134,7 @@ prefix the executables with `./` to run then in place. ```sh # (Optional) Copy the influx and influxd binary to your $PATH -sudo cp influxdb_2.0.0-beta.9_darwin_amd64/{influx,influxd} /usr/local/bin/ +sudo cp influxdb_2.0.0-beta.10_darwin_amd64/{influx,influxd} /usr/local/bin/ ``` {{% note %}} @@ -198,8 +198,8 @@ influxd --reporting-disabled ### Download and install InfluxDB v2.0 beta Download the InfluxDB v2.0 beta package appropriate for your chipset. -InfluxDB v2.0 beta (amd64) -InfluxDB v2.0 beta (arm) +InfluxDB v2.0 beta (amd64) +InfluxDB v2.0 beta (arm) ### Place the executables in your $PATH Unpackage the downloaded archive and place the `influx` and `influxd` executables in your system `$PATH`. @@ -208,10 +208,10 @@ _**Note:** The following commands are examples. Adjust the file names, paths, an ```sh # Unpackage contents to the current working directory -tar xvzf path/to/influxdb_2.0.0-beta.9_linux_amd64.tar.gz +tar xvzf path/to/influxdb_2.0.0-beta.10_linux_amd64.tar.gz # Copy the influx and influxd binary to your $PATH -sudo cp influxdb_2.0.0-beta.9_linux_amd64/{influx,influxd} /usr/local/bin/ +sudo cp influxdb_2.0.0-beta.10_linux_amd64/{influx,influxd} /usr/local/bin/ ``` {{% note %}} diff --git a/content/v2.0/influxdb-templates/create.md b/content/v2.0/influxdb-templates/create.md index a11f24f47..0093ffbaf 100644 --- a/content/v2.0/influxdb-templates/create.md +++ b/content/v2.0/influxdb-templates/create.md @@ -9,6 +9,9 @@ menu: identifier: Create an InfluxDB template weight: 103 v2.0/tags: [templates] +related: + - /v2.0/reference/cli/influx/pkg/export/ + - /v2.0/reference/cli/influx/pkg/export/all/ --- Use the InfluxDB user interface (UI) and the `influx pkg export` command to diff --git a/content/v2.0/influxdb-templates/use.md b/content/v2.0/influxdb-templates/use.md index 23931b605..760b4f81c 100644 --- a/content/v2.0/influxdb-templates/use.md +++ b/content/v2.0/influxdb-templates/use.md @@ -9,6 +9,8 @@ menu: name: Use templates weight: 102 v2.0/tags: [templates] +related: + - /v2.0/reference/cli/influx/pkg/ --- Use the `influx pkg` command to summarize, validate, and install templates from @@ -27,11 +29,19 @@ others in the InfluxData community. Install community templates directly from GitHub using a template's download URL or download the template. -{{% note %}} When attempting to access the community templates via the URL, the templates use the following -as the root of the URL: `https://raw.githubusercontent.com/influxdata/community-templates/master/`. +{{% note %}} +When attempting to access the community templates via the URL, the templates use the following +as the root of the URL: + +```sh +https://raw.githubusercontent.com/influxdata/community-templates/master/ +``` For example, the Docker community template can be accessed via: -`https://raw.githubusercontent.com/influxdata/community-templates/master/docker/docker.yml`. + +```sh +https://raw.githubusercontent.com/influxdata/community-templates/master/docker/docker.yml +``` {{% /note %}} View InfluxDB Community Templates @@ -113,14 +123,14 @@ to provide the **file path** of the template manifest. ```sh # Syntax -influx pkg -f +influx pkg -o -f # Examples # Install a single template -influx pkg -f /path/to/template.yml +influx pkg -o example-org -f /path/to/template.yml # Install multiple templates -influx pkg \ +influx pkg -o example-org \ -f /path/to/this/template.yml \ -f /path/to/that/template.yml ``` @@ -134,14 +144,14 @@ include the `--recurse` flag. ```sh # Syntax -influx pkg -f +influx pkg -o -f # Examples # Install all templates in a directory -influx pkg -f /path/to/template/dir/ +influx pkg -o example-org -f /path/to/template/dir/ # Install all templates in a directory and its subdirectories -influx pkg -f /path/to/template/dir/ --recurse +influx pkg -o example-org -f /path/to/template/dir/ --recurse ``` ### Install a template from a URL @@ -150,14 +160,14 @@ of the template manifest. ```sh # Syntax -influx pkg -u +influx pkg -o -u # Examples # Install a single template from a URL -influx pkg -u https://example.com/templates/template.yml +influx pkg -o example-org -u https://example.com/templates/template.yml # Install multiple templates from URLs -influx pkg \ +influx pkg -o example-org \ -u https://example.com/templates/template1.yml \ -u https://example.com/templates/template2.yml ``` @@ -168,10 +178,10 @@ file or directory paths and URLs, each with the appropriate `-f` or `-u` flag. ```sh # Syntax -influx pkg -u -f +influx pkg -o -u -f # Example -influx pkg \ +influx pkg -o example-org \ -u https://example.com/templates/template1.yml \ -u https://example.com/templates/template2.yml \ -f ~/templates/custom-template.yml \ @@ -188,7 +198,7 @@ flag with a key-value pair comprised of the environment reference key and the value to replace it. ```sh -influx pkg -f /path/to/template.yml \ +influx pkg -o example-org -f /path/to/template.yml \ --env-ref=bucket-name-1=myBucket --env-ref=label-name-1=Label1 \ --env-ref=label-name-2=Label2 @@ -202,18 +212,18 @@ with the secret key-value pair. ```sh # Syntax -influx pkg -f --secret== +influx pkg -o -f \ + --secret== # Examples # Define a single secret when installing a template -influx pkg -f /path/to/template.yml \ +influx pkg -o example-org -f /path/to/template.yml \ --secret=FOO=BAR # Define multiple secrets when installing a template -influx pkg -f /path/to/template.yml \ +influx pkg -o example-org -f /path/to/template.yml \ --secret=FOO=bar \ --secret=BAZ=quz ``` _To add a secret after installing a template, see [Add secrets](/v2.0/security/secrets/manage-secrets/add/)._ - diff --git a/content/v2.0/monitor-alert/checks/_index.md b/content/v2.0/monitor-alert/checks/_index.md index 2c84bb054..b4700ecfe 100644 --- a/content/v2.0/monitor-alert/checks/_index.md +++ b/content/v2.0/monitor-alert/checks/_index.md @@ -17,3 +17,7 @@ Checks in InfluxDB query data and apply a status or level to each data point bas Learn how to create and manage checks: {{< children >}} + +{{% cloud %}} +**Known issue**: Currently in {{< cloud-name >}}, checks created before a [member is added to an organization](/v2.0/account-management/multi-member) are not visible to that member. +{{% /cloud %}} diff --git a/content/v2.0/monitor-alert/checks/view.md b/content/v2.0/monitor-alert/checks/view.md index 3c8412d4b..bb83be1c3 100644 --- a/content/v2.0/monitor-alert/checks/view.md +++ b/content/v2.0/monitor-alert/checks/view.md @@ -26,6 +26,10 @@ To view checks, click **Alerts** in navigation menu on the left. ## View a list of all checks The **Checks** section of the Alerts landing page displays all existing checks. +{{% cloud %}} +**Known issue**: Currently in {{< cloud-name >}}, checks created before a [member is added to an organization](/v2.0/account-management/multi-member) are not visible to that member. +{{% /cloud %}} + ## View check details Click the name of the check you want to view. The check builder appears. diff --git a/content/v2.0/organizations/buckets/create-bucket.md b/content/v2.0/organizations/buckets/create-bucket.md index 07942f175..705cdd7f1 100644 --- a/content/v2.0/organizations/buckets/create-bucket.md +++ b/content/v2.0/organizations/buckets/create-bucket.md @@ -14,6 +14,10 @@ to create a bucket. ## Create a bucket in the InfluxDB UI +There are two places you can create a bucket in the UI. + +### Create a bucket from the Load Data menu + 1. In the navigation menu on the left, select **Data (Load Data)** > **Buckets**. {{< nav-icon "data" >}} @@ -25,6 +29,20 @@ to create a bucket. - **Older than** to choose a specific retention policy. 5. Click **Create** to create the bucket. +### Create a bucket in the Data Explorer + +1. In the navigation menu on the left, select **Explore* (**Data Explorer**). + + {{< nav-icon "data-explorer" >}} + +2. In the **From** panel in the Flux Builder, select `+ Create Bucket`. +3. Enter a **Name** for the bucket. +4. Select when to **Delete Data**: + - **Never** to retain data forever. + - **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) diff --git a/content/v2.0/organizations/buckets/update-bucket.md b/content/v2.0/organizations/buckets/update-bucket.md index cfb5933e1..4ceafda1e 100644 --- a/content/v2.0/organizations/buckets/update-bucket.md +++ b/content/v2.0/organizations/buckets/update-bucket.md @@ -63,8 +63,8 @@ influx bucket update -i 034ad714fdd6f000 -o my-org -n my-new-bucket ##### Update a bucket's retention policy ```sh # Syntax -influx bucket update -i -o -r +influx bucket update -i -r # Example -influx bucket update -i 034ad714fdd6f000 -o my-org -r 1209600000000000 +influx bucket update -i 034ad714fdd6f000 -r 1209600000000000 ``` diff --git a/content/v2.0/organizations/members/add-member.md b/content/v2.0/organizations/members/add-member.md index def6e46c9..db31979ed 100644 --- a/content/v2.0/organizations/members/add-member.md +++ b/content/v2.0/organizations/members/add-member.md @@ -12,7 +12,7 @@ weight: 201 Use the `influx` command line interface (CLI) to add a member to an organization. {{% cloud %}} -Adding members is currently unavailable in {{< cloud-name >}}. +To manage members of an organization in {{< cloud-name >}}, see [Manage multiple users](/v2.0/account-management/multi-user/). {{% /cloud %}} +### RFC3339 timestamp +A timestamp that uses the human readable DateTime format proposed in +[RFC 3339](https://tools.ietf.org/html/rfc3339) (for example: `2020-01-01T00:00:00.00Z`). +Flux and InfluxDB clients return query results with RFC3339 timestamps. + +Related entries: [timestamp](#timestamp), [unix timestamp](#unix-timestamp) + ## S ### schema @@ -927,13 +934,8 @@ Related entries: [bin](#bin) ### step-plot -<<<<<<< HEAD A data visualization that displays time series data in a staircase graph. Generate a step-plot using the step [interpolation option for line graphs](/v2.0/visualize-data/visualization-types/graph/#options). -======= -In InfluxDB 1.x, a [step-plot graph](https://docs.influxdata.com/chronograf/v1.7/guides/visualization-types/#step-plot-graph) displays time series data in a staircase graph. -In InfluxDB 2.0, generate a similar graph using the step interpolation option for [line graphs](/v2.0/visualize-data/visualization-types/graph/#options). ->>>>>>> master ### stream @@ -1025,7 +1027,7 @@ Time in InfluxDB is in UTC. To specify time when writing data, see [Elements of line protocol](/v2.0/reference/syntax/line-protocol/#elements-of-line-protocol). To specify time when querying data, see [Query InfluxDB with Flux](/v2.0/query-data/get-started/query-influxdb/#2-specify-a-time-range). -Related entries: [point](#point) +Related entries: [point](#point), [unix timestamp](#unix-timestamp), [RFC3339 timestamp](#rfc3339-timestamp) ### token @@ -1045,7 +1047,7 @@ See [InfluxQL functions](http://docs.influxdata.com/influxdb/latest/query_langua Related entries: [aggregate](#aggregate), [function](#function), [selector](#selector) -## TSI (Time Series Index) +### TSI (Time Series Index) TSI uses the operating system's page cache to pull frequently accessed data into memory and keep infrequently accessed data on disk. @@ -1053,7 +1055,7 @@ TSI uses the operating system's page cache to pull frequently accessed data into The Time Series Logs (TSL) extension (.tsl) identifies Time Series Index (TSI) log files, generated by the tsi1 engine. -## TSM (Time Structured Merge tree) +### TSM (Time Structured Merge tree) A data storage format that allows greater compaction and higher write and read throughput than B+ or LSM tree implementations. For more information, see [Storage engine](http://docs.influxdata.com/influxdb/latest/concepts/storage_engine/). @@ -1075,6 +1077,23 @@ This protocol is used when speed is desirable and error correction is not necess An implicit block that encompasses all Flux source text in a universe block. +### unix timestamp + +Counts time since **Unix Epoch (1970-01-01T00:00:00Z UTC)** in specified units ([precision](#precision)). +Specify timestamp precision when [writing data to InfluxDB](/v2.0/write-data/). +InfluxDB supports the following unix timestamp precisions: + +| Precision | Description | Example | +|:--------- |:----------- |:------- | +| `ns` | Nanoseconds | `1577836800000000000` | +| `us` | Microseconds | `1577836800000000` | +| `ms` | Milliseconds | `1577836800000` | +| `s` | Seconds | `1577836800` | + +

The examples above represent 2020-01-01T00:00:00Z UTC.

+ +Related entries: [timestamp](#timestamp), [RFC3339 timestamp](#rfc3339-timestamp) + ### user InfluxDB users are granted permission to access to InfluxDB. @@ -1082,13 +1101,18 @@ Users are added as a member of an organization and are given a unique authentica ## V -## values per second +### values per second The preferred measurement of the rate at which data are persisted to InfluxDB. Write speeds are generally quoted in values per second. -To calculate the values per second rate, multiply the number of points written per second by the number of values stored per point. -For example, if the points have four fields each, and a batch of 5000 points is written 10 times per second, the values per second rate is `4 field values per point * 5000 points per batch * 10 batches per second = 200,000 values per second`. +To calculate the values per second rate, multiply the number of points written +per second by the number of values stored per point. +For example, if the points have four fields each, and a batch of 5000 points is +written 10 times per second, the values per second rate is: + +**4 field values per point** × **5000 points per batch** × **10 batches per second** = **200,000 values per second** + Related entries: [batch](#batch), [field](#field), [point](#point) diff --git a/content/v2.0/reference/key-concepts/data-elements.md b/content/v2.0/reference/key-concepts/data-elements.md index f8ca28895..89cb7484f 100644 --- a/content/v2.0/reference/key-concepts/data-elements.md +++ b/content/v2.0/reference/key-concepts/data-elements.md @@ -40,7 +40,7 @@ _Hover over highlighted terms to get acquainted with InfluxDB terminology and la ## Timestamp -All data stored in InfluxDB has a `_time` column that stores timestamps. On disk, timestamps are stored in epoch nanosecond format. InfluxDB formats timestamps show the date and time in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) UTC associated with data. Timestamp precision is important when you write data. +All data stored in InfluxDB has a `_time` column that stores timestamps. On disk, timestamps are stored in epoch nanosecond format. InfluxDB formats timestamps show the date and time in [RFC3339](/v2.0/reference/glossary/#rfc3339-timestamp) UTC associated with data. Timestamp precision is important when you write data. ## Measurement diff --git a/content/v2.0/reference/release-notes/influxdb.md b/content/v2.0/reference/release-notes/influxdb.md index 075ca38d9..827286226 100644 --- a/content/v2.0/reference/release-notes/influxdb.md +++ b/content/v2.0/reference/release-notes/influxdb.md @@ -8,6 +8,25 @@ menu: weight: 101 --- +## v2.0.0-beta.10 [2020-05-07] + +### Features + +- Add ability to delete a stack and all associated resources. +- Enforce DNS name compliance on the `metadata.name` field in all `pkger` resources. +- Add stateful `pkg` management with stacks. + +### Bug Fixes + +- Ensure `UpdateUser` cleans up the index when updating names. +- Ensure Checks can be set for zero values. + +### UI Improvements + +- Create buckets in the Data Explorer and Cell Editor. + +--- + ## v2.0.0-beta.9 [2020-04-23] ### Bug Fixes @@ -20,6 +39,8 @@ weight: 101 - Sort dashboards on Getting Started page by recently modified. - Add single-color schemes for visualizations: Solid Red, Solid Blue, Solid Yellow, Solid Green, and Solid Purple. +--- + ## v2.0.0-beta.8 [2020-04-10] ### Features @@ -40,6 +61,8 @@ weight: 101 - Update layout of Alerts page to work on all screen sizes. - Sort dashboards on Getting Started page by recently modified. +--- + ## v2.0.0-beta.7 [2020-03-27] ### Features @@ -131,6 +154,8 @@ weight: 101 - Remove pkger gauge chart requirement for color threshold type. - Remove secret confirmation from `influx secret update`. +--- + ## v2.0.0-beta.4 [2020-02-14] ### Features diff --git a/content/v2.0/reference/syntax/line-protocol.md b/content/v2.0/reference/syntax/line-protocol.md index 7bfae3b61..ea15303b6 100644 --- a/content/v2.0/reference/syntax/line-protocol.md +++ b/content/v2.0/reference/syntax/line-protocol.md @@ -10,6 +10,8 @@ weight: 102 v2.0/tags: [write, line protocol, syntax] aliases: - /v2.0/reference/line-protocol +related: + - /v2.0/write-data/ --- InfluxDB uses line protocol to write data points. @@ -87,20 +89,18 @@ measurementName fieldKey="field string value" 1556813561098000000 ### Timestamp _**Optional**_ – -The Unix nanosecond timestamp for the data point. +The [unix timestamp](/v2.0/reference/glossary/#unix-timestamp) for the data point. InfluxDB accepts one timestamp per point. If no timestamp is provided, InfluxDB uses the system time (UTC) of its host machine. _**Data type:** [Unix timestamp](#unix-timestamp)_ {{% note %}} -To ensure a data point includes the time a metric is observed (not received by InfluxDB), -include the timestamp. -{{% /note %}} - -{{% note %}} -_Use the default nanosecond precision timestamp or specify an alternative precision -when [writing the data](/v2.0/write-data/#timestamp-precision)._ +#### Important notes about timestamps +- To ensure a data point includes the time a metric is observed (not received by InfluxDB), + include the timestamp. +- If your timestamps are not in nanoseconds, specify the precision of your timestamps + when [writing the data to InfluxDB](/v2.0/write-data/#timestamp-precision). {{% /note %}} ### Whitespace @@ -191,7 +191,8 @@ Quoted field values are interpreted as strings. {{% /note %}} ### Unix timestamp -Unix nanosecond timestamp. +Unix timestamp in a [specified precision](/v2.0/reference/glossary/#unix-timestamp). +Default precision is nanoseconds (`ns`). | Minimum timestamp | Maximum timestamp | | ----------------- | ----------------- | diff --git a/content/v2.0/security/secrets/_index.md b/content/v2.0/security/secrets/_index.md index 42435639b..77db72005 100644 --- a/content/v2.0/security/secrets/_index.md +++ b/content/v2.0/security/secrets/_index.md @@ -1,6 +1,6 @@ --- title: Store and use secrets -description: +description: Use BoltDB or Vault to store secrets for InfluxDB. v2.0/tags: [secrets, security] menu: v2_0: diff --git a/content/v2.0/visualize-data/explore-metrics.md b/content/v2.0/visualize-data/explore-metrics.md index 9105307ef..ac4116aa5 100644 --- a/content/v2.0/visualize-data/explore-metrics.md +++ b/content/v2.0/visualize-data/explore-metrics.md @@ -31,7 +31,7 @@ See [Get started with Flux](/v2.0/query-data/get-started) to learn more about Fl {{< nav-icon "data-explorer" >}} 2. Use the Flux builder in the bottom panel to create a Flux query: - - Select a bucket to define your data source. + - Select a bucket to define your data source or select `+ Create Bucket` to add a new bucket. - Edit your time range with the [time range option](#select-time-range) in the dropdown menu. - Add filters to narrow your data by selecting attributes or columns in the dropdown menu. - Select **Group** from the **Filter** dropdown menu to group data into tables. For more about how grouping data in Flux works, see [Group data](/v2.0/query-data/flux/group-data/). diff --git a/content/v2.0/visualize-data/variables/_index.md b/content/v2.0/visualize-data/variables/_index.md index fc7bc6c76..9548119b4 100644 --- a/content/v2.0/visualize-data/variables/_index.md +++ b/content/v2.0/visualize-data/variables/_index.md @@ -23,7 +23,7 @@ Reference each variable using dot-notation (e.g. `v.variableName`). ```js from(bucket: v.bucket) - |> range(start: v.timeRangeStart, stop: v.timeRangeStart) + |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r._measurement == v.measurement and r._field == v.field) |> aggregateWindow(every: v.windowPeriod, fn: mean) ``` @@ -35,6 +35,10 @@ in the **Variables** tab next to the Functions tab. Click a variable name to add it to your query and select a value from the **Value** dropdown. +## Link to dashboards with variables defined in the URL + +When you apply a variable to your dashboard, `&vars[variable_name]=value` is appended to the URL so you can share the link with the variables included. + ## Predefined dashboard variables The InfluxDB user interface (UI) provides the following predefined dashboard variables: diff --git a/content/v2.0/write-data/_index.md b/content/v2.0/write-data/_index.md index 127812d3e..e94db17ea 100644 --- a/content/v2.0/write-data/_index.md +++ b/content/v2.0/write-data/_index.md @@ -26,7 +26,8 @@ the InfluxDB user interface (UI), and client libraries. - [User Interface](#user-interface) - [influx CLI](#influx-cli) - [InfluxDB API](#influxdb-api) - - [Others](#others) + - [Other ways to write data](#other-ways-to-write-data) +- [Next steps](#next-steps) ### What you'll need @@ -56,7 +57,7 @@ mem,host=host1 used_percent=21.83599203 1556892777007291000 ``` #### Timestamp precision -Timestamps are essential in InfluxDB. +When writing data to InfluxDB, we [recommend including a timestamp](/v2.0/reference/syntax/line-protocol/#timestamp) with each point. If a data point does not include a timestamp when it is received by the database, InfluxDB uses the current system time (UTC) of its host machine. @@ -70,7 +71,8 @@ InfluxDB accepts the following precisions: - `ms` - Milliseconds - `s` - Seconds -_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/)._ +_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 @@ -179,7 +181,7 @@ influx write \ ### InfluxDB API Write data to InfluxDB using an HTTP request to the InfluxDB API `/write` endpoint. -Include the following in your request: +Use the `POST` request method and include the following in your request: | Requirement | Include by | |:----------- |:---------- | @@ -189,19 +191,50 @@ Include the following in your request: | Authentication token | Use the `Authorization: Token` header. | | Line protocol | Pass as plain text in your request body. | -##### Example API write request +#### 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. +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" + --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 >}} -### Others +_For information about **InfluxDB API response codes**, see +[InfluxDB API Write documentation](/v2.0/api/#operation/PostWrite)._ + +## Other ways to write data {{< children >}} @@ -209,3 +242,23 @@ curl -XPOST "http://localhost:9999/api/v2/write?org=YOUR_ORG&bucket=YOUR_BUCKET& 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. + +--- + +## Next steps +With your data in InfluxDB, you're ready to do one or more of the following: + +### Query and explore your data +Query data using Flux, the UI, and the `influx` command line interface. +See [Query data](/v2.0/query-data/). + +### Process your data +Use InfluxDB tasks to process and downsample data. See [Process data](/v2.0/process-data/). + +### Visualize your data +Build custom dashboards to visualize your data. +See [Visualize data](/v2.0/visualize-data/). + +### Monitor your data and send alerts +Monitor your data and sends alerts based on specified logic. +See [Monitor and alert](/v2.0/monitor-alert/). diff --git a/content/v2.0/write-data/use-telegraf/manual-config.md b/content/v2.0/write-data/use-telegraf/manual-config.md index 7671dd1e7..6bdc200af 100644 --- a/content/v2.0/write-data/use-telegraf/manual-config.md +++ b/content/v2.0/write-data/use-telegraf/manual-config.md @@ -44,7 +44,17 @@ To send data to an InfluxDB v2.0 instance, enable in the [`influxdb_v2` output plugin](https://github.com/influxdata/telegraf/blob/master/plugins/outputs/influxdb_v2/README.md) in the `telegraf.conf`. -Specify the following: +To find an example InfluxDB v2 output plugin configuration in the UI: + +1. In the navigation menu on the left, select **Data (Load Data)** > **Telegraf**. + + {{< nav-icon "load data" >}} + +2. Click **InfluxDB Output Plugin**. +3. Click **Copy to Clipboard** to copy the example configuration or **Download Config** to save a copy. +4. Paste the example configuration into your `telegraf.conf` and specify the options below. + +The InfluxDB output plugin configuration contains the following options: ##### urls An array of URLs for your InfluxDB v2.0 instances. diff --git a/data/telegraf_plugins.yml b/data/telegraf_plugins.yml index f30542dbb..4b5ed5e56 100644 --- a/data/telegraf_plugins.yml +++ b/data/telegraf_plugins.yml @@ -932,7 +932,7 @@ input: The MQTT Consumer input plugin reads from specified MQTT topics and adds messages to InfluxDB. Messages are in the [Telegraf input data formats](https://docs.influxdata.com/telegraf/latest/data_formats/input/). introduced: 0.10.3 - tags: [linux, macos, windows, messaging] + tags: [linux, macos, windows, messaging, IoT] - name: Multifile id: multifile @@ -1864,7 +1864,7 @@ output: The MQTT Producer output plugin writes to the MQTT server using [supported output data formats](https://docs.influxdata.com/telegraf/latest/data_formats/output/). introduced: 0.2.0 - tags: [linux, macos, windows, messaging] + tags: [linux, macos, windows, messaging, IoT] - name: NATS Output id: nats diff --git a/layouts/partials/header.html b/layouts/partials/header.html index ffeb7d230..e8f367bbf 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -17,6 +17,7 @@ {{ partial "header/canonical.html" . }} {{ partial "header/stylesheets.html" }} {{ partial "header/google-fonts.html" }} + {{ partial "header/marketing.html" }} {{ partial "header/javascript.html" }} diff --git a/layouts/partials/header/marketing.html b/layouts/partials/header/marketing.html new file mode 100644 index 000000000..1f393934f --- /dev/null +++ b/layouts/partials/header/marketing.html @@ -0,0 +1,36 @@ + + + + +