From c9257dc87b25fb243ed0dd42e45e366626beac90 Mon Sep 17 00:00:00 2001 From: pierwill Date: Fri, 24 Apr 2020 11:33:43 -0700 Subject: [PATCH 01/41] Document cloud multi-user features --- .../account-management/multi-user/_index.md | 15 +++++++++ .../multi-user/invite-user.md | 32 +++++++++++++++++++ .../multi-user/remove-user.md | 17 ++++++++++ .../v2.0/organizations/members/add-member.md | 2 +- 4 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 content/v2.0/account-management/multi-user/_index.md create mode 100644 content/v2.0/account-management/multi-user/invite-user.md create mode 100644 content/v2.0/account-management/multi-user/remove-user.md diff --git a/content/v2.0/account-management/multi-user/_index.md b/content/v2.0/account-management/multi-user/_index.md new file mode 100644 index 000000000..ecf77ca0c --- /dev/null +++ b/content/v2.0/account-management/multi-user/_index.md @@ -0,0 +1,15 @@ +--- +title: Manage multiple users +description: > + View and manage multiple users in an Influx Cloud account. +weight: 4 +menu: + v2_0: + parent: Account management + name: Manage multiple users +--- + +{{< cloud-name >}} accounts support multiple-user organizations. +Collaborate with others using these features. + +{{< children >}} diff --git a/content/v2.0/account-management/multi-user/invite-user.md b/content/v2.0/account-management/multi-user/invite-user.md new file mode 100644 index 000000000..10611e6a4 --- /dev/null +++ b/content/v2.0/account-management/multi-user/invite-user.md @@ -0,0 +1,32 @@ +--- +title: Invite a user +list_title: Invite a user +description: > + Invite a user to collaborate +weight: 103 +menu: + v2_0: + parent: Manage multiple users + name: Invite a user +--- + +## Invite user from {{< cloud-name >}} + +1. Navigate to the **Members** page under **Organizations** in the left navigation bar. +2. Under "Add a new member to your organization," enter the email address of the user to invite. + (Users must be invited one at a time.) +3. Click **Add & Invite**. + +An invitation with an activation link will be sent to the specified email address. + +Once activated, the new user will be added as an **Owner** with permissions to read and write all resources. + +{{% warn %}} +Take care when inviting a user as an **Owner**. +Owners can delete resources and other users. +{{% /warn %}} + +{{% cloud %}} +Currently {{}} has only one permission level. +Future releases will contain read-only users. +{{% /cloud %}} diff --git a/content/v2.0/account-management/multi-user/remove-user.md b/content/v2.0/account-management/multi-user/remove-user.md new file mode 100644 index 000000000..c6e55f37a --- /dev/null +++ b/content/v2.0/account-management/multi-user/remove-user.md @@ -0,0 +1,17 @@ +--- +title: Remove a user +list_title: Remove a user +description: > + Remove a user from an organization +weight: 103 +menu: + v2_0: + parent: Manage multiple users + name: Remove a user +--- + +## Remove a user from {{< cloud-name >}} + +1. Navigate to the **Members** page under **Organizations** in the left navigation bar. +2. Click the {{< icon "delete" >}} next to the user you want to remove. +3. Confirm the removal. 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), [unix timestamp](#unix-timestamp) +Related entries: [point](#point), [unix timestamp](#unix-timestamp), [RFC3339 timestamp](#rfc3339-timestamp) ### token @@ -1077,8 +1079,7 @@ An implicit block that encompasses all Flux source text in a universe block. ### unix timestamp -The number of a given unit of time since the **Unix Epoch (1970-01-01T00:00:00Z UTC)**. -The unit of time is also known as the [precision](#precision). +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: @@ -1091,7 +1092,7 @@ InfluxDB supports the following unix timestamp precisions:

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

-Related entries: [timestamp](#timestamp) +Related entries: [timestamp](#timestamp), [RFC3339 timestamp](#rfc3339-timestamp) ### user 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 From 7afba23ea45df68f90e45316663dd27157591906 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Tue, 5 May 2020 09:18:44 -0600 Subject: [PATCH 17/41] added note about null time values in to function, resolves #923' --- content/v2.0/reference/flux/stdlib/built-in/outputs/to.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/content/v2.0/reference/flux/stdlib/built-in/outputs/to.md b/content/v2.0/reference/flux/stdlib/built-in/outputs/to.md index 1acc8b501..6d5c9be58 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/outputs/to.md +++ b/content/v2.0/reference/flux/stdlib/built-in/outputs/to.md @@ -37,10 +37,7 @@ to( ) ``` -{{% note %}} - ### Output data requirements - The `to()` function converts output data into line protocol and writes it to InfluxDB. Line protocol requires each record to have a timestamp, a measurement, a field, and a value. All output data must include the following columns: @@ -49,6 +46,10 @@ All output data must include the following columns: - `_measurement` - `_field` - `_value` + +{{% note %}} +The `to()` function ignores rows with a null `_time` values and does not write +them to InfluxDB. {{% /note %}} ## Parameters From 8faf18da70ee9f7b26fe5aa35036327dbb957420 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Tue, 5 May 2020 09:21:00 -0600 Subject: [PATCH 18/41] typo fix in to function doc --- content/v2.0/reference/flux/stdlib/built-in/outputs/to.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/v2.0/reference/flux/stdlib/built-in/outputs/to.md b/content/v2.0/reference/flux/stdlib/built-in/outputs/to.md index 6d5c9be58..6308bf858 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/outputs/to.md +++ b/content/v2.0/reference/flux/stdlib/built-in/outputs/to.md @@ -48,7 +48,7 @@ All output data must include the following columns: - `_value` {{% note %}} -The `to()` function ignores rows with a null `_time` values and does not write +The `to()` function ignores rows with a null `_time` value and does not write them to InfluxDB. {{% /note %}} From 60cebae902355ef2f1245d67b80d8514cc6a009d Mon Sep 17 00:00:00 2001 From: noramullen1 <42354779+noramullen1@users.noreply.github.com> Date: Tue, 5 May 2020 10:56:31 -0700 Subject: [PATCH 19/41] Remove org flag from examples (addresses #1007 ) --- content/v2.0/organizations/buckets/update-bucket.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ``` From 35ad1f0da189e90ecb56cbf63dfbd171ffa4161d Mon Sep 17 00:00:00 2001 From: pierwill Date: Tue, 5 May 2020 13:33:01 -0700 Subject: [PATCH 20/41] Add icon to "Invite a member" Move permissions note --- .../account-management/multi-user/invite-user.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/content/v2.0/account-management/multi-user/invite-user.md b/content/v2.0/account-management/multi-user/invite-user.md index f1a44db23..7f1bf84d4 100644 --- a/content/v2.0/account-management/multi-user/invite-user.md +++ b/content/v2.0/account-management/multi-user/invite-user.md @@ -10,13 +10,8 @@ menu: name: Invite a member --- -{{% 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 %}} - 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**. @@ -25,3 +20,9 @@ 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 %}} From fae01a7b1d0afb040879bc1f96053782ed31f626 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Tue, 5 May 2020 16:30:23 -0600 Subject: [PATCH 21/41] added engagio and marketo scripts to layout --- layouts/partials/header.html | 1 + layouts/partials/header/marketing.html | 36 ++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 layouts/partials/header/marketing.html 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 @@ + + + + + From 8905fd20c7f43d0d34f2fa3cd43557c94574aa2a Mon Sep 17 00:00:00 2001 From: pierwill Date: Wed, 6 May 2020 10:14:44 -0700 Subject: [PATCH 22/41] Add note on check visibility --- content/v2.0/account-management/multi-user/_index.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/v2.0/account-management/multi-user/_index.md b/content/v2.0/account-management/multi-user/_index.md index 83f3d33da..6fe8b6980 100644 --- a/content/v2.0/account-management/multi-user/_index.md +++ b/content/v2.0/account-management/multi-user/_index.md @@ -14,3 +14,7 @@ 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 %}} From 74966dbe24218e1e817ca59e22b642915bd61ec0 Mon Sep 17 00:00:00 2001 From: pierwill Date: Thu, 7 May 2020 10:34:36 -0700 Subject: [PATCH 23/41] Rename files --- .../account-management/{multi-user => multi-member}/_index.md | 0 .../{multi-user/invite-user.md => multi-member/invite-member.md} | 0 .../{multi-user/remove-user.md => multi-member/remove-memberr.md} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename content/v2.0/account-management/{multi-user => multi-member}/_index.md (100%) rename content/v2.0/account-management/{multi-user/invite-user.md => multi-member/invite-member.md} (100%) rename content/v2.0/account-management/{multi-user/remove-user.md => multi-member/remove-memberr.md} (100%) diff --git a/content/v2.0/account-management/multi-user/_index.md b/content/v2.0/account-management/multi-member/_index.md similarity index 100% rename from content/v2.0/account-management/multi-user/_index.md rename to content/v2.0/account-management/multi-member/_index.md diff --git a/content/v2.0/account-management/multi-user/invite-user.md b/content/v2.0/account-management/multi-member/invite-member.md similarity index 100% rename from content/v2.0/account-management/multi-user/invite-user.md rename to content/v2.0/account-management/multi-member/invite-member.md diff --git a/content/v2.0/account-management/multi-user/remove-user.md b/content/v2.0/account-management/multi-member/remove-memberr.md similarity index 100% rename from content/v2.0/account-management/multi-user/remove-user.md rename to content/v2.0/account-management/multi-member/remove-memberr.md From 2a8f1e3c58ebb489c37f82dd57a477c7cd844d53 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Thu, 7 May 2020 15:02:49 -0600 Subject: [PATCH 24/41] initial changes for beta-10 --- content/v2.0/get-started.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/content/v2.0/get-started.md b/content/v2.0/get-started.md index 21ef2a565..f1e38953d 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 %}} From 20e6a5634d837c7e1791c98f1571237d8b13b492 Mon Sep 17 00:00:00 2001 From: pierwill Date: Thu, 7 May 2020 14:12:59 -0700 Subject: [PATCH 25/41] Add notes on multi-member checks issue --- content/v2.0/monitor-alert/checks/_index.md | 4 ++++ content/v2.0/monitor-alert/checks/view.md | 4 ++++ 2 files changed, 8 insertions(+) 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. From a66370c71fb115aedd6dfbe405de07b055b6a11e Mon Sep 17 00:00:00 2001 From: Kelly Date: Thu, 7 May 2020 14:28:42 -0700 Subject: [PATCH 26/41] add beta-10 release notes --- .../v2.0/reference/release-notes/influxdb.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/content/v2.0/reference/release-notes/influxdb.md b/content/v2.0/reference/release-notes/influxdb.md index 075ca38d9..57239fe4b 100644 --- a/content/v2.0/reference/release-notes/influxdb.md +++ b/content/v2.0/reference/release-notes/influxdb.md @@ -8,6 +8,23 @@ 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 all `pkger` resources' metadata.name field. +- 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 From 381d35286fb6f53b210471e1a851be84c00b72ea Mon Sep 17 00:00:00 2001 From: Kelly Date: Thu, 7 May 2020 14:40:14 -0700 Subject: [PATCH 27/41] add lines between releases --- content/v2.0/reference/release-notes/influxdb.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/content/v2.0/reference/release-notes/influxdb.md b/content/v2.0/reference/release-notes/influxdb.md index 57239fe4b..af48f7d36 100644 --- a/content/v2.0/reference/release-notes/influxdb.md +++ b/content/v2.0/reference/release-notes/influxdb.md @@ -13,7 +13,7 @@ weight: 101 ### Features - Add ability to delete a stack and all associated resources. -- Enforce DNS name compliance on all `pkger` resources' metadata.name field. +- Enforce DNS name compliance on all `pkger` resources' `metadata.name` field. - Add stateful `pkg` management with stacks. ### Bug Fixes @@ -25,6 +25,8 @@ weight: 101 - Create buckets in the Data Explorer and Cell Editor. +--- + ## v2.0.0-beta.9 [2020-04-23] ### Bug Fixes @@ -37,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 @@ -57,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 @@ -148,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 From c696aa3ff8573710941f4723102b503bc836a2ef Mon Sep 17 00:00:00 2001 From: Kelly Date: Thu, 7 May 2020 14:48:56 -0700 Subject: [PATCH 28/41] edit --- content/v2.0/reference/release-notes/influxdb.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/v2.0/reference/release-notes/influxdb.md b/content/v2.0/reference/release-notes/influxdb.md index af48f7d36..827286226 100644 --- a/content/v2.0/reference/release-notes/influxdb.md +++ b/content/v2.0/reference/release-notes/influxdb.md @@ -13,7 +13,7 @@ weight: 101 ### Features - Add ability to delete a stack and all associated resources. -- Enforce DNS name compliance on all `pkger` resources' `metadata.name` field. +- Enforce DNS name compliance on the `metadata.name` field in all `pkger` resources. - Add stateful `pkg` management with stacks. ### Bug Fixes From bc08f1a133bb58dfb84cf795f9d3600ed66bacfb Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Thu, 7 May 2020 15:58:04 -0600 Subject: [PATCH 29/41] added beta-10 swagger --- api-docs/v2.0/swagger.yml | 133 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) 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 From 572810d7107194327dd9b9365d25a17b75772902 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Fri, 8 May 2020 09:04:02 -0600 Subject: [PATCH 30/41] added influx pkg stack list and remove for beta-10 --- .../reference/cli/influx/pkg/stack/_index.md | 8 +++-- .../reference/cli/influx/pkg/stack/list.md | 34 +++++++++++++++++++ .../reference/cli/influx/pkg/stack/remove.md | 32 +++++++++++++++++ 3 files changed, 71 insertions(+), 3 deletions(-) create mode 100644 content/v2.0/reference/cli/influx/pkg/stack/list.md create mode 100644 content/v2.0/reference/cli/influx/pkg/stack/remove.md diff --git a/content/v2.0/reference/cli/influx/pkg/stack/_index.md b/content/v2.0/reference/cli/influx/pkg/stack/_index.md index b9dfd144d..45d66a6e7 100644 --- a/content/v2.0/reference/cli/influx/pkg/stack/_index.md +++ b/content/v2.0/reference/cli/influx/pkg/stack/_index.md @@ -18,9 +18,11 @@ influx pkg stack [command] ``` ## Subcommands -| Subcommand | Description | -|:------- |:----------- | -| [init](/v2.0/reference/cli/influx/pkg/stack/init/) | Initialize a stack | +| Subcommand | Description | +|:------- |:----------- | +| [init](/v2.0/reference/cli/influx/pkg/stack/init/) | Initialize a stack | +| [list](/v2.0/reference/cli/influx/pkg/stack/list/) | List stacks | +| [remove](/v2.0/reference/cli/influx/pkg/stack/remove/) | Remove a stack | ## Flags | Flag | Description | diff --git a/content/v2.0/reference/cli/influx/pkg/stack/list.md b/content/v2.0/reference/cli/influx/pkg/stack/list.md new file mode 100644 index 000000000..4be91088d --- /dev/null +++ b/content/v2.0/reference/cli/influx/pkg/stack/list.md @@ -0,0 +1,34 @@ +--- +title: influx pkg stack list +description: > + The 'influx pkg stack list' command lists InfluxDB stacks and associated resources. +menu: + v2_0_ref: + name: influx pkg stack list + parent: influx pkg stack +weight: 201 +v2.0/tags: [templates] +--- + +The `influx pkg stack list` command lists InfluxDB stacks and associated resources. + +## Usage +``` +influx pkg stack list [flags] +``` + +#### Aliases +`list`, `ls` + +## Flags +| Flag | Description | Input type | {{< cli/mapped >}} | +|:---- |:----------- |:----------: |:------------------ | +| `-h`, `--help` | Help for the `list` command | | | +| `--hide-headers` | Hide table headers (default `false`) | | `INFLUX_HIDE_HEADERS` | +| `--json` | Output data as JSON (default `false`) | | `INFLUX_OUTPUT_JSON` | +| `-o`, `--org` | Organization name | string | `INFLUX_ORG` | +| `--org-id` | Organization ID | string | `INFLUX_ORG_ID` | +| `--stack-id` | Stack IDs to filter by | list of strings | | +| `--stack-name` | Stack names to filter by | list of strings | | + +{{% cli/influx-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/pkg/stack/remove.md b/content/v2.0/reference/cli/influx/pkg/stack/remove.md new file mode 100644 index 000000000..53913852a --- /dev/null +++ b/content/v2.0/reference/cli/influx/pkg/stack/remove.md @@ -0,0 +1,32 @@ +--- +title: influx pkg stack remove +description: The 'influx pkg stack remove' command removes an InfluxDB stack. +menu: + v2_0_ref: + name: influx pkg stack remove + parent: influx pkg stack +weight: 201 +v2.0/tags: [templates] +--- + +The `influx pkg stack remove` command removes an InfluxDB stack. + +## Usage +``` +influx pkg stack remove [flags] +``` + +#### Aliases +`remove`, `rm`, `uninstall` + +## Flags +| Flag | Description | Input type | {{< cli/mapped >}} | +|:---- |:----------- |:----------: |:------------------ | +| `-h`, `--help` | Help for the `remove` command | | | +| `--hide-headers` | Hide table headers (default `false`) | | `INFLUX_HIDE_HEADERS` | +| `--json` | Output data as JSON (default `false`) | | `INFLUX_OUTPUT_JSON` | +| `-o`, `--org` | Organization name | string | `INFLUX_ORG` | +| `--org-id` | Organization ID | string | `INFLUX_ORG_ID` | +| `--stack-id` | Stack IDs to remove | list of strings | | + +{{% cli/influx-global-flags %}} From d14743843a5d46f1f793e4725c85e619a8476dd4 Mon Sep 17 00:00:00 2001 From: noramullen1 <42354779+noramullen1@users.noreply.github.com> Date: Sun, 10 May 2020 13:26:37 -0700 Subject: [PATCH 31/41] quick fix to update image in manual telegraf config doc (addresses #1024 ) --- content/v2.0/write-data/use-telegraf/manual-config.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 9cad3f1f2..d666f2921 100644 --- a/content/v2.0/write-data/use-telegraf/manual-config.md +++ b/content/v2.0/write-data/use-telegraf/manual-config.md @@ -47,7 +47,8 @@ in the `telegraf.conf`. 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 "disks" >}} + {{< 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. From 30c7a0f0b4651f38d443d50ec21d4da98cf3b1b8 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Mon, 11 May 2020 08:40:56 -0600 Subject: [PATCH 32/41] hotfix: fixed list and shortcode formatting in manual telegraf config, resolves #1024 --- content/v2.0/write-data/use-telegraf/manual-config.md | 1 + 1 file changed, 1 insertion(+) 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 d666f2921..6bdc200af 100644 --- a/content/v2.0/write-data/use-telegraf/manual-config.md +++ b/content/v2.0/write-data/use-telegraf/manual-config.md @@ -45,6 +45,7 @@ To send data to an InfluxDB v2.0 instance, enable in the in the `telegraf.conf`. 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" >}} From 9238b511ba30c404e9a9b2b8b006e58d7f2927e0 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Mon, 11 May 2020 10:36:26 -0600 Subject: [PATCH 33/41] added secrets to sql examples, resolves #823 --- content/v2.0/query-data/flux/sql.md | 72 +++++++++++++++++++ .../flux/stdlib/experimental/bigtable/from.md | 23 ++++++ .../v2.0/reference/flux/stdlib/sql/from.md | 17 ++++- content/v2.0/reference/flux/stdlib/sql/to.md | 17 ++++- 4 files changed, 125 insertions(+), 4 deletions(-) diff --git a/content/v2.0/query-data/flux/sql.md b/content/v2.0/query-data/flux/sql.md index b769145ff..fcf0b96b8 100644 --- a/content/v2.0/query-data/flux/sql.md +++ b/content/v2.0/query-data/flux/sql.md @@ -36,6 +36,7 @@ dashboards, tasks, and other operations. - [Query a SQL data source](#query-a-sql-data-source) - [Join SQL data with data in InfluxDB](#join-sql-data-with-data-in-influxdb) - [Use SQL results to populate dashboard variables](#use-sql-results-to-populate-dashboard-variables) +- [Use secrets to populate connection credentials](#use-secrets-to-populate-connection-credentials) - [Sample sensor data](#sample-sensor-data) If you're just getting started with Flux queries, check out the following: @@ -154,6 +155,77 @@ Use the variable to manipulate queries in your dashboards. --- +## Use secrets to populate connection credentials +If your SQL database requires authentication, use [InfluxDB secrets](/v2.0/security/secrets/) +to store and populate sensitive connection credentials for your database. +By default, InfluxDB encrypts and stores secrets in its internal key-value store, BoltDB, +but also integrates directly with [Vault](https://www.vaultproject.io/). + +_For information about using **Vault** with InfluxDB, see [Setup a Vault cluster](/v2.0/security/secrets/use-vault/)._ + +### Store your database credentials as secrets +Use the **InfluxDB API** or the **`influx` CLI** to store your database credentials as secrets. + +{{< tabs-wrapper >}} +{{% tabs %}} +[InfluxDB API](#) +[influx CLI](#) +{{% /tabs %}} +{{% tab-content %}} +```sh +curl -X PATCH http://localhost:9999/api/v2/orgs//secrets \ + -H 'Authorization: Token YOURAUTHTOKEN' \ + -H 'Content-type: application/json' \ + -d '{ + "POSTGRES_HOST": "http://example.com", + "POSTGRES_USER": "example-username", + "POSTGRES_PASS": "example-password" +}' +``` + +_**Helpful links**_ +[View your organization ID](/v2.0/organizations/view-orgs/#view-your-organization-id) +[View your authentication token](/v2.0/security/tokens/view-tokens/) +{{% /tab-content %}} +{{% tab-content %}} +```sh +# Syntax +influx secret update -k + +# Example +influx secret update -k POSTGRES_PASS +``` + +**When prompted, enter your secret value.** + +{{% warn %}} +You can provide the secret value with the `-v`, `--value` flag, but the plain text +secret may appear in your shell history. +{{% /warn %}} +{{% /tab-content %}} +{{< /tabs-wrapper >}} + +### Use secrets in your query +Import the `influxdata/influxdb/secrets` package and use [string interpolation](/v2.0/reference/flux/language/string-interpolation/) +to populate connection credentials with stored secrets in your Flux query. + +```js +import "sql" +import "influxdata/influxdb/secrets" + +POSTGRES_HOST = secrets.get(key: "POSTGRES_HOST") +POSTGRES_USER = secrets.get(key: "POSTGRES_USER") +POSTGRES_PASS = secrets.get(key: "POSTGRES_PASS") + +sql.from( + driverName: "postgres", + dataSourceName: "postgresql://${POSTGRES_USER}:${POSTGRES_PASS}@${POSTGRES_HOST}", + query: "SELECT * FROM sensors" +) +``` + +--- + ## Sample sensor data The [sample data generator](#download-and-run-the-sample-data-generator) and [sample sensor information](#import-the-sample-sensor-information) simulate a diff --git a/content/v2.0/reference/flux/stdlib/experimental/bigtable/from.md b/content/v2.0/reference/flux/stdlib/experimental/bigtable/from.md index 1f52d1b7e..b24633717 100644 --- a/content/v2.0/reference/flux/stdlib/experimental/bigtable/from.md +++ b/content/v2.0/reference/flux/stdlib/experimental/bigtable/from.md @@ -52,3 +52,26 @@ _**Data type:** String_ The name of the Cloud Bigtable table to retrieve data from. _**Data type:** String_ + +## Examples + +{{% note %}} +The example below use [InfluxDB secrets](/v2.0/security/secrets/) to populate +sensitive connection credentials. +{{% /note %}} + +```js +import "experimental/bigtable" +import "influxdata/influxdb/secrets" + +bigtable_token = secrets.get(key: "BIGTABLE_TOKEN") +bigtable_project = secrets.get(key: "BIGTABLE_PROJECT_ID") +bigtable_instance = secrets.get(key: "BIGTABLE_INSTANCE_ID") + +bigtable.from( + token: bigtable_token, + project: bigtable_project, + instance: bigtable_instance, + table: "example-table" +) +``` diff --git a/content/v2.0/reference/flux/stdlib/sql/from.md b/content/v2.0/reference/flux/stdlib/sql/from.md index 7e2518a27..2d8b1d43c 100644 --- a/content/v2.0/reference/flux/stdlib/sql/from.md +++ b/content/v2.0/reference/flux/stdlib/sql/from.md @@ -64,13 +64,22 @@ _**Data type:** String_ ## Examples +{{% note %}} +The examples below use [InfluxDB secrets](/v2.0/security/secrets/) to populate +sensitive connection credentials. +{{% /note %}} + ### Query a MySQL database ```js import "sql" +import "influxdata/influxdb/secrets" + +username = secrets.get(key: "MYSQL_USER") +password = secrets.get(key: "MYSQL_PASS") sql.from( driverName: "mysql", - dataSourceName: "user:password@tcp(localhost:3306)/db", + dataSourceName: "${username}:${password}@tcp(localhost:3306)/db", query:"SELECT * FROM ExampleTable" ) ``` @@ -78,10 +87,14 @@ sql.from( ### Query a Postgres database ```js import "sql" +import "influxdata/influxdb/secrets" + +username = secrets.get(key: "POSTGRES_USER") +password = secrets.get(key: "POSTGRES_PASS") sql.from( driverName: "postgres", - dataSourceName: "postgresql://user:password@localhost", + dataSourceName: "postgresql://${username}:${password}@localhost", query:"SELECT * FROM ExampleTable" ) ``` diff --git a/content/v2.0/reference/flux/stdlib/sql/to.md b/content/v2.0/reference/flux/stdlib/sql/to.md index 4d4552bf2..0286011dd 100644 --- a/content/v2.0/reference/flux/stdlib/sql/to.md +++ b/content/v2.0/reference/flux/stdlib/sql/to.md @@ -73,13 +73,22 @@ If writing to a **SQLite** database, set `batchSize` to `999` or less. ## Examples +{{% note %}} +The examples below use [InfluxDB secrets](/v2.0/security/secrets/) to populate +sensitive connection credentials. +{{% /note %}} + ### Write data to a MySQL database ```js import "sql" +import "influxdata/influxdb/secrets" + +username = secrets.get(key: "MYSQL_USER") +password = secrets.get(key: "MYSQL_PASS") sql.to( driverName: "mysql", - dataSourceName: "user:password@tcp(localhost:3306)/db", + dataSourceName: "${username}:${password}@tcp(localhost:3306)/db", table: "ExampleTable" ) ``` @@ -87,10 +96,14 @@ sql.to( ### Write data to a Postgres database ```js import "sql" +import "influxdata/influxdb/secrets" + +username = secrets.get(key: "POSTGRES_USER") +password = secrets.get(key: "POSTGRES_PASS") sql.to( driverName: "postgres", - dataSourceName: "postgresql://user:password@localhost", + dataSourceName: "postgresql://${username}:${password}@localhost", table: "ExampleTable" ) ``` From 3f0d888053b1c4e28ac916cbff17805761e29c62 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Mon, 11 May 2020 11:50:04 -0600 Subject: [PATCH 34/41] updates to secrets info in sql guide to address PR feedback --- content/v2.0/query-data/flux/sql.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/content/v2.0/query-data/flux/sql.md b/content/v2.0/query-data/flux/sql.md index fcf0b96b8..2ddca1673 100644 --- a/content/v2.0/query-data/flux/sql.md +++ b/content/v2.0/query-data/flux/sql.md @@ -157,14 +157,15 @@ Use the variable to manipulate queries in your dashboards. ## Use secrets to populate connection credentials If your SQL database requires authentication, use [InfluxDB secrets](/v2.0/security/secrets/) -to store and populate sensitive connection credentials for your database. -By default, InfluxDB encrypts and stores secrets in its internal key-value store, BoltDB, -but also integrates directly with [Vault](https://www.vaultproject.io/). +to store and populate connection credentials. +By default, InfluxDB base64-encodes and stores secrets in its internal key-value store, BoltDB. +For added security, [Vault](https://www.vaultproject.io/). -_For information about using **Vault** with InfluxDB, see [Setup a Vault cluster](/v2.0/security/secrets/use-vault/)._ +_For information about the **InfluxDB Vault integration**, see [Store secrets in Vault](/v2.0/security/secrets/use-vault/)._ ### Store your database credentials as secrets -Use the **InfluxDB API** or the **`influx` CLI** to store your database credentials as secrets. +Use the [InfluxDB API](/v2.0/reference/api/) or the [`influx` CLI](/v2.0/reference/cli/influx/secret/) +to store your database credentials as secrets. {{< tabs-wrapper >}} {{% tabs %}} From f47bbcfb4b954e02284b3c00fbd32080e2786839 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Mon, 11 May 2020 14:40:13 -0600 Subject: [PATCH 35/41] updated sql secrets to address PR feedback --- content/v2.0/query-data/flux/sql.md | 23 +++++++++++-------- .../flux/stdlib/experimental/bigtable/from.md | 2 +- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/content/v2.0/query-data/flux/sql.md b/content/v2.0/query-data/flux/sql.md index 2ddca1673..ea2842d93 100644 --- a/content/v2.0/query-data/flux/sql.md +++ b/content/v2.0/query-data/flux/sql.md @@ -36,7 +36,7 @@ dashboards, tasks, and other operations. - [Query a SQL data source](#query-a-sql-data-source) - [Join SQL data with data in InfluxDB](#join-sql-data-with-data-in-influxdb) - [Use SQL results to populate dashboard variables](#use-sql-results-to-populate-dashboard-variables) -- [Use secrets to populate connection credentials](#use-secrets-to-populate-connection-credentials) +- [Use secrets to store SQL database credentials](#use-secrets-to-store-sql-database-credentials) - [Sample sensor data](#sample-sensor-data) If you're just getting started with Flux queries, check out the following: @@ -155,13 +155,11 @@ Use the variable to manipulate queries in your dashboards. --- -## Use secrets to populate connection credentials +## Use secrets to store SQL database credentials If your SQL database requires authentication, use [InfluxDB secrets](/v2.0/security/secrets/) to store and populate connection credentials. By default, InfluxDB base64-encodes and stores secrets in its internal key-value store, BoltDB. -For added security, [Vault](https://www.vaultproject.io/). - -_For information about the **InfluxDB Vault integration**, see [Store secrets in Vault](/v2.0/security/secrets/use-vault/)._ +For added security, [store secrets in Vault](/v2.0/security/secrets/use-vault/). ### Store your database credentials as secrets Use the [InfluxDB API](/v2.0/reference/api/) or the [`influx` CLI](/v2.0/reference/cli/influx/secret/) @@ -184,9 +182,10 @@ curl -X PATCH http://localhost:9999/api/v2/orgs//secrets \ }' ``` -_**Helpful links**_ -[View your organization ID](/v2.0/organizations/view-orgs/#view-your-organization-id) -[View your authentication token](/v2.0/security/tokens/view-tokens/) +**To store secrets, you need:** + +- [your organization ID](/v2.0/organizations/view-orgs/#view-your-organization-id) +- [your authentication token](/v2.0/security/tokens/view-tokens/) {{% /tab-content %}} {{% tab-content %}} ```sh @@ -200,8 +199,12 @@ influx secret update -k POSTGRES_PASS **When prompted, enter your secret value.** {{% warn %}} -You can provide the secret value with the `-v`, `--value` flag, but the plain text -secret may appear in your shell history. +You can provide the secret value with the `-v`, `--value` flag, but the **plain text +secret may appear in your shell history**. + +```sh +influx secret update -k -v +``` {{% /warn %}} {{% /tab-content %}} {{< /tabs-wrapper >}} diff --git a/content/v2.0/reference/flux/stdlib/experimental/bigtable/from.md b/content/v2.0/reference/flux/stdlib/experimental/bigtable/from.md index b24633717..117384775 100644 --- a/content/v2.0/reference/flux/stdlib/experimental/bigtable/from.md +++ b/content/v2.0/reference/flux/stdlib/experimental/bigtable/from.md @@ -56,7 +56,7 @@ _**Data type:** String_ ## Examples {{% note %}} -The example below use [InfluxDB secrets](/v2.0/security/secrets/) to populate +The example below uses [InfluxDB secrets](/v2.0/security/secrets/) to populate sensitive connection credentials. {{% /note %}} From 48a5bff64610f5c3e4baaf13baef2e6a0b841225 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Tue, 12 May 2020 11:23:08 -0600 Subject: [PATCH 36/41] added information about normalizing timestamps, resolves #736 --- .../query-data/flux/manipulate-timestamps.md | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/content/v2.0/query-data/flux/manipulate-timestamps.md b/content/v2.0/query-data/flux/manipulate-timestamps.md index bc46fcd37..6aba06726 100644 --- a/content/v2.0/query-data/flux/manipulate-timestamps.md +++ b/content/v2.0/query-data/flux/manipulate-timestamps.md @@ -16,6 +16,8 @@ related: - /v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/time/ - /v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/uint/ - /v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/int/ + - /v2.0/reference/flux/stdlib/built-in/transformations/truncatetimecolumn/ + - /v2.0/reference/flux/stdlib/date/truncate/ - /v2.0/reference/flux/stdlib/experimental/addduration/ - /v2.0/reference/flux/stdlib/experimental/subduration/ --- @@ -26,13 +28,21 @@ Use Flux to process and manipulate timestamps to suit your needs. - [Convert timestamp format](#convert-timestamp-format) - [Time-related Flux functions](#time-related-flux-functions) +--- + If you're just getting started with Flux queries, check out the following: - [Get started with Flux](/v2.0/query-data/get-started/) for a conceptual overview of Flux and parts of a Flux query. - [Execute queries](/v2.0/query-data/execute-queries/) to discover a variety of ways to run your queries. +--- + ## Convert timestamp format +- [Convert unix nanosecond timestamp to RFC3339](#convert-unix-nanosecond-timestamp-to-rfc3339) +- [Convert RFC3339 to nanosecond unix timestamp](#convert-rfc3339-to-nanosecond-unix-timestamp) +- [Calculate the duration between two timestamps](#calculate-the-duration-between-two-timestamps) + ### Convert unix nanosecond timestamp to RFC3339 Use the [`time()` function](/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/time/) to convert a [unix **nanosecond** timestamp](/v2.0/reference/glossary/#unix-timestamp) @@ -76,6 +86,12 @@ to convert the duration to a string. ## Time-related Flux functions +- [Retrieve the current UTC time](#retrieve-the-current-utc-time) +- [Retrieve the current system time](#retrieve-the-current-system-time) +- [Normalize irregular timestamps](#normalize-irregular-timestamps) +- [Add a duration to a timestamp](#add-a-duration-to-a-timestamp) +- [Subtract a duration from a timestamp](#subtract-a-duration-from-a-timestamp) + ### Retrieve the current UTC time Use the [`now()` function](/v2.0/reference/flux/stdlib/built-in/misc/now/) to return the current UTC time in RFC3339 format. @@ -104,6 +120,43 @@ system.time() in a Flux script returns a unique value. {{% /note %}} +### Normalize irregular timestamps +To normalize irregular timestamps, truncate all `_time` values to a specified unit +with the [`truncateTimeColumn()` function](/v2.0/reference/flux/stdlib/built-in/transformations/truncatetimecolumn/). +This is useful in [`join()`](/v2.0/reference/flux/stdlib/built-in/transformations/join/) +and [`pivot()`](/v2.0/reference/flux/stdlib/built-in/transformations/pivot/) +operations where points should align by time, but timestamps vary slightly. + +```js +data + |> truncateTimeColumn(unit: 1m) +``` + +{{< flex >}} +{{% flex-content %}} +**Input:** + +| _time | _value | +|:----- | ------:| +| 2020-01-01T00:00:49Z | 2.0 | +| 2020-01-01T00:01:01Z | 1.9 | +| 2020-01-01T00:03:22Z | 1.8 | +| 2020-01-01T00:04:04Z | 1.9 | +| 2020-01-01T00:05:38Z | 2.1 | +{{% /flex-content %}} +{{% flex-content %}} +**Output:** + +| _time | _value | +|:----- | ------:| +| 2020-01-01T00:00:00Z | 2.0 | +| 2020-01-01T00:01:00Z | 1.9 | +| 2020-01-01T00:03:00Z | 1.8 | +| 2020-01-01T00:04:00Z | 1.9 | +| 2020-01-01T00:05:00Z | 2.1 | +{{% /flex-content %}} +{{< /flex >}} + ### Add a duration to a timestamp The [`experimental.addDuration()` function](/v2.0/reference/flux/stdlib/experimental/addduration/) adds a duration to a specified time and returns the resulting time. From baa24c8c8b29d15151b5dc21afa67ad3e51c6e9f Mon Sep 17 00:00:00 2001 From: Kelly Date: Tue, 12 May 2020 11:47:52 -0700 Subject: [PATCH 37/41] add description to fix format issue --- content/v2.0/security/secrets/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: From ca5773e82758c5773b0cb87889268f974b8596e1 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Tue, 12 May 2020 13:24:41 -0600 Subject: [PATCH 38/41] adjust struction of timestamp query guide to address PR feedback --- .../query-data/flux/manipulate-timestamps.md | 49 ++++++++++--------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/content/v2.0/query-data/flux/manipulate-timestamps.md b/content/v2.0/query-data/flux/manipulate-timestamps.md index 6aba06726..e51f47053 100644 --- a/content/v2.0/query-data/flux/manipulate-timestamps.md +++ b/content/v2.0/query-data/flux/manipulate-timestamps.md @@ -26,26 +26,27 @@ Every point stored in InfluxDB has an associated timestamp. Use Flux to process and manipulate timestamps to suit your needs. - [Convert timestamp format](#convert-timestamp-format) -- [Time-related Flux functions](#time-related-flux-functions) - ---- +- [Calculate the duration between two timestamps](#calculate-the-duration-between-two-timestamps) +- [Retrieve the current time](#retrieve-the-current-time) +- [Normalize irregular timestamps](#normalize-irregular-timestamps) +- [Use timestamps and durations together](#use-timestamps-and-durations-together) +{{% note %}} If you're just getting started with Flux queries, check out the following: - [Get started with Flux](/v2.0/query-data/get-started/) for a conceptual overview of Flux and parts of a Flux query. - [Execute queries](/v2.0/query-data/execute-queries/) to discover a variety of ways to run your queries. +{{% /note %}} ---- ## Convert timestamp format -- [Convert unix nanosecond timestamp to RFC3339](#convert-unix-nanosecond-timestamp-to-rfc3339) -- [Convert RFC3339 to nanosecond unix timestamp](#convert-rfc3339-to-nanosecond-unix-timestamp) -- [Calculate the duration between two timestamps](#calculate-the-duration-between-two-timestamps) +- [Unix nanosecond to RFC3339](#unix-nanosecond-to-rfc3339) +- [RFC3339 to Unix nanosecond](#rfc3339-to-unix-nanosecond) -### Convert unix nanosecond timestamp to RFC3339 +### Unix nanosecond to RFC3339 Use the [`time()` function](/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/time/) -to convert a [unix **nanosecond** timestamp](/v2.0/reference/glossary/#unix-timestamp) +to convert a [Unix **nanosecond** timestamp](/v2.0/reference/glossary/#unix-timestamp) to an [RFC3339 timestamp](/v2.0/reference/glossary/#rfc3339-timestamp). ```js @@ -53,21 +54,21 @@ time(v: 1568808000000000000) // Returns 2019-09-18T12:00:00.000000000Z ``` -### Convert RFC3339 to nanosecond unix timestamp +### RFC3339 to Unix nanosecond Use the [`uint()` function](/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/uint/) -to convert an RFC3339 timestamp to a unix nanosecond timestamp. +to convert an RFC3339 timestamp to a Unix nanosecond timestamp. ```js uint(v: 2019-09-18T12:00:00.000000000Z) // Returns 1568808000000000000 ``` -### Calculate the duration between two timestamps +## Calculate the duration between two timestamps Flux doesn't support mathematical operations using [time type](/v2.0/reference/flux/language/types/#time-types) values. To calculate the duration between two timestamps: -1. Use the `uint()` function to convert each timestamp to a unix nanosecond timestamp. -2. Subtract one unix nanosecond timestamp from the other. +1. Use the `uint()` function to convert each timestamp to a Unix nanosecond timestamp. +2. Subtract one Unix nanosecond timestamp from the other. 3. Use the `duration()` function to convert the result into a duration. ```js @@ -84,15 +85,11 @@ To store a duration in a column, use the [`string()` function](/v2.0/reference/f to convert the duration to a string. {{% /note %}} -## Time-related Flux functions +## Retrieve the current time +- [Current UTC time](#current-utc-time) +- [Current system time](#current-system-time) -- [Retrieve the current UTC time](#retrieve-the-current-utc-time) -- [Retrieve the current system time](#retrieve-the-current-system-time) -- [Normalize irregular timestamps](#normalize-irregular-timestamps) -- [Add a duration to a timestamp](#add-a-duration-to-a-timestamp) -- [Subtract a duration from a timestamp](#subtract-a-duration-from-a-timestamp) - -### Retrieve the current UTC time +### Current UTC time Use the [`now()` function](/v2.0/reference/flux/stdlib/built-in/misc/now/) to return the current UTC time in RFC3339 format. @@ -105,7 +102,7 @@ now() return the same value. {{% /note %}} -### Retrieve the current system time +### Current system time Import the `system` package and use the [`system.time()` function](/v2.0/reference/flux/stdlib/system/time/) to return the current system time of the host machine in RFC3339 format. @@ -120,7 +117,7 @@ system.time() in a Flux script returns a unique value. {{% /note %}} -### Normalize irregular timestamps +## Normalize irregular timestamps To normalize irregular timestamps, truncate all `_time` values to a specified unit with the [`truncateTimeColumn()` function](/v2.0/reference/flux/stdlib/built-in/transformations/truncatetimecolumn/). This is useful in [`join()`](/v2.0/reference/flux/stdlib/built-in/transformations/join/) @@ -157,6 +154,10 @@ data {{% /flex-content %}} {{< /flex >}} +## Use timestamps and durations together +- [Add a duration to a timestamp](#add-a-duration-to-a-timestamp) +- [Subtract a duration from a timestamp](#subtract-a-duration-from-a-timestamp) + ### Add a duration to a timestamp The [`experimental.addDuration()` function](/v2.0/reference/flux/stdlib/experimental/addduration/) adds a duration to a specified time and returns the resulting time. From bce41b5a3f4841c9ef305f08253fe4b7c1240a70 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Tue, 12 May 2020 14:05:37 -0600 Subject: [PATCH 39/41] added org to influx pkg examples, resolves #1015 --- content/v2.0/influxdb-templates/use.md | 31 +++++++++++++------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/content/v2.0/influxdb-templates/use.md b/content/v2.0/influxdb-templates/use.md index f556bb242..760b4f81c 100644 --- a/content/v2.0/influxdb-templates/use.md +++ b/content/v2.0/influxdb-templates/use.md @@ -123,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 ``` @@ -144,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 @@ -160,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 ``` @@ -178,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 \ @@ -198,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 @@ -212,15 +212,16 @@ 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 ``` From 5bc04beb6df43a000967b9a4ea142d1afaef947b Mon Sep 17 00:00:00 2001 From: gotjoshua Date: Wed, 13 May 2020 11:32:18 +0100 Subject: [PATCH 40/41] closes #1033 --- content/v2.0/visualize-data/variables/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/v2.0/visualize-data/variables/_index.md b/content/v2.0/visualize-data/variables/_index.md index 6798ece8e..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) ``` From f31a096080a9faf05f0aecb30dcf659bbe769b5b Mon Sep 17 00:00:00 2001 From: noramullen1 <42354779+noramullen1@users.noreply.github.com> Date: Wed, 13 May 2020 11:09:09 -0700 Subject: [PATCH 41/41] Add IoT tag to MQTT --- data/telegraf_plugins.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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