2.0 GA and separate Cloud from OSS (#1805)

* WIP separate cloud docs, duplicate content shortcode

* WIP cloud-separation

* WIP separate cloud

* duplicated oss into cloud and am making updates

* moved cloud updates to cloud

* reimplemented duplicate-oss shortcode

* separate Cloud and OSS content in Tools & integ...

* Split OSS and Cloud content for Security & auth

* Split OSS and Cloud content for Manage org

* Split OSS and Cloud - Manage Orgs add'l updates

* various updates, primarily in oss and cloud reference

* split content for notification endpoints

* Move InfluxQL doc to Cloud

- Remove the "Query with InfluxQL" page from OSS docs
- Re-incorporate changes made in https://github.com/influxdata/docs-v2/pull/1506

* removed product tags from nav and articles

* WIP separate cloud docs, duplicate content shortcode

* WIP cloud-separation

* WIP separate cloud

* duplicated oss into cloud and am making updates

* moved cloud updates to cloud

* reimplemented duplicate-oss shortcode

* separate Cloud and OSS content in Tools & integ...

* Split OSS and Cloud content for Security & auth

* Split OSS and Cloud content for Manage org

* Split OSS and Cloud - Manage Orgs add'l updates

* various updates, primarily in oss and cloud reference

* split content for notification endpoints

* Move InfluxQL doc to Cloud

- Remove the "Query with InfluxQL" page from OSS docs
- Re-incorporate changes made in https://github.com/influxdata/docs-v2/pull/1506

* removed product tags from nav and articles

* New URL switcher (#1720)

* restructured url modal

* rearchitected the url switcher functionality

* add influxdb preference management to url switcher

* create separate pages for querying data

* update weight

* Update flux-repl.md

* Update influx-query.md

* edits f Scott

* move content from explore-metrics to data-explorer

* edits; delete explore-metrics

* edits

* delete file

* remove duplicate content

* add InfluxQLquery examples

* Remove references to "security script"

* draft updates for Band Plot vis

* WIP separate cloud docs, duplicate content shortcode

* WIP cloud-separation

* WIP separate cloud

* duplicated oss into cloud and am making updates

* moved cloud updates to cloud

* reimplemented duplicate-oss shortcode

* separate Cloud and OSS content in Tools & integ...

* Split OSS and Cloud content for Security & auth

* Split OSS and Cloud content for Manage org

* Split OSS and Cloud - Manage Orgs add'l updates

* various updates, primarily in oss and cloud reference

* split content for notification endpoints

* Move InfluxQL doc to Cloud

- Remove the "Query with InfluxQL" page from OSS docs
- Re-incorporate changes made in https://github.com/influxdata/docs-v2/pull/1506

* removed product tags from nav and articles

* WIP separate cloud docs, duplicate content shortcode

* WIP cloud-separation

* WIP separate cloud

* duplicated oss into cloud and am making updates

* moved cloud updates to cloud

* reimplemented duplicate-oss shortcode

* separate Cloud and OSS content in Tools & integ...

* Split OSS and Cloud content for Manage org

* Split OSS and Cloud - Manage Orgs add'l updates

* various updates, primarily in oss and cloud reference

* split content for notification endpoints

* Move InfluxQL doc to Cloud

- Remove the "Query with InfluxQL" page from OSS docs
- Re-incorporate changes made in https://github.com/influxdata/docs-v2/pull/1506

* New URL switcher (#1720)

* restructured url modal

* rearchitected the url switcher functionality

* add influxdb preference management to url switcher

* URL validation on custom URL (#1763)

* added url validation to custom url form, resolves #1739

* removed placeholder message from custom url form

* updated styles for url selector modal

* Move restore command to `influx` cli, update flags

* Update table for backup

* Remove RC information, update paths for restore, change `backup-path` flag to `input`

* WIP separate cloud docs, duplicate content shortcode

* WIP cloud-separation

* WIP separate cloud

* duplicated oss into cloud and am making updates

* moved cloud updates to cloud

* reimplemented duplicate-oss shortcode

* separate Cloud and OSS content in Tools & integ...

* Split OSS and Cloud content for Security & auth

* Split OSS and Cloud content for Manage org

* Split OSS and Cloud - Manage Orgs add'l updates

* various updates, primarily in oss and cloud reference

* split content for notification endpoints

* Move InfluxQL doc to Cloud

- Remove the "Query with InfluxQL" page from OSS docs
- Re-incorporate changes made in https://github.com/influxdata/docs-v2/pull/1506

* removed product tags from nav and articles

* WIP separate cloud docs, duplicate content shortcode

* WIP cloud-separation

* WIP separate cloud

* duplicated oss into cloud and am making updates

* moved cloud updates to cloud

* reimplemented duplicate-oss shortcode

* separate Cloud and OSS content in Tools & integ...

* Split OSS and Cloud content for Manage org

* Split OSS and Cloud - Manage Orgs add'l updates

* various updates, primarily in oss and cloud reference

* Move InfluxQL doc to Cloud

- Remove the "Query with InfluxQL" page from OSS docs
- Re-incorporate changes made in https://github.com/influxdata/docs-v2/pull/1506

* New URL switcher (#1720)

* restructured url modal

* rearchitected the url switcher functionality

* add influxdb preference management to url switcher

* WIP separate cloud docs, duplicate content shortcode

* WIP cloud-separation

* WIP separate cloud

* duplicated oss into cloud and am making updates

* moved cloud updates to cloud

* reimplemented duplicate-oss shortcode

* Split OSS and Cloud content for Manage org

* Split OSS and Cloud - Manage Orgs add'l updates

* various updates, primarily in oss and cloud reference

* Move InfluxQL doc to Cloud

- Remove the "Query with InfluxQL" page from OSS docs
- Re-incorporate changes made in https://github.com/influxdata/docs-v2/pull/1506

* WIP separate cloud docs, duplicate content shortcode

* WIP cloud-separation

* WIP separate cloud

* duplicated oss into cloud and am making updates

* moved cloud updates to cloud

* reimplemented duplicate-oss shortcode

* separate Cloud and OSS content in Tools & integ...

* Split OSS and Cloud content for Manage org

* Split OSS and Cloud - Manage Orgs add'l updates

* various updates, primarily in oss and cloud reference

* Move InfluxQL doc to Cloud

- Remove the "Query with InfluxQL" page from OSS docs
- Re-incorporate changes made in https://github.com/influxdata/docs-v2/pull/1506

* URL validation on custom URL (#1763)

* added url validation to custom url form, resolves #1739

* removed placeholder message from custom url form

* updated styles for url selector modal

* WIP updating InfluxDB OSS naming throughout

* updated canonical shortcode for oss vs cloud, updated 2.0 version numbers on homepage

* updated swagger file to rc4 for 2.0 and cloud

* fixed canonical partial

* Update multi-user Cloud docs

Also adds a heading the note on permissions.

Closes #1764

* Fix table for backup flags

* Update input flag, remove TSI references

* Address PR feedback

* Remove product tag

* Fix DBRP mapping examples (#1776)

* updated dbrp mapping examples in influxql query guide, closes #1774

* removed unnecessarily escaped newline from dbrp mapping example

* add draft rc4 and GA RNs

* cloud and oss name updates

* emphasis production ready

* update curl example

* duplicate oss pages in cloud

* Address PR feedback

* added new aws us east region, resolves #1777 (#1782)

* Add steps for script editor

* Add cloud version

* moved and updated upgrade guides (#1783)

* Fix typos

* update upgrade links

* edits

* Clarify 1m cardinality is initial limit only

* fix typo

* fix date

* Add note on `_internal` database to v1-to-v2 upgrade guide

Closes #1775.

* Update influxdb.md

* fixed broken links throughout cloud docs

* fixed broken links in 2.0 oss

* Address PR feedback

* remove window pushdowns

* updated oss pushdown list

* Add instructions for verifying InfluxDB 2.0 download

* updated latest versions in edge.js

* added flux-0.94.0 to flux release notes (#1790)

* update date and add Flux .94.0 link

* delete broken link to image

* remove auto refresh; not currently in UI

* add duplicate-oss tag to Cloud execute-queries

* highlight diff between Flux and InfluxQL example

* delete extra header

* Generate v1 compatibility API docs (#1789)

* updated swagger generation to generate v1 compat api docs

* restructured api docs

* updated restore flags table

* updated infludb binary urls in oss and cloud

* Address PR feedback

* Make contact support a mailto link

* Add --log-level flag to `influxd upgrade`

Closes #1795

* add release note about api/v2/delete

* update delete data note for 2.0

* edit

* Fix URLs and filenames in OSS 2.0 Get Started

* update version for GA

* Add color to Flux example for Flux documentation (addresses #1724 )

* Change versions to 2.0.1 in GS

* Replace 2.0.0 with 2.0.1

* Revert Docker updates to 2.0.0

* Add release notes for 2.0.0

* edits; add known issue

* clarify DB is 1.x

* updated influxdb versions in cloud and oss getting started

* updated influxdb oss urls doc

* remove rc and upd upgrade link in back up data

* Edit `influxd upgrade` docs (#1798)

* Edit `influxd upgrade` guide

Major revision of existing docs.

Add "Before you begin: important considerations" section.

* Address PR feedback

* Edit backup instructions

* More work on kap

* Rm comment

* Rm sentence

* Add note on Docker

* Edit intro

* Edit link

* Work on PR feedback

* Continue PR feedback

* More PR feedback

* More edits

* more edits

* Edits

* more edits

* rm word

* updates to address PR feedback for the upgrade guide

Co-authored-by: pierwill <pierwill@users.noreply.github.com>
Co-authored-by: Scott Anderson <scott@influxdata.com>

Co-authored-by: Kelly <kelly@influxdata.com>
Co-authored-by: pierwill <pierwill@users.noreply.github.com>
Co-authored-by: pierwill <19642016+pierwill@users.noreply.github.com>
Co-authored-by: kelseiv <47797004+kelseiv@users.noreply.github.com>
Co-authored-by: noramullen1 <42354779+noramullen1@users.noreply.github.com>
pull/1806/head
Scott Anderson 2020-11-11 09:52:14 -07:00 committed by GitHub
parent 94e0df59e1
commit 942203d351
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
788 changed files with 50313 additions and 1704 deletions

2
.gitignore vendored
View File

@ -5,4 +5,4 @@ public
node_modules
*.log
/resources
/content/**/api.html
/content/influxdb/*/api/**

11761
api-docs/cloud/swagger.yml Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,308 @@
openapi: "3.0.0"
info:
title: InfluxDB API Service (v1 compatible endpoints)
version: 0.1.0
servers:
- url: /
description: InfluxDB v1 compatible API endpoints.
paths:
/write:
post: # technically this functions with other methods as well
operationId: PostWriteV1
tags:
- Write
summary: Write time series data into InfluxDB in a v1 compatible format
requestBody:
description: Line protocol body
required: true
content:
text/plain:
schema:
type: string
parameters:
- $ref: "#/components/parameters/TraceSpan"
- $ref: "#/components/parameters/AuthUserV1"
- $ref: "#/components/parameters/AuthPassV1"
- in: query
name: db
schema:
type: string
required: true
description: The bucket to write to. If none exist a bucket will be created with a default 3 day retention policy.
- in: query
name: rp
schema:
type: string
description: The retention policy name.
- in: query
name: precision
schema:
type: string
description: Write precision.
- in: header
name: Content-Encoding
description: When present, its value indicates to the database that compression is applied to the line-protocol body.
schema:
type: string
description: Specifies that the line protocol in the body is encoded with gzip or not encoded with identity.
default: identity
enum:
- gzip
- identity
responses:
"204":
description: Write data is correctly formatted and accepted for writing to the bucket.
"400":
description: Line protocol poorly formed and no points were written. Response can be used to determine the first malformed line in the body line-protocol. All data in body was rejected and not written.
content:
application/json:
schema:
$ref: "#/components/schemas/LineProtocolError"
"401":
description: Token does not have sufficient permissions to write to this organization and bucket or the organization and bucket do not exist.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"403":
description: No token was sent and they are required.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"413":
description: Write has been rejected because the payload is too large. Error message returns max size supported. All data in body was rejected and not written.
content:
application/json:
schema:
$ref: "#/components/schemas/LineProtocolLengthError"
"429":
description: Token is temporarily over quota. The Retry-After header describes when to try the write again.
headers:
Retry-After:
description: A non-negative decimal integer indicating the seconds to delay after the response is received.
schema:
type: integer
format: int32
"503":
description: Server is temporarily unavailable to accept writes. The Retry-After header describes when to try the write again.
headers:
Retry-After:
description: A non-negative decimal integer indicating the seconds to delay after the response is received.
schema:
type: integer
format: int32
default:
description: Internal server error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/query:
post: # technically this functions with other methods as well
operationId: PostQueryV1
tags:
- Query
summary: Query InfluxDB in a v1 compatible format
requestBody:
description: InfluxQL query to execute.
content:
text/plain: # although this should be `application/vnd.influxql`, oats breaks so we define the content-type header parameter
schema:
type: string
parameters:
- $ref: "#/components/parameters/TraceSpan"
- $ref: "#/components/parameters/AuthUserV1"
- $ref: "#/components/parameters/AuthPassV1"
- in: header
name: Accept-Encoding
description: The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand.
schema:
type: string
description: Specifies that the query response in the body should be encoded with gzip or not encoded with identity.
default: identity
enum:
- gzip
- identity
- in: header
name: Content-Type
schema:
type: string
enum:
- application/vnd.influxql
- in: query
name: q
description: Defines the influxql query to run.
schema:
type: string
responses:
"200":
description: Query results
headers:
Content-Encoding:
description: The Content-Encoding entity header is used to compress the media-type. When present, its value indicates which encodings were applied to the entity-body
schema:
type: string
description: Specifies that the response in the body is encoded with gzip or not encoded with identity.
default: identity
enum:
- gzip
- identity
Trace-Id:
description: The Trace-Id header reports the request's trace ID, if one was generated.
schema:
type: string
description: Specifies the request's trace ID.
content:
text/csv:
schema:
type: string
example: >
name,tags,time,test_field,test_tag
test_measurement,,1603740794286107366,1,tag_value
test_measurement,,1603740870053205649,2,tag_value
test_measurement,,1603741221085428881,3,tag_value
text/plain:
schema:
$ref: "#/components/schemas/InfluxQLResponse"
"429":
description: Token is temporarily over quota. The Retry-After header describes when to try the read again.
headers:
Retry-After:
description: A non-negative decimal integer indicating the seconds to delay after the response is received.
schema:
type: integer
format: int32
default:
description: Error processing query
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
components:
parameters:
TraceSpan:
in: header
name: Zap-Trace-Span
description: OpenTracing span context
example:
trace_id: "1"
span_id: "1"
baggage:
key: value
required: false
schema:
type: string
AuthUserV1:
in: query
name: u
required: false
schema:
type: string
description: Username.
AuthPassV1:
in: query
name: p
required: false
schema:
type: string
description: User token.
schemas:
InfluxQLResponse:
properties:
results:
type: array
items:
type: object
properties:
statement_id:
type: integer
series:
type: array
items:
type: object
properties:
name:
type: string
columns:
type: array
items:
type: integer
values:
type: array
items:
type: array
items: {}
Error:
properties:
code:
description: Code is the machine-readable error code.
readOnly: true
type: string
# This set of enumerations must remain in sync with the constants defined in errors.go
enum:
- internal error
- not found
- conflict
- invalid
- unprocessable entity
- empty value
- unavailable
- forbidden
- too many requests
- unauthorized
- method not allowed
message:
readOnly: true
description: Message is a human-readable message.
type: string
required: [code, message]
LineProtocolError:
properties:
code:
description: Code is the machine-readable error code.
readOnly: true
type: string
enum:
- internal error
- not found
- conflict
- invalid
- empty value
- unavailable
message:
readOnly: true
description: Message is a human-readable message.
type: string
op:
readOnly: true
description: Op describes the logical code operation during error. Useful for debugging.
type: string
err:
readOnly: true
description: Err is a stack of errors that occurred during processing of the request. Useful for debugging.
type: string
line:
readOnly: true
description: First line within sent body containing malformed data
type: integer
format: int32
required: [code, message, op, err]
LineProtocolLengthError:
properties:
code:
description: Code is the machine-readable error code.
readOnly: true
type: string
enum:
- invalid
message:
readOnly: true
description: Message is a human-readable message.
type: string
maxLength:
readOnly: true
description: Max length in bytes for a body of line-protocol.
type: integer
format: int32
required: [code, message, maxLength]

View File

@ -7,36 +7,70 @@ for version in $versions
do
# Trim the trailing slash off the directory name
version="${version%/}"
menu="influxdb_$(echo $version | sed 's/\./_/g;s/[^0-9_]//g;')_ref"
menu="influxdb_$(echo $version | sed 's/\./_/g;s/v//g;')_ref"
if [ $version = "cloud" ]; then
titleVersion="Cloud"
else
titleVersion="$version"
fi
# Generate the frontmatter
frontmatter="---
title: InfluxDB $version API documentation
v2frontmatter="---
title: InfluxDB $titleVersion API documentation
description: >
The InfluxDB API provides a programmatic interface for interactions with InfluxDB $version.
The InfluxDB API provides a programmatic interface for interactions with InfluxDB $titleVersion.
layout: api
menu:
$menu:
parent: InfluxDB v2 API
name: View full API docs
name: View v2 API docs
weight: 102
---
"
v1frontmatter="---
title: InfluxDB $titleVersion v1 compatiblity API documentation
description: >
The InfluxDB v1 compatility API provides a programmatic interface for interactions with InfluxDB $titleVersion using InfluxDB v1.x compatibly endpoints.
layout: api
menu:
$menu:
parent: 1.x compatibility
name: View v1 compatibility API docs
weight: 304
---
"
# Use Redoc to generate the API html
# Use Redoc to generate the v2 API html
redoc-cli bundle -t template.hbs \
--title="InfluxDB $version API documentation" \
--title="InfluxDB $titleVersion API documentation" \
--options.sortPropsAlphabetically \
--options.menuToggle \
--options.hideHostname \
--templateOptions.version="$version" \
--templateOptions.titleVersion="$titleVersion" \
$version/swagger.yml
# Use Redoc to generate the v1 compatibility API html
redoc-cli bundle -t template.hbs \
--title="InfluxDB $titleVersion v1 compatibility API documentation" \
--options.sortPropsAlphabetically \
--options.menuToggle \
--options.hideHostname \
--templateOptions.version="$version" \
--templateOptions.titleVersion="$titleVersion" \
--output=redoc-static-v1-compat.html \
$version/swaggerV1Compat.yml
# Create temp file with frontmatter and Redoc html
echo "$frontmatter" >> $version.tmp
echo "$v2frontmatter" >> $version.tmp
echo "$v1frontmatter" >> $version-v1-compat.tmp
cat redoc-static.html >> $version.tmp
cat redoc-static-v1-compat.html >> $version-v1-compat.tmp
# Remove redoc file and move the tmp file to it's proper place
rm -f redoc-static.html
mv $version.tmp ../content/influxdb/$version/api.html
rm -f redoc-static-v1-compat.html
mkdir -p ../content/influxdb/$version/api
mv $version.tmp ../content/influxdb/$version/api/_index.html
mv $version-v1-compat.tmp ../content/influxdb/$version/api/v1-compatibility.html
done

View File

@ -39,7 +39,7 @@
<div class="spinner"></div>
</div>
<div id="influx-header">
<a class="back" href="/influxdb/{{templateOptions.version}}/">InfluxDB <span class="version">{{templateOptions.version}}</span> Docs</a>
<a class="back" href="/influxdb/{{templateOptions.version}}/">InfluxDB <span class="version">{{templateOptions.titleVersion}}</span> Docs</a>
<a class="btn" href="https://github.com/influxdata/influxdb/issues/new/choose/" target="_blank">Submit API issue</a>
</div>
{{{redocHTML}}}

View File

@ -1990,7 +1990,7 @@ paths:
operationId: PostSources
tags:
- Sources
summary: Create a source
summary: Creates a source
parameters:
- $ref: "#/components/parameters/TraceSpan"
requestBody:
@ -2814,7 +2814,7 @@ paths:
operationId: GetDashboardsIDLabels
tags:
- Dashboards
summary: List all labels for a dashboard
summary: list all labels for a dashboard
parameters:
- $ref: "#/components/parameters/TraceSpan"
- in: path
@ -3305,7 +3305,7 @@ paths:
operationId: DeleteAuthorizationsID
tags:
- Authorizations
summary: Delete an authorization
summary: Delete a authorization
parameters:
- $ref: "#/components/parameters/TraceSpan"
- in: path
@ -3681,7 +3681,7 @@ paths:
operationId: DeleteBucketsIDLabelsID
tags:
- Buckets
summary: Delete a label from a bucket
summary: delete a label from a bucket
parameters:
- $ref: "#/components/parameters/TraceSpan"
- in: path
@ -11704,7 +11704,12 @@ components:
type: string
enum: ["slack", "pagerduty", "http", "telegram"]
DBRP:
type: object
required:
- orgID
- org
- bucketID
- database
- retention_policy
properties:
id:
type: string
@ -11730,17 +11735,6 @@ components:
description: Specify if this mapping represents the default retention policy for the database specificed.
links:
$ref: "#/components/schemas/Links"
oneOf:
- required:
- orgID
- bucketID
- database
- retention_policy
- required:
- org
- bucketID
- database
- retention_policy
DBRPs:
properties:
notificationEndpoints:

View File

@ -0,0 +1,308 @@
openapi: "3.0.0"
info:
title: InfluxDB API Service (v1 compatible endpoints)
version: 0.1.0
servers:
- url: /
description: InfluxDB v1 compatible API endpoints.
paths:
/write:
post: # technically this functions with other methods as well
operationId: PostWriteV1
tags:
- Write
summary: Write time series data into InfluxDB in a v1 compatible format
requestBody:
description: Line protocol body
required: true
content:
text/plain:
schema:
type: string
parameters:
- $ref: "#/components/parameters/TraceSpan"
- $ref: "#/components/parameters/AuthUserV1"
- $ref: "#/components/parameters/AuthPassV1"
- in: query
name: db
schema:
type: string
required: true
description: The bucket to write to. If none exist a bucket will be created with a default 3 day retention policy.
- in: query
name: rp
schema:
type: string
description: The retention policy name.
- in: query
name: precision
schema:
type: string
description: Write precision.
- in: header
name: Content-Encoding
description: When present, its value indicates to the database that compression is applied to the line-protocol body.
schema:
type: string
description: Specifies that the line protocol in the body is encoded with gzip or not encoded with identity.
default: identity
enum:
- gzip
- identity
responses:
"204":
description: Write data is correctly formatted and accepted for writing to the bucket.
"400":
description: Line protocol poorly formed and no points were written. Response can be used to determine the first malformed line in the body line-protocol. All data in body was rejected and not written.
content:
application/json:
schema:
$ref: "#/components/schemas/LineProtocolError"
"401":
description: Token does not have sufficient permissions to write to this organization and bucket or the organization and bucket do not exist.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"403":
description: No token was sent and they are required.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"413":
description: Write has been rejected because the payload is too large. Error message returns max size supported. All data in body was rejected and not written.
content:
application/json:
schema:
$ref: "#/components/schemas/LineProtocolLengthError"
"429":
description: Token is temporarily over quota. The Retry-After header describes when to try the write again.
headers:
Retry-After:
description: A non-negative decimal integer indicating the seconds to delay after the response is received.
schema:
type: integer
format: int32
"503":
description: Server is temporarily unavailable to accept writes. The Retry-After header describes when to try the write again.
headers:
Retry-After:
description: A non-negative decimal integer indicating the seconds to delay after the response is received.
schema:
type: integer
format: int32
default:
description: Internal server error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/query:
post: # technically this functions with other methods as well
operationId: PostQueryV1
tags:
- Query
summary: Query InfluxDB in a v1 compatible format
requestBody:
description: InfluxQL query to execute.
content:
text/plain: # although this should be `application/vnd.influxql`, oats breaks so we define the content-type header parameter
schema:
type: string
parameters:
- $ref: "#/components/parameters/TraceSpan"
- $ref: "#/components/parameters/AuthUserV1"
- $ref: "#/components/parameters/AuthPassV1"
- in: header
name: Accept-Encoding
description: The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand.
schema:
type: string
description: Specifies that the query response in the body should be encoded with gzip or not encoded with identity.
default: identity
enum:
- gzip
- identity
- in: header
name: Content-Type
schema:
type: string
enum:
- application/vnd.influxql
- in: query
name: q
description: Defines the influxql query to run.
schema:
type: string
responses:
"200":
description: Query results
headers:
Content-Encoding:
description: The Content-Encoding entity header is used to compress the media-type. When present, its value indicates which encodings were applied to the entity-body
schema:
type: string
description: Specifies that the response in the body is encoded with gzip or not encoded with identity.
default: identity
enum:
- gzip
- identity
Trace-Id:
description: The Trace-Id header reports the request's trace ID, if one was generated.
schema:
type: string
description: Specifies the request's trace ID.
content:
text/csv:
schema:
type: string
example: >
name,tags,time,test_field,test_tag
test_measurement,,1603740794286107366,1,tag_value
test_measurement,,1603740870053205649,2,tag_value
test_measurement,,1603741221085428881,3,tag_value
text/plain:
schema:
$ref: "#/components/schemas/InfluxQLResponse"
"429":
description: Token is temporarily over quota. The Retry-After header describes when to try the read again.
headers:
Retry-After:
description: A non-negative decimal integer indicating the seconds to delay after the response is received.
schema:
type: integer
format: int32
default:
description: Error processing query
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
components:
parameters:
TraceSpan:
in: header
name: Zap-Trace-Span
description: OpenTracing span context
example:
trace_id: "1"
span_id: "1"
baggage:
key: value
required: false
schema:
type: string
AuthUserV1:
in: query
name: u
required: false
schema:
type: string
description: Username.
AuthPassV1:
in: query
name: p
required: false
schema:
type: string
description: User token.
schemas:
InfluxQLResponse:
properties:
results:
type: array
items:
type: object
properties:
statement_id:
type: integer
series:
type: array
items:
type: object
properties:
name:
type: string
columns:
type: array
items:
type: integer
values:
type: array
items:
type: array
items: {}
Error:
properties:
code:
description: Code is the machine-readable error code.
readOnly: true
type: string
# This set of enumerations must remain in sync with the constants defined in errors.go
enum:
- internal error
- not found
- conflict
- invalid
- unprocessable entity
- empty value
- unavailable
- forbidden
- too many requests
- unauthorized
- method not allowed
message:
readOnly: true
description: Message is a human-readable message.
type: string
required: [code, message]
LineProtocolError:
properties:
code:
description: Code is the machine-readable error code.
readOnly: true
type: string
enum:
- internal error
- not found
- conflict
- invalid
- empty value
- unavailable
message:
readOnly: true
description: Message is a human-readable message.
type: string
op:
readOnly: true
description: Op describes the logical code operation during error. Useful for debugging.
type: string
err:
readOnly: true
description: Err is a stack of errors that occurred during processing of the request. Useful for debugging.
type: string
line:
readOnly: true
description: First line within sent body containing malformed data
type: integer
format: int32
required: [code, message, op, err]
LineProtocolLengthError:
properties:
code:
description: Code is the machine-readable error code.
readOnly: true
type: string
enum:
- invalid
message:
readOnly: true
description: Message is a human-readable message.
type: string
maxLength:
readOnly: true
description: Max length in bytes for a body of line-protocol.
type: integer
format: int32
required: [code, message, maxLength]

View File

@ -0,0 +1,12 @@
// Show the url feature callout on page load
if ( Cookies.get('influxdb_url_selector_seen') != 'true' ) {
$('#callout-url-selector').fadeIn(300).removeClass('start-position')
}
// Set feature cookie when the button is clicked
$('button.url-trigger, #callout-url-selector .close').click(function() {
if ( Cookies.get('influxdb_url_selector_seen') != 'true') {
Cookies.set('influxdb_url_selector_seen', 'true')
$('#callout-url-selector').fadeOut(200)
}
})

View File

@ -1,83 +1,73 @@
var defaultUrl = "http://localhost:8086"
var placeholderCloudUrl = "https://cloud2.influxdata.com"
var defaultCloudUrl = "https://us-west-2-1.aws.cloud2.influxdata.com"
var placeholderUrls = {
cloud: "https://cloud2.influxdata.com",
oss: "http://localhost:8086"
}
var defaultUrls = {
cloud: "https://us-west-2-1.aws.cloud2.influxdata.com",
oss: "http://localhost:8086"
}
var elementSelector = ".article--content pre:not(.preserve)"
var isInfluxDBv1 = /influxdb\/v1/.test(window.location.href)
// Retrieve the selected URL from the influxdb_url session cookie
function getUrl() {
var currentUrl = Cookies.get('influxdb_url')
if (typeof currentUrl == 'undefined' ) {
return defaultUrl
// Return the page context (cloud, oss/enterprise, other)
function context() {
if (/\/influxdb\/cloud\//.test(window.location.pathname)) {
return "cloud"
} else if (/\/(enterprise_|influxdb).*\/v[1-2]\.[0-9]{1,2}\//.test(window.location.pathname)) {
return "oss/enterprise"
} else {
return currentUrl
return "other"
}
}
// Retrieve the previously selected URL from the influxdb_prev_url session cookie
// This is used to update URLs whenever you switch between browser tabs
function getPrevUrl() {
var prevUrl = Cookies.get('influxdb_prev_url')
if (typeof prevUrl == 'undefined' ) {
return defaultUrl
} else {
return prevUrl
}
////////////////////////////////////////////////////////////////////////////////
///////////////////////// Session-management functions /////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Retrieve the user's InfluxDB preference (cloud or oss) from the influxdb_pref session cookie
// Default is cloud.
function getPreference() {
return Cookies.get('influxdb_pref') || "cloud"
}
// Iterate through code blocks and update InfluxDB urls
// Ignore URLs in InfluxDB 1.x docs
function updateUrls(currentUrl, newUrl) {
if (!isInfluxDBv1) {
if (typeof currentUrl != newUrl) {
$(elementSelector).each(function() {
$(this).html($(this).html().replace(currentUrl, newUrl));
});
}
}
// Set the user's selected InfluxDB preference (cloud or oss)
function setPreference(preference) {
Cookies.set('influxdb_pref', preference)
}
// Append the URL selector button to each codeblock with an InfluxDB URL
// Ignore codeblocks on InfluxDB v1.x pages
function appendUrlSelector(currentUrl, selectorText) {
if (!isInfluxDBv1) {
$(elementSelector).each(function() {
var code = $(this).html()
if (code.includes(currentUrl)) {
$(this).after("<div class='select-url'><a class='url-trigger' href='#'>" + selectorText + "</a></div>")
$('.select-url').fadeIn(400)
}
});
}
}
// Toggle the URL selector modal window
function toggleModal() {
$(".modal").fadeToggle(200).toggleClass("open")
}
// Set the selected URL radio button to :checked
function setRadioButton(currentUrl) {
$('input[name="influxdb-loc"][value="' + currentUrl + '"]').prop("checked", true)
}
// InfluxDB URL-Related Session keys
//
// influxdb_oss_url
// influxdb_cloud_url
// influxdb_prev_oss_url
// influxdb_prev_cloud_url
// influxdb_pref (cloud | oss)
// influxdb_custom_url
// Store the InfluxDB URL session cookies influxdb_url and influxdb_prev_url
function storeUrl(newUrl, prevUrl) {
Cookies.set('influxdb_prev_url', prevUrl)
Cookies.set('influxdb_url', newUrl)
function storeUrl(context, newUrl, prevUrl) {
Cookies.set('influxdb_prev_' + context + '_url', prevUrl)
Cookies.set('influxdb_' + context + '_url', newUrl)
}
// Store custom URL session cookie influxdb_custom_url
// Used to populate the custom URL field
function storeCustomUrl(customUrl) {
Cookies.set('influxdb_custom_url', customUrl)
$('input#custom[type=radio]').val(customUrl)
}
// Remove custom URL session cookie influxdb_custom_url
// Used to clear the form when custom url input is left empty
function removeCustomUrl() {
Cookies.remove('influxdb_custom_url')
}
////////////////////////////////////////////////////////////////////////////////
//////////////////////// InfluxDB URL utility functions ////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Preserve URLs in codeblocks that come just after or are inside a div
// with the class, .keep-url
function addPreserve() {
@ -92,81 +82,258 @@ function addPreserve() {
})
}
// Update URLs when selected in the modal
$('input[name="influxdb-loc"]').change(function() {
var newUrl = $(this).val()
updateUrls(getUrl(), newUrl)
storeUrl(newUrl, getUrl())
})
// Retrieve the previously selected cloud and oss URLs from the
// influxdb_cloud_url and influxdb_oss_url session cookies.
function getUrls() {
var currentCloudUrl = Cookies.get('influxdb_cloud_url') || defaultUrls.cloud
var currentOSSUrl = Cookies.get('influxdb_oss_url') || defaultUrls.oss
var urls = {
cloud: currentCloudUrl,
oss: currentOSSUrl
};
return urls;
}
// Retrieve the previously selected cloud and oss URLs from the
// prev_influxdb_cloud_url and prev_influxdb_oss_url session cookies.
// This is used to update URLs whenever you switch between browser tabs.
function getPrevUrls() {
var prevCloudUrl = Cookies.get('influxdb_prev_cloud_url') || defaultUrls.cloud
var prevOSSUrl = Cookies.get('influxdb_prev_oss_url') || defaultUrls.oss
var prevUrls = {
cloud: prevCloudUrl,
oss: prevOSSUrl
};
return prevUrls;
}
// Iterate through code blocks and update InfluxDB urls
// Requires objects with cloud and oss keys and url values
function updateUrls(prevUrls, newUrls) {
var preference = getPreference()
var cloudReplacements = [
{ replace: prevUrls.cloud, with: newUrls.cloud},
{ replace: prevUrls.oss, with: newUrls.cloud }
]
var ossReplacements = [
{ replace: prevUrls.cloud, with: newUrls.cloud},
{ replace: prevUrls.oss, with: newUrls.oss }
]
if (context() === "cloud") { var replacements = cloudReplacements }
else if (context() === "oss/enterprise") { var replacements = ossReplacements }
else if ( preference === "cloud" ) { var replacements = cloudReplacements }
else { var replacements = ossReplacements }
replacements.forEach(function (o) {
if (o.replace != o.with) {
$(elementSelector).each(function() {
$(this).html($(this).html().replace(o.replace, o.with));
});
}
})
}
// Append the URL selector button to each codeblock with an InfluxDB Cloud or OSS URL
function appendUrlSelector() {
var appendToUrls = [ placeholderUrls.cloud, placeholderUrls.oss ]
if (context() === "cloud") {
var selectorText = "InfluxDB Cloud Region"
} else if (context() === "oss/enterprise") {
var selectorText = "Change InfluxDB URL"
} else {
var selectorText = "InfluxDB Cloud or OSS?"
}
appendToUrls.forEach(function(url){
$(elementSelector).each(function() {
var code = $(this).html()
if (code.includes(url)) {
$(this).after("<div class='select-url'><a class='url-trigger' href='#'>" + selectorText + "</a></div>")
$('.select-url').fadeIn(400)
}
});
});
}
////////////////////////////////////////////////////////////////////////////////
///////////////////////////// Function executions //////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Add the preserve tag to code blocks that shouldn't be udpated
addPreserve()
// Update URLs on load
updateUrls(defaultUrl, getUrl())
// Append URL selector buttons to code blocks
appendUrlSelector(getUrl(), "Cloud or OSS?")
appendUrlSelector()
// Append URL selector buttons to cloud-only code blocks
appendUrlSelector(placeholderCloudUrl, "InfluxDB Cloud Region")
// Update URLs on load
updateUrls(placeholderUrls, getUrls())
// Update cloud-only URLs on load
if (cloudUrls.includes(getUrl())) {
updateUrls(placeholderCloudUrl, getUrl())
} else {
updateUrls(placeholderCloudUrl, defaultCloudUrl)
}
// Set active radio button on page load
setRadioButtons(getUrls())
// Update URLs whenever you focus on the browser tab
$(window).focus(function() {
updateUrls(getPrevUrl(), getUrl())
setRadioButton(getUrl())
updateUrls(getPrevUrls(), getUrls())
setRadioButtons(getUrls())
});
////////////////////////////////////////////////////////////////////////////////
////////////////////////// Modal window interactions ///////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Toggle the URL selector modal window
function toggleModal() {
$(".modal").fadeToggle(200).toggleClass("open")
}
// Set the selected URL radio buttons to :checked
function setRadioButtons() {
currentUrls = getUrls()
$('input[name="influxdb-cloud-url"][value="' + currentUrls.cloud + '"]').prop("checked", true)
$('input[name="influxdb-oss-url"][value="' + currentUrls.oss + '"]').prop("checked", true)
}
// Toggle modal window on click
$("#modal-close, .modal-overlay, .url-trigger").click(function(e) {
e.preventDefault()
toggleModal()
})
// Show the feature callout on page load
if ( Cookies.get('influxdb_url_selector_seen') != 'true' ) {
$('#callout-url-selector').fadeIn(300).removeClass('start-position')
// Update URLs and URL preference when selected/clicked in the modal
$('input[name="influxdb-cloud-url"]').change(function() {
var newUrl = $(this).val()
storeUrl("cloud", newUrl, getUrls().cloud)
updateUrls(getPrevUrls(), getUrls())
})
$('input[name="influxdb-cloud-url"]').click(function() {setPreference("cloud")})
$('input[name="influxdb-oss-url"]').change(function() {
var newUrl = $(this).val()
storeUrl("oss", newUrl, getUrls().oss)
updateUrls(getPrevUrls(), getUrls())
setPreference("oss")
})
$('input[name="influxdb-oss-url"]').click(function() {setPreference("oss")})
// Toggle preference tabs
function togglePrefBtns(el) {
preference = el.length ? el.attr("id").replace("pref-", "") : "cloud"
prefUrls = $("#" + preference + "-urls")
el.addClass("active")
el.siblings().removeClass("active")
prefUrls.addClass("active").removeClass("inactive")
prefUrls.siblings().addClass("inactive").removeClass("active")
setPreference(preference)
}
// Set feature cookie when the button is clicked
$('button.url-trigger, #callout-url-selector .close').click(function() {
if ( Cookies.get('influxdb_url_selector_seen') != 'true') {
Cookies.set('influxdb_url_selector_seen', 'true')
$('#callout-url-selector').fadeOut(200)
}
// Select preference tab on click
$('#pref-tabs .pref-tab').click(function() {
togglePrefBtns($(this))
})
///////////////////////////////// CUSTOM URLs /////////////////////////////////
// Select preference tab from cookie
function showPreference() {
var preference = Cookies.get("influxdb_pref")
prefTab = $("#pref-" + preference)
togglePrefBtns(prefTab)
}
// Toggled preferred service on load
showPreference()
////////////////////////////////////////////////////////////////////////////////
///////////////////////////////// Custom URLs //////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Validate custom URLs
function validateUrl(url) {
var validProtocol = /^http(s?)/
var invalidDomain =/[A-Z\s\!\@\#\$\%\^\&\*\(\)\_\+\=\[\]\{\}\\\|\;\'\"\,\<\>\/\?]/
var protocol = url.match(/http(s?):\/\//) ? url.match(/http(s?):\/\//)[0] : "";
var domain = url.replace(protocol, "")
if (validProtocol.test(protocol) == false) {
return {valid: false, error: "Invalid protocol, use http[s]"}
} else if (domain.length == 0 || invalidDomain.test(domain) == true) {
return {valid: false, error: "Invalid domain"}
} else {
return {valid: true, error: ""}
}
}
// Show validation errors
function showValidationMessage(validation) {
$('#custom-url').addClass("error")
$('#custom-url').attr("data-message", validation.error)
}
// Hide validation messages and replace the message attr with empty string
function hideValidationMessage() {
$('#custom-url').removeClass("error").attr("data-message", "")
}
// Set the custom URL cookie and apply the change
// If the custom URL field is empty, it defaults to the OSS default
function applyCustomUrl() {
var custUrl = $('#custom-url-field').val()
let urlValidation = validateUrl(custUrl)
if (custUrl.length > 0 ) {
if (urlValidation.valid) {
hideValidationMessage()
storeCustomUrl(custUrl)
storeUrl("oss", custUrl, getUrls().oss)
updateUrls(getPrevUrls(), getUrls())
} else {
showValidationMessage(urlValidation)
}
} else {
removeCustomUrl();
hideValidationMessage()
$('input[name="influxdb-oss-url"][value="' + defaultUrls.oss + '"]').trigger('click')
}
}
// Trigger radio button on custom URL field focus
$('input#custom-url-field').focus(function(e) {
$('input#custom[type="radio"]').trigger('click')
})
// Update URLs and close modal when using 'enter' to exit custom URL field
$("#custom-url").submit(function(e) {
let url = $('#custom-url-field').val() ? $('#custom-url-field').val() : ""
let urlValidation = validateUrl(url)
e.preventDefault();
$('#modal-close').trigger('click')
if (url === "" | urlValidation.valid) {
applyCustomUrl()
$('#modal-close').trigger('click')
} else {
showValidationMessage(urlValidation)
}
});
// Store the custom InfluxDB URL when exiting the field
$('#custom-url-field').blur(function() {
custUrl = $(this).val()
if (custUrl.length > 0 ) {
storeCustomUrl(custUrl)
updateUrls(getUrl(), custUrl)
storeUrl(custUrl, getPrevUrl())
} else {
$('input#custom').val('http://example.com:8080')
removeCustomUrl();
$('input[name="influxdb-loc"][value="' + defaultUrl + '"]').trigger('click')
}
applyCustomUrl()
})
// When in erred state, revalidate custom URL on keyup
$(document).on("keyup", ".error #custom-url-field", function() {
console.log("keyed up")
let url = $('#custom-url-field').val()
let urlValidation = validateUrl(url)
if (urlValidation.valid) {
hideValidationMessage()
} else {
showValidationMessage(urlValidation)
}
})
// Populate the custom InfluxDB URL field on page load
@ -175,18 +342,20 @@ if ( Cookies.get('influxdb_custom_url') != undefined ) {
$('#custom-url-field').val(Cookies.get('influxdb_custom_url'))
}
// Set active radio button on page load
setRadioButton(getUrl())
/////////////////////////// Dynamically update URLs ///////////////////////////
////////////////////////////////////////////////////////////////////////////////
/////////////////////////// Dynamically update URLs ////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Extract the protocol and hostname of referrer
referrerHost = document.referrer.match(/^(?:[^\/]*\/){2}[^\/]+/g)[0]
referrerMatch = document.referrer.match(/^(?:[^\/]*\/){2}[^\/]+/g)
referrerHost = referrerMatch ? referrerMatch[0] : "";
// Check if the referrerHost is one of the cloud URLs
// cloudUrls is built dynamically in layouts/partials/footer/javascript.html
if (cloudUrls.includes(referrerHost)) {
storeUrl(referrerHost, getUrl())
updateUrls(getPrevUrl(), referrerHost)
setRadioButton(referrerHost)
}
storeUrl("cloud", referrerHost, getUrls().cloud)
updateUrls(getPrevUrls(), getUrls())
setRadioButtons()
setPreference("cloud")
showPreference()
}

View File

@ -51,10 +51,16 @@
right: 0;
}
.actions {
display: flex;
margin: 1.25rem 0 .75rem 0;
}
a.btn {
position: relative;
display: inline-block;
margin: .5rem .25rem .75rem 0;
flex: 1 0;
margin: 0 .5rem .5rem 0;
padding: 1.25rem 2.25rem;
color: $article-btn-text !important;
border-radius: $radius;
@ -292,6 +298,7 @@
padding-bottom: 2rem;
h2 { font-size: 2rem; margin-top: .5rem; }
p { font-size: 1rem; line-height: 1.5rem; }
.actions { flex-direction: column; }
}
&.search {
order: 1;

View File

@ -27,6 +27,7 @@
padding: 5rem 2vw 5rem 4.5vw;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
text-align: center;
@ -102,13 +103,14 @@
}
&#get-started {
.avoid-wrap { display:inline-block }
.btn {
position: relative;
display: inline-block;
padding: 1.25rem;
margin: 0 20% .35rem;
display: block;
padding: 1.25rem 4rem;
color: $landing-btn-text;
font-size: 1.1rem;
font-size: 1.2rem;
font-weight: $medium;
@include gradient($landing-btn-grad);
transition: background-color .2s, color .2s;
@ -134,6 +136,19 @@
&:before { opacity: 1; }
}
}
.beta:after {
content: 'beta';
display: inline-block;
vertical-align: middle;
font-style: italic;
font-size: .45em;
margin: -8px 0 0 .5em;
padding: .1rem .6rem .12rem;
border-radius: 1rem;
border: .15rem solid rgba($landing-btn-text, .5);
transition: border-color .2s;
}
}
}
}

View File

@ -28,7 +28,7 @@
display: flex;
overflow: hidden;
max-width: 650px;
max-height: 95vh;
max-height: 97.5vh;
margin-top: 10vh;
padding: .75rem 2rem 1.5rem;
border-radius: $radius * 1.5;
@ -57,7 +57,7 @@
}
.modal-content{
overflow: scroll;
overflow: auto;
h3 {
color: $article-heading;
@ -107,14 +107,13 @@
.products {
display: flex;
flex-direction: column-reverse;
flex-direction: column;
flex-wrap: wrap;
flex-grow: 1;
justify-content: flex-start;
}
.product {
margin-right: .5rem;
.providers{
display: flex;
@ -144,6 +143,30 @@
display: inline-block;
width: 100%;
padding-left: .5rem;
position: relative;
&:after {
display: none;
content: attr(data-message);
position: absolute;
top: -1.8rem;
right: 0;
font-size: .85rem;
font-weight: $medium;
color: $r-fire;
}
&.error {
&:after { display: block; }
input#custom-url-field {
border-color: $r-fire;
&:focus {
border-color: $r-fire;
box-shadow: 1px 1px 10px rgba($r-fire,0.5);
}
}
}
input {
&#custom-url-field {
font-family: $rubik;
@ -227,13 +250,61 @@ td,label,li {
line-height: .75rem;
border-radius: 1rem;
}
}
label:after {
margin-left: .15rem;
}
/////////////////////////// InfluxDB Preference Tabs ///////////////////////////
#pref-tabs {
padding: 0;
margin: 0 0 -5px;
list-style: none;
display: flex;
justify-content: space-between;
align-items: center;
}
.pref-tab {
padding: .75rem 1.25rem;
margin-right: 5px;
text-align: center;
font-weight: bold;
width: 49%;
color: rgba($article-text, .7);
background: rgba($article-text, .05);
border-radius: $radius;
cursor: pointer;
transition: color .2s;
&:last-child {
margin-right: 0;
}
&:hover {
color: $article-link;
}
&.active {
color: $g20-white;
@include gradient($article-btn-gradient);
}
span.ephemeral { display: inline; }
span.abbr:after {
display: none;
content: ".";
}
}
.product {
&.active { display: block; }
&.inactive { display: none; }
}
///////////////////////////// InfluxDB URL Triggers ////////////////////////////
.article--content {
@ -271,3 +342,20 @@ label:after {
.select-url{margin-top: -3.25rem}
}
}
///////////////////////////////// MEDIA QUERIES ////////////////////////////////
@include media(small) {
.modal {
padding: .5rem;
overflow: scroll;
.modal-body {
padding: .5rem 1.5rem 1.5rem;
}
}
.pref-tab {
span.ephemeral { display: none; }
span.abbr:after { display: inline; }
}
}

View File

@ -19,6 +19,7 @@ smartDashes = false
[taxonomies]
"influxdb/v2.0/tag" = "influxdb/v2.0/tags"
"influxdb/cloud/tag" = "influxdb/cloud/tags"
[markup]
[markup.goldmark]

View File

@ -18,7 +18,7 @@ Complete the following steps to deploy an InfluxDB Enterprise cluster on Google
After deploying your cluster, see [Getting started with InfluxDB](/platform/introduction/getting-started) for an introduction to InfluxDB database and the InfluxData platform.
>**Note:** InfluxDB Enterprise on GCP is a self-managed product. For a fully managed InfluxDB experience, check out [InfluxDB Cloud 2.0](//influxdb/v2.0/cloud/get-started/).
>**Note:** InfluxDB Enterprise on GCP is a self-managed product. For a fully managed InfluxDB experience, check out [InfluxDB Cloud](/influxdb/cloud/get-started/).
## Verify prerequisites

View File

@ -20,7 +20,7 @@ Complete the following steps to deploy an InfluxDB Enterprise cluster on Google
After deploying your cluster, see [Getting started with InfluxDB](/platform/introduction/getting-started) for an introduction to InfluxDB database and the InfluxData platform.
>**Note:** InfluxDB Enterprise on GCP is a self-managed product. For a fully managed InfluxDB experience, check out [InfluxDB Cloud 2.0](//influxdb/v2.0/cloud/get-started/).
>**Note:** InfluxDB Enterprise on GCP is a self-managed product. For a fully managed InfluxDB experience, check out [InfluxDB Cloud](/influxdb/cloud/get-started/).
## Verify prerequisites

View File

@ -0,0 +1,19 @@
---
title: InfluxDB Cloud documentation
description: >
InfluxDB Cloud is an hosted and managed version of InfluxDB v2.0, the time series platform designed to handle high write and query loads.
Learn how to use and leverage InfluxDB Cloud in use cases such as monitoring metrics, IoT data, and events.
layout: landing-influxdb
menu:
influxdb_cloud:
name: InfluxDB Cloud
weight: 1
---
#### Welcome
Welcome to the InfluxDB v2.0 documentation!
InfluxDB is an open source time series database designed to handle high write and query workloads.
This documentation is meant to help you learn how to use and leverage InfluxDB to meet your needs.
Common use cases include infrastructure monitoring, IoT data collection, events handling, and more.
If your use case involves time series data, InfluxDB is purpose-built to handle it.

View File

@ -1,7 +1,7 @@
---
title: Manage your InfluxDB Cloud 2.0 Account
title: Manage your InfluxDB Cloud Account
description: >
View and manage information related to your InfluxDB Cloud 2.0 account such as
View and manage information related to your InfluxDB Cloud account such as
pricing plans, data usage, account cancelation, etc.
weight: 10
products: [cloud]
@ -9,7 +9,7 @@ aliases:
- /influxdb/v2.0/cloud/account-management/
- /influxdb/v2.0/account-management
menu:
influxdb_2_0:
influxdb_cloud:
name: Account management
products: [cloud]
---

View File

@ -4,12 +4,13 @@ list_title: Manage billing
description: >
Upgrade to the InfluxDB Cloud Usage-Based Plan and manage your billing information.
aliases:
- /influxdb/v2.0/account-management/billing
- /influxdb/v2.0/cloud/account-management/billing
- /influxdb/v2.0/cloud/account-management/upgrade-to-payg/
- /influxdb/v2.0/cloud/account-management/upgrade-to-usage-based-plan/
weight: 103
menu:
influxdb_2_0:
influxdb_cloud:
parent: Account management
name: Manage billing
products: [cloud]
@ -40,9 +41,9 @@ Add your payment method and view billing information in the {{< cloud-name "shor
{{< nav-icon "account" >}}
2. Do one of the following:
- If you subscribed to an InfluxDB Cloud 2.0 plan through [**AWS Marketplace**](https://aws.amazon.com/marketplace/pp/B08234JZPS) or [**GCP Marketplace**](https://console.cloud.google.com/marketplace/details/influxdata-public/cloud2-gcp-marketplace-prod?pli=1), click the **AWS** or **GCP** link to access your billing and subscription information.
- If you subscribed to an InfluxDB Cloud plan through [**AWS Marketplace**](https://aws.amazon.com/marketplace/pp/B08234JZPS) or [**GCP Marketplace**](https://console.cloud.google.com/marketplace/details/influxdata-public/cloud2-gcp-marketplace-prod?pli=1), click the **AWS** or **GCP** link to access your billing and subscription information.
- If you subscribed to an InfluxDB Cloud 2.0 plan through **InfluxData**, complete the following procedures as needed:
- If you subscribed to an InfluxDB Cloud plan through **InfluxData**, complete the following procedures as needed:
- [Add or update your payment method](#add-or-update-your-payment-method)
- [Add or update your contact information](#add-or-update-your-contact-information)
@ -98,7 +99,7 @@ On the **Billing page**, view the total limits available for the Free Plan.
## Exceeded rate limits
If you exceed your plan's [rate limits](/influxdb/v2.0/account-management/pricing-plans/), {{< cloud-name >}} provides a notification in the {{< cloud-name "short" >}} user interface (UI) and adds a rate limit event to your **Usage** page for review.
If you exceed your plan's [rate limits](/influxdb/cloud/account-management/pricing-plans/), {{< cloud-name >}} provides a notification in the {{< cloud-name "short" >}} user interface (UI) and adds a rate limit event to your **Usage** page for review.
All rate-limited requests are rejected; including both read and write requests.
_Rate-limited requests are **not** queued._

View File

@ -0,0 +1,35 @@
---
title: Change your password
seotitle: Change your password in InfluxDB
description: Change your password in InfluxDB using the influx CLI.
menu:
influxdb_cloud:
name: Change your password
parent: Account management
weight: 105
---
Use `influx` command line interface (CLI) to update your password.
{{% note %}}
User passwords cannot be updated in the InfluxDB UI.
{{% /note %}}
## Change your password using the influx CLI
Use the [`influx user password` command](/influxdb/cloud/reference/cli/influx/user/password)
to update a password for a user. To update a password, you need the following:
- Username or user ID _(provided in the output of `influx user list`)_
- New password
##### Update a password
```sh
# Syntax
influx user password -n <username>
# Example
influx user password -n johndoe
```
When prompted, enter and confirm the new password.

View File

@ -2,12 +2,13 @@
title: View InfluxDB Cloud data usage
list_title: View data usage
description: >
View your InfluxDB Cloud 2.0 data usage and rate limit notifications.
View your InfluxDB Cloud data usage and rate limit notifications.
weight: 103
aliases:
- /influxdb/v2.0/cloud/account-management/data-usage
- /influxdb/v2.0/account-management/data-usage
- /influxdb/v2.0/cloud/account-management/data-usage
menu:
influxdb_2_0:
influxdb_cloud:
parent: Account management
name: View data usage
products: [cloud]
@ -30,14 +31,14 @@ Find data usage information for the time frame specified in the drop-down at the
## Exceeded rate limits
If you exceed your plan's [rate limits](/influxdb/v2.0/account-management/pricing-plans/), {{< cloud-name >}}
If you exceed your plan's [rate limits](/influxdb/cloud/account-management/pricing-plans/), {{< cloud-name >}}
will provide a notification in the {{< cloud-name "short" >}} user interface (UI)
and add a rate limit event to your **Usage** page for review.
All rate-limited requests are rejected; including both read and write requests.
_Rate-limited requests are **not** queued._
_To remove rate limits, [upgrade to a Usage-based Plan](/influxdb/v2.0/account-management/billing/#upgrade-to-usage-based-plan)._
_To remove rate limits, [upgrade to a Usage-based Plan](/influxdb/cloud/account-management/billing/#upgrade-to-usage-based-plan)._
### Rate-limited HTTP response code
When a request exceeds your plan's rate limit, the InfluxDB API returns the following response:

View File

@ -4,9 +4,11 @@ description: >
View and manage multiple users in an InfluxDB Cloud account.
weight: 4
menu:
influxdb_2_0:
influxdb_cloud:
parent: Account management
name: Manage multiple users
aliases:
- /influxdb/v2.0/account-management/multi-user/
---
{{< cloud-name >}} accounts support multiple users in an organization.

View File

@ -5,12 +5,18 @@ description: >
Invite a user to collaborate in InfluxDB Cloud.
weight: 103
menu:
influxdb_2_0:
influxdb_cloud:
parent: Manage multiple users
identifier: invite_user_cloud
aliases:
- /influxdb/v2.0/account-management/multi-user/invite-user/
---
1. Navigate to the **Users** page in the left navigation bar.
## Invite a user
1. In the {{< cloud-name "short" >}} UI, select the user avatar in the left navigation menu, and select **Users**.
{{< nav-icon "account" >}}
2. Under **Add a new user to your organization**, enter the email address of the user to invite.
(Users must be invited one at a time.)
3. Click **Add & Invite**.
@ -20,8 +26,20 @@ The activation link expires after 72 hours.
Once activated, the new user is added as an **Owner** with permissions to read and write all resources.
Accounts can have up to 50 pending invitations at one time.
## Withdraw an invitation
1. In the {{< cloud-name "short" >}} UI, select the user avatar in the left navigation menu, and select **Users**.
{{< nav-icon "account" >}}
2. Click the {{< icon "delete" >}} next to the invitation you want to withdraw.
3. Confirm the withdrawl.
{{% warn %}}
Currently, Cloud 2.0 has only one permission level: Owner.
#### Permissions
Currently, Cloud has only one permission level: Owner.
With Owner permissions, a user can delete resources and other users from your organization.
Take care when inviting a user.
{{% /warn %}}

View File

@ -5,9 +5,11 @@ description: >
Remove a user from an InfluxDB Cloud organization.
weight: 103
menu:
influxdb_2_0:
influxdb_cloud:
parent: Manage multiple users
identifier: remove_user_cloud
aliases:
- /influxdb/v2.0/account-management/multi-user/remove-user/
---
1. Navigate to the **Users** page in the left navigation bar.

View File

@ -1,13 +1,14 @@
---
title: Cancel your InfluxDB Cloud subscription
description: >
Cancel your InfluxDB Cloud 2.0 account at any time by stopping all read and write
Cancel your InfluxDB Cloud account at any time by stopping all read and write
requests, backing up data, and contacting InfluxData Support.
weight: 104
weight: 106
aliases:
- /influxdb/v2.0/cloud/account-management/offboarding
- /influxdb/v2.0/account-management/offboarding
- /influxdb/v2.0/cloud/account-management/offboarding
menu:
influxdb_2_0:
influxdb_cloud:
parent: Account management
name: Cancel InfluxDB Cloud
products: [cloud]
@ -33,11 +34,11 @@ Exported data and artifacts can be used in an InfluxDB OSS instance.
#### Export tasks
For details, see [Export a task](/influxdb/v2.0/process-data/manage-tasks/export-task/).
For details, see [Export a task](/influxdb/cloud/process-data/manage-tasks/export-task/).
#### Export dashboards
For details, see [Export a dashboard](/influxdb/v2.0/visualize-data/dashboards/export-dashboard/).
For details, see [Export a dashboard](/influxdb/cloud/visualize-data/dashboards/export-dashboard/).
#### Save Telegraf configurations
@ -60,6 +61,6 @@ To request a backup of data in your {{< cloud-name "short" >}} instance, contact
2. Do one of the following:
- If you subscribed to an InfluxDB Cloud 2.0 **Usage-Based Plan** through **AWS Marketplace**, click the **AWS** link, click **Unsubscribe**, and then click **Yes, cancel subscription**.
- If you subscribed to an InfluxDB Cloud 2.0 **Usage-Based Plan** through **GCP Marketplace**, click the **GCP** link, click **Unsubscribe**, and then click **Yes, cancel subscription**.
- If you subscribed to an InfluxDB Cloud 2.0 **Usage-Based Plan** through **InfluxData**, click **Cancel Service**. Select **I understand and agree to these conditions**, and then click **I understand, Cancel Service.** Click **Confirm and Cancel Service**. Your payment method is charged your final balance immediately upon cancellation of service.
- If you subscribed to an InfluxDB Cloud **Usage-Based Plan** through **AWS Marketplace**, click the **AWS** link, click **Unsubscribe**, and then click **Yes, cancel subscription**.
- If you subscribed to an InfluxDB Cloud **Usage-Based Plan** through **GCP Marketplace**, click the **GCP** link, click **Unsubscribe**, and then click **Yes, cancel subscription**.
- If you subscribed to an InfluxDB Cloud **Usage-Based Plan** through **InfluxData**, click **Cancel Service**. Select **I understand and agree to these conditions**, and then click **I understand, Cancel Service.** Click **Confirm and Cancel Service**. Your payment method is charged your final balance immediately upon cancellation of service.

View File

@ -1,11 +1,11 @@
---
title: InfluxDB Cloud 2.0 pricing calculator
title: InfluxDB Cloud pricing calculator
description: >
Use the InfluxDB Cloud 2.0 pricing calculator to estimate costs by adjusting the number of devices,
Use the InfluxDB Cloud pricing calculator to estimate costs by adjusting the number of devices,
plugins, metrics, and writes for the Usage-based Plan.
weight: 2
menu:
influxdb_2_0:
influxdb_cloud:
name: Pricing calculator
products: [cloud]
draft: true
@ -46,4 +46,4 @@ Guidelines used to estimate costs for default configurations:
- **Professional**. For teams monitoring multiple disparate systems or use cases.
- **Enterprise**. For teams monitoring multiple domains and use cases accessing a variety of dashboards.
5. Adjust the default configuration values to match your number of devices, plugins, metrics, and so on. The **Projected Usage** costs are automatically updated as you adjust your configuration.
6. Click **Get started with InfluxDB Cloud** [to get started](/influxdb/v2.0/get-started/).
6. Click **Get started with InfluxDB Cloud** [to get started](/influxdb/cloud/get-started/).

View File

@ -1,26 +1,27 @@
---
title: InfluxDB Cloud 2.0 pricing plans
title: InfluxDB Cloud pricing plans
description: >
InfluxDB Cloud 2.0 provides two pricing plans to fit your needs the rate-limited
InfluxDB Cloud provides two pricing plans to fit your needs the rate-limited
Free Plan and the Usage-based Plan.
aliases:
- /influxdb/v2.0/cloud/rate-limits/
- /influxdb/v2.0/cloud/pricing-plans/
- /influxdb/v2.0/pricing-plans/
weight: 102
menu:
influxdb_2_0:
influxdb_cloud:
parent: Account management
name: Pricing plans
products: [cloud]
influxdb/v2.0/tags: [VPC]
influxdb/cloud/tags: [VPC]
---
InfluxDB Cloud 2.0 offers two pricing plans:
InfluxDB Cloud offers two pricing plans:
- [Free Plan](#free-plan)
- [Usage-Based Plan](#usage-based-plan)
<!--To estimate your projected usage costs, use the [InfluxDB Cloud 2.0 pricing calculator](/influxdb/v2.0/account-management/pricing-calculator/). -->
<!--To estimate your projected usage costs, use the [InfluxDB Cloud pricing calculator](/influxdb/cloud/account-management/pricing-calculator/). -->
## Free Plan
@ -45,11 +46,11 @@ Data retention is determined by the time at which data is written to InfluxDB; n
- Unlimited Slack notification endpoints
_To remove rate limits, [upgrade to a Usage-based Plan](/influxdb/v2.0/account-management/billing/#upgrade-to-usage-based-plan)._
_To remove rate limits, [upgrade to a Usage-based Plan](/influxdb/cloud/account-management/billing/#upgrade-to-usage-based-plan)._
## Usage-Based Plan
The Usage-based Plan offers more flexibility and ensures you only pay for what you [use](/influxdb/v2.0/account-management/data-usage/).
The Usage-based Plan offers more flexibility and ensures you only pay for what you [use](/influxdb/cloud/account-management/data-usage/).
### Pricing vectors
@ -68,7 +69,7 @@ To protect against any intentional or unintentional harm, Usage-Based Plans incl
- **Ingest batch size:** 50MB
- **Queries:** 3000MB every 5 minutes
- **Storage:** Unlimited retention
- **Series cardinality:** 1,000,000
- **Series cardinality:** 1,000,000 initial limit (higher limits available; [contact support](mailto:support@influxdata.com))
- **Create:**
- Unlimited dashboards
- Unlimited tasks

View File

@ -0,0 +1,293 @@
---
title: Get started with InfluxDB Cloud
description: >
InfluxDB Cloud is a fully managed and hosted version of InfluxDB v2.0, the time series
platform purpose-built to collect, store, process and visualize metrics and events.
menu:
influxdb_cloud:
name: Get started
weight: 2
influxdb/cloud/tags: [get-started, install]
aliases:
- /influxdb/v2.0/cloud/get-started
---
InfluxDB Cloud is a fully managed and hosted version of InfluxDB v2.0, the time series
platform purpose-built to collect, store, process and visualize metrics and events.
_See [Differences between InfluxDB Cloud and InfluxDB OSS](#differences-between-influxdb-cloud-and-influxdb-oss)._
## Start for free
Start using {{< cloud-name >}} at no cost with the [Free Plan](/influxdb/cloud/account-management/pricing-plans/#free-plan).
Use it as much and as long as you like within the plan's rate-limits.
Limits are designed to let you monitor 5-10 sensors, stacks or servers comfortably.
## Sign up
1. Choose one of the following:
#### Subscribe through InfluxData
To subscribe to an InfluxDB Cloud **Free Plan** through InfluxData,
go to [InfluxDB Cloud]({{< cloud-link >}}).
- To use social sign-on, click **Continue with Google**. Note that Google social sign-on does not support email aliases.
- Sign up with email by entering your name, email address, and password, then click **Create Account**.
If you originally signed up with email but want to enable social sign-on, you can do so by logging in through Google as long as you use the same email address.
#### **Subscribe through a cloud provider**
To subscribe to an InfluxDB Cloud **Usage-Based** plan and pay through your
**Amazon Web Services (AWS)** or **Google Cloud Platform (GCP)** account:
- **AWS**
Sign in to AWS, navigate to the [InfluxDB Cloud product on AWS Marketplace](https://aws.amazon.com/marketplace/pp/B08234JZPS),
and follow the prompts to subscribe. After you click **Set Up Your Account**,
enter your credentials, and then click **Start Now**.
All usage charges will be paid through the subscribed AWS account.
- **GCP**
Sign in to GCP, navigate to the [InfluxDB Cloud product on GCP Marketplace](https://console.cloud.google.com/marketplace/details/influxdata-public/cloud2-gcp-marketplace-prod),
and follow the prompts to subscribe. After you click **Set Up Your Account**,
enter your credentials, and then click **Start Now**.
All usage charges will be paid through the subscribed GCP account.
{{%note%}}
Currently, we do **not support** using an existing InfluxDB Cloud account to sign up for an InfluxDB Cloud plan through AWS or GCP Marketplaces.
{{%/note%}}
2. If you signed up with your email address, InfluxDB Cloud requires email verification to complete the sign up process.
Verify your email address by opening the email sent to the address you provided and clicking **Verify Your Email**.
3. (If you subscribed through InfluxData) Choose your cloud provider.
4. Select a provider and region for your {{< cloud-name >}} instance. The following are available:
{{< cloud_regions type="list" >}}
_To suggest regions to add, click **Let us know** under Regions._
5. (If you subscribed through InfluxData) Review the terms of the agreement, and then select **I have viewed and agree to InfluxDB Cloud Services Subscription Agreement and InfluxData Global Data Processing Agreement**.
For details on the agreements, see the [InfluxDB Cloud: Services Subscription Agreement](https://www.influxdata.com/legal/terms-of-use/) and the [InfluxData Global Data Processing Agreement](https://www.influxdata.com/legal/influxdata-global-data-processing-agreement/).
6. Click **Finish**. {{< cloud-name >}} opens with a default organization and bucket (both created from your email address).
_To update organization and bucket names, see [Update an organization](/influxdb/cloud/organizations/update-org/)
and [Update a bucket](/influxdb/cloud/organizations/buckets/update-bucket/#update-a-buckets-name-in-the-influxdb-ui)._
## (Optional) Download, install, and use the influx CLI
To use the `influx` CLI to manage and interact with your InfluxDB Cloud instance, complete the following steps:
{{< tabs-wrapper >}}
{{% tabs %}}
[macOS](#)
[Linux](#)
{{% /tabs %}}
<!-------------------------------- BEGIN macOS -------------------------------->
{{% tab-content %}}
#### Step 1: Download influx CLI for macOS
Click the following button to download and install `influx` CLI for macOS.
<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb_client_2.0.1_darwin_amd64.tar.gz" download>influx CLI (macOS)</a>
#### Step 2: Unpackage the influx binary
**Note:** The commands below are examples. Adjust the file names, paths, and utilities to your own needs.
To unpackage the downloaded archive, **double click the archive file in Finder**
or run the following command in a macOS command prompt application such
**Terminal** or **[iTerm2](https://www.iterm2.com/)**:
```sh
# Unpackage contents to the current working directory
tar zxvf ~/Downloads/influxdb_client_2.0.1_darwin_amd64.tar.gz
```
#### Step 3: (Optional) Place the binary in your $PATH
If you choose, you can place `influx` in your `$PATH` or you can
prefix the executable with `./` to run in place. If the binary is on your $PATH, you can run `influx` from any directory. Otherwise, you must specify the location of the CLI (for example, `./influx`or `path/to/influx`).
**Note:** If you have the 1.x binary on your $PATH, moving the 2.0 binary to your $PATH will overwrite the 1.x binary because they have the same name.
```sh
# Copy the influx binary to your $PATH
sudo cp influxdb_client_2.0.1_darwin_amd64/influx /usr/local/bin/
```
{{% note %}}
If you rename the binary, all references to `influx` in this documentation refer to the renamed binary.
{{% /note %}}
#### Step 4: (macOS Catalina only) Authorize InfluxDB binaries
If running `influx` on macOS Catalina, you must manually authorize the
`influx` binary in the **Security & Privacy** section of **System Preferences**.
#### Step 5: Set up a configuration profile
To avoid having to pass your InfluxDB [authentication token](/influxdb/cloud/security/tokens/) with each `influx` command, set up a configuration profile that stores your credentials.
In a terminal, run the following command:
```sh
# Set up a configuration profile
influx config create -n default \
-u https://cloud2.influxdata.com \
-o example-org \
-t mySuP3rS3cr3tT0keN \
-a
```
This configures a new profile named `default` and makes the profile active so your `influx` CLI commands run against this instance.
For more detail, see [influx config](/influxdb/cloud/reference/cli/influx/config/).
#### Step 6: Learn `influx` CLI commands
To see all available `influx` commands, type `influx -h` or check out [influx - InfluxDB command line interface](/influxdb/cloud/reference/cli/influx/).
{{% /tab-content %}}
<!--------------------------------- END macOS --------------------------------->
<!-------------------------------- BEGIN Linux -------------------------------->
{{% tab-content %}}
#### Step 1: Download influx CLI for Linux
Click one of the following buttons to download and install the `influx` CLI appropriate for your chipset.
<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb_client_2.0.1_linux_amd64.tar.gz" download >influx CLI (amd64)</a>
<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb_client_2.0.1_linux_arm64.tar.gz" download >influx CLI (arm)</a>
#### Step 2: Unpackage the influx binary
**Note:** The commands below are examples. Adjust the file names, paths, and utilities to your own needs.
```sh
# Unpackage contents to the current working directory
tar xvfz influxdb_client_2.0.1_linux_amd64.tar.gz
```
#### Step 3: (Optional) Place the binary in your $PATH
If you choose, you can place `influx` in your `$PATH` or you can
prefix the executable with `./` to run in place. If the binary is on your $PATH, you can run `influx` from any directory. Otherwise, you must specify the location of the CLI (for example, `./influx`or `path/to/influx`).
**Note:** If you have the 1.x binary on your $PATH, moving the 2.0 binary to your $PATH will overwrite the 1.x binary because they have the same name.
```sh
# Copy the influx and influxd binary to your $PATH
sudo cp influxdb_client_2.0.1_linux_amd64/influx /usr/local/bin/
```
{{% note %}}
If you rename the binary, all references to `influx` in this documentation refer to the renamed binary.
{{% /note %}}
#### Step 4: Set up a configuration profile
To avoid having to pass your InfluxDB [authentication token](/influxdb/cloud/security/tokens/) with each `influx` command, set up a configuration profile that stores your credentials.
In a terminal, run the following command:
```sh
# Set up a configuration profile
influx config create -n default \
-u https://cloud2.influxdata.com \
-o example-org \
-t mySuP3rS3cr3tT0keN \
-a
```
This configures a new profile named `default` and makes the profile active so your `influx` CLI commands run against this instance.
For more detail, see [influx config](/influxdb/cloud/reference/cli/influx/config/).
#### Step 5: Learn `influx` CLI commands
To see all available `influx` commands, type `influx -h` or check out [influx - InfluxDB command line interface](/influxdb/cloud/reference/cli/influx/).
{{% /tab-content %}}
<!--------------------------------- END Linux --------------------------------->
{{< /tabs-wrapper >}}
## Sign in
Sign in to [InfluxDB Cloud](https://cloud2.influxdata.com) using your email address and password.
<a class="btn" href="https://cloud2.influxdata.com">Sign in to InfluxDB Cloud now</a>
## Start working with your time series data
### Collect and write data
Collect and write data to InfluxDB using the Telegraf plugins, the InfluxDB v2 API, the `influx`
command line interface (CLI), the InfluxDB UI (the user interface for InfluxDB Cloud), or the InfluxDB v2 API client libraries.
#### Use Telegraf
Use Telegraf to quickly write data to {{< cloud-name >}}.
Create new Telegraf configurations automatically in the InfluxDB UI, or manually update an
existing Telegraf configuration to send data to your {{< cloud-name "short" >}} instance.
For details, see [Automatically configure Telegraf](/influxdb/cloud/write-data/no-code/use-telegraf/auto-config/)
and [Manually update Telegraf configurations](/influxdb/cloud/write-data/no-code/use-telegraf/manual-config/).
#### API, CLI, and client libraries
For information about using the InfluxDB v2 API, `influx` CLI, and client libraries to write data,
see [Write data to InfluxDB](/influxdb/cloud/write-data/).
#### Demo data
**{{< cloud-name "short" >}}** lets you [add a demo data bucket](/influxdb/cloud/reference/sample-data/#influxdb-cloud-demo-data)
for quick, **free** access to time series data.
### Query data
Query data using Flux, the UI, and the `influx` command line interface.
See [Query data](/influxdb/cloud/query-data/).
### Process data
Use InfluxDB tasks to process and downsample data. See [Process data](/influxdb/cloud/process-data/).
### Visualize data
Build custom dashboards to visualize your data.
See [Visualize data](/influxdb/cloud/visualize-data/).
### Monitor and alert
Monitor your data and sends alerts based on specified logic.
See [Monitor and alert](/influxdb/cloud/monitor-alert/).
## Differences between InfluxDB Cloud and InfluxDB OSS
{{< cloud-name >}} is API-compatible and functionally compatible with InfluxDB OSS 2.0.
The primary differences between InfluxDB OSS 2.0 and InfluxDB Cloud are:
- [InfluxDB scrapers](/influxdb/v2.0/write-data/no-code/scrape-data/) that collect data from specified
targets are not available in {{< cloud-name "short" >}}.
- {{< cloud-name "short" >}} instances are currently limited to a single organization.
#### New features in InfluxDB Cloud
- **Free Plan (rate-limited)**: Skip downloading and installing InfluxDB OSS 2.0 and
jump into exploring InfluxDB Cloud technology.
The Free Plan is designed for getting started with InfluxDB and for small hobby projects.
- **Flux support**: [Flux](/influxdb/cloud/query-data/get-started/) is a standalone data
scripting and query language that increases productivity and code reuse.
It is the primary language for working with data within InfluxDB Cloud.
Flux can be used with other data sources as well, letting you work with data where it resides.
- **Unified API**: Everything in InfluxDB (ingest, query, storage, and visualization)
is now accessible using a unified [InfluxDB v2 API](/influxdb/cloud/reference/api/) that
enables seamless movement between open source and cloud.
- **Integrated visualization and dashboards**: Based on the pioneering Chronograf project,
the new user interface (InfluxDB UI) offers quick and effortless onboarding,
richer user experiences, and significantly quicker results.
- **Usage-based pricing**: The [Usage-based Plan](/influxdb/cloud/account-management/pricing-plans/#usage-based-plan)
offers more flexibility and ensures that you only pay for what you use.

View File

@ -0,0 +1,68 @@
---
title: InfluxDB templates
description: >
InfluxDB templates are prepackaged InfluxDB configurations that contain everything
from dashboards and Telegraf configurations to notifications and alerts.
menu: influxdb_cloud
weight: 9
influxdb/cloud/tags: [templates]
---
InfluxDB templates are prepackaged InfluxDB configurations that contain everything
from dashboards and Telegraf configurations to notifications and alerts.
Use InfluxDB templates to quickly set up a fresh instance of InfluxDB, back up your
dashboard configuration, or share your configuration with the InfluxData community.
**InfluxDB templates do the following:**
- Reduce setup time
- Facilitate secure, portable, source-controlled InfluxDB platform states.
- Simplify sharing and using pre-built InfluxDB solutions.
{{< youtube 2JjW4Rym9XE >}}
## Template manifests
A template consists of a single file known as a **manifest** that defines the
InfluxDB state and associated [resources](#template-resources).
Template manifests support the following formats:
- [YAML](https://yaml.org/)
- [JSON](https://www.json.org/)
- [Jsonnet](https://jsonnet.org/)
{{% note %}}
Template manifests are compatible with
[Kubernetes Custom Resource Definitions (CRD)](https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/).
{{% /note %}}
The `metadata.name` field in manifests uniquely identifies each resource in the template.
`metadata.name` values must be [DNS-1123](https://tools.ietf.org/html/rfc1123) compliant.
If resources in the template depend on other InfluxDB resources, all dependencies
must be included in the template.
_See [Create an InfluxDB template](/influxdb/cloud/influxdb-templates/create/) for information about
generating template manifests._
### Template resources
Include the following **resources** in a template:
- buckets
- checks
- dashboards
- dashboard variables
- labels
- notification endpoints
- notification rules
- tasks
- Telegraf configurations
## Stacks
**InfluxDB stacks** are stateful InfluxDB templates.
When you apply a template, InfluxDB associates resources in the template with a stack.
Use stacks to add, update, or remove templated resources over time.
For more information, see [InfluxDB Stacks](#influxdb-stacks) below.
---
{{< children >}}

View File

@ -2,15 +2,16 @@
title: InfluxDB templates in InfluxDB Cloud
list_title: InfluxDB templates in Cloud
description: >
Install templates directly in the UI or download the `influx` CLI to apply and manage InfluxDB templates in your InfluxDB Cloud account.
Install templates directly in the UI or download the `influx` CLI to apply
and manage InfluxDB templates in your InfluxDB Cloud account.
menu:
influxdb_2_0:
influxdb_cloud:
parent: InfluxDB templates
name: Templates in Cloud
weight: 101
aliases:
- /influxdb/v2.0/influxdb-templates/get_started_cloud/
influxdb/v2.0/tags: [templates]
- /influxdb/cloud/influxdb-templates/get_started_cloud/
influxdb/cloud/tags: [templates]
products: [cloud]
---
@ -38,15 +39,15 @@ The Template Installer displays the template name and the number of resources in
- Click **View Readme**. Complete the instructions to finalize your template.
- (Optional) To customize a template, under **Installed Resources**, expand the template resources, and then click a resource to update it. Update any of the following resources included in the template:
- Buckets. [Update buckets](/influxdb/v2.0/organizations/buckets/update-bucket/)
- Dashboards. [Control dashboards](/influxdb/v2.0/visualize-data/dashboards/control-dashboard/)
- Labels. [Edit labels](/influxdb/v2.0/visualize-data/labels/#edit-a-label)
- Checks. [Update checks](/influxdb/v2.0/monitor-alert/checks/update/)
- Notification endpoints. [Update notification endpoints](/influxdb/v2.0/monitor-alert/notification-endpoints/update/)
- Notification rules. [Update notification rules](/influxdb/v2.0/monitor-alert/notification-rules/update/)
- Telegraf configurations. [Update a Telegraf configurations](/influxdb/v2.0/telegraf-configs/update/)
- Buckets. [Update buckets](/influxdb/cloud/organizations/buckets/update-bucket/)
- Dashboards. [Control dashboards](/influxdb/cloud/visualize-data/dashboards/control-dashboard/)
- Labels. [Edit labels](/influxdb/cloud/visualize-data/labels/#edit-a-label)
- Checks. [Update checks](/influxdb/cloud/monitor-alert/checks/update/)
- Notification endpoints. [Update notification endpoints](/influxdb/cloud/monitor-alert/notification-endpoints/update/)
- Notification rules. [Update notification rules](/influxdb/cloud/monitor-alert/notification-rules/update/)
- Telegraf configurations. [Update a Telegraf configurations](/influxdb/cloud/telegraf-configs/update/)
7. (Optional) Add or delete resources from the template, and then use the `influx` CLI to [export resources to a new template (JSON or YAML file)](/influxdb/v2.0/influxdb-templates/create/#export-all-resources).
7. (Optional) Add or delete resources from the template, and then use the `influx` CLI to [export resources to a new template (JSON or YAML file)](/influxdb/cloud/influxdb-templates/create/#export-all-resources).
{{% note %}}
To install and configure the `influx` CLI, complete steps 1-2 in the procedure below.
@ -54,15 +55,15 @@ To install and configure the `influx` CLI, complete steps 1-2 in the procedure b
## Apply and manage templates using the influx CLI
Use the [`influx` CLI](/influxdb/v2.0/reference/cli/influx/)
Use the [`influx` CLI](/influxdb/cloud/reference/cli/influx/)
to apply and manage templates in your InfluxDB Cloud account.
If you havent already, do the following:
1. [Download and install `influx` CLI](/influxdb/v2.0/get-started/#optional-download-install-and-use-the-influx-cli).
2. [Configure the `influx` CLI](/influxdb/v2.0/get-started/#set-up-influxdb) to use your
1. [Download and install `influx` CLI](/influxdb/cloud/get-started/#optional-download-install-and-use-the-influx-cli).
2. [Configure the `influx` CLI](/influxdb/cloud/get-started/#set-up-influxdb) to use your
InfluxDB Cloud instance URL, organization, and tokens.
3. [Use the `influx` CLI](/influxdb/v2.0/reference/cli/influx/) to use, manage, and create
3. [Use the `influx` CLI](/influxdb/cloud/reference/cli/influx/) to use, manage, and create
InfluxDB templates:
- [Use templates](/influxdb/v2.0/influxdb-templates/use/)
- [Create templates](/influxdb/v2.0/influxdb-templates/create/)
- [Use templates](/influxdb/cloud/influxdb-templates/use/)
- [Create templates](/influxdb/cloud/influxdb-templates/create/)

View File

@ -0,0 +1,231 @@
---
title: Create an InfluxDB template
description: >
Use the InfluxDB UI and the `influx export` command to create InfluxDB templates.
menu:
influxdb_cloud:
parent: InfluxDB templates
name: Create a template
identifier: Create an InfluxDB template
weight: 103
influxdb/cloud/tags: [templates]
related:
- /influxdb/cloud/reference/cli/influx/export/
- /influxdb/cloud/reference/cli/influx/export/all/
---
Use the InfluxDB user interface (UI) and the `influx export` command to
create InfluxDB templates.
Add resources (buckets, Telegraf configurations, tasks, and more) in the InfluxDB
UI and export the resources as a template.
{{< youtube 714uHkxKM6U >}}
{{% note %}}
#### InfluxDB OSS for creating templates
Templatable resources are scoped to a single organization, so the simplest way to create a
template is to create a new organization, build the template within the organization,
and then [export all resources](#export-all-resources) as a template.
**[InfluxDB OSS](/{{< latest "influxdb" "v2" >}}/)** supports multiple organizations so you
can create new organizations for the sole purpose of building and maintaining a template.
In **InfluxDB Cloud**, your user account is an organization.
**We recommend [using InfluxDB OSS to create InfluxDB templates](/{{< latest "influxdb" "v2" >}}/influxdb-templates/create/).**
{{% /note %}}
## Export a template
Do one of the following to export a template:
- [Export all resources in an organization](#export-all-resources)
- [Export specific resources in an organization](#export-specific-resources)
- [Export a stack and its associated resources](#export-a-stack)
### Export all resources
To export all templatable resources within an organization to a template manifest,
use the `influx export all` command.
Provide the following:
- **Organization name** or **ID**
- **Authentication token** with read access to the organization
- **Destination path and filename** for the template manifest.
The filename extension determines the template format—both **YAML** (`.yml`) and
**JSON** (`.json`) are supported.
###### Export all resources to a template
```sh
# Syntax
influx export all -o <org-name> -f <file-path> -t <token>
# Example
influx export all \
-o my-org \
-f ~/templates/awesome-template.yml \
-t $INFLUX_TOKEN
```
#### Export resources filtered by labelName or resourceKind
The `influx export all` command has an optional `--filter` flag that exports
only resources that match specified label names or resource kinds.
Provide multiple filters for both `labelName` and `resourceKind`
###### Export only dashboards and buckets with specific labels
The following example exports resources that match this predicate logic:
```js
(resourceKind == "Bucket" or resourceKind == "Dashboard")
and
(labelName == "Example1" or labelName == "Example2")
```
```sh
influx export all \
-o my-org \
-f ~/templates/awesome-template.yml \
-t $INFLUX_TOKEN \
--filter=resourceKind=Bucket \
--filter=resourceKind=Dashboard \
--filter=labelName=Example1 \
--filter=labelName=Example2
```
For information about flags, see the
[`influx export all` documentation](/influxdb/cloud/reference/cli/influx/export/all/).
### Export specific resources
To export specific resources within an organization to a template manifest,
use the `influx export` with resource flags for each resource to include.
Provide the following:
- **Organization name** or **ID**
- **Authentication token** with read access to the organization
- **Destination path and filename** for the template manifest.
The filename extension determines the template format—both **YAML** (`.yml`) and
**JSON** (`.json`) are supported.
- **Resource flags** with corresponding lists of resource IDs to include in the template.
For information about what resource flags are available, see the
[`influx export` documentation](/influxdb/cloud/reference/cli/influx/export/).
###### Export specific resources to a template
```sh
# Syntax
influx export all -o <org-name> -f <file-path> -t <token> [resource-flags]
# Example
influx export all \
-o my-org \
-f ~/templates/awesome-template.yml \
-t $INFLUX_TOKEN \
--buckets=00x000ooo0xx0xx,o0xx0xx00x000oo \
--dashboards=00000xX0x0X00x000 \
--telegraf-configs=00000x0x000X0x0X0
```
### Export a stack
To export a stack and all its associated resources as a template, use the
`influx export stack` command.
Provide the following:
- **Organization name** or **ID**
- **Authentication token** with read access to the organization
- **Destination path and filename** for the template manifest.
The filename extension determines the template format—both **YAML** (`.yml`) and
**JSON** (`.json`) are supported.
- **Stack ID**
###### Export a stack as a template
```sh
# Syntax
influx export stack \
-o <org-name> \
-t <token> \
-f <file-path> \
<stack-id>
# Example
influx export stack \
-o my-org \
-t mYSuP3RS3CreTt0K3n
-f ~/templates/awesome-template.yml \
05dbb791a4324000
```
## Include user-definable resource names
After exporting a template manifest, replace resource names with **environment references**
to let users customize resource names when installing your template.
1. [Export a template](#export-a-template)
2. Select any of the following resource fields to update:
- `metadata.name`
- `associations[].name`
- `endpointName` _(unique to `NotificationRule` resources)_
3. Replace the resource field value with an `envRef` object with a `key` property
that reference the key of a key-value pair the user provides when installing the template.
During installation, the `envRef` object is replaced by the value of the
referenced key-value pair.
If the user does not provide the environment reference key-value pair, InfluxDB
uses the `key` string as the default value.
{{< code-tabs-wrapper >}}
{{% code-tabs %}}
[YAML](#)
[JSON](#)
{{% /code-tabs %}}
{{% code-tab-content %}}
```yml
apiVersion: influxdata.com/v2alpha1
kind: Bucket
metadata:
name:
envRef:
key: bucket-name-1
```
{{% /code-tab-content %}}
{{% code-tab-content %}}
```json
{
"apiVersion": "influxdata.com/v2alpha1",
"kind": "Bucket",
"metadata": {
"name": {
"envRef": {
"key": "bucket-name-1"
}
}
}
}
```
{{% /code-tab-content %}}
{{< /code-tabs-wrapper >}}
Using the example above, users are prompted to provide a value for `bucket-name-1`
when [applying the template](/influxdb/cloud/influxdb-templates/use/#apply-templates).
Users can also include the `--env-ref` flag with the appropriate key-value pair
when installing the template.
```sh
# Set bucket-name-1 to "myBucket"
influx apply \
-f /path/to/template.yml \
--env-ref=bucket-name-1=myBucket
```
_If sharing your template, we recommend documenting what environment references
exist in the template and what keys to use to replace them._
{{% note %}}
#### Resource fields that support environment references
Only the following fields support environment references:
- `metadata.name`
- `spec.endpointName`
- `spec.associations.name`
{{% /note %}}
## Share your InfluxDB templates
Share your InfluxDB templates with the entire InfluxData community.
**Contribute your template to the [InfluxDB Community Templates](https://github.com/influxdata/community-templates/)
repository on GitHub.**
<a class="btn" href="https://github.com/influxdata/community-templates/" target="\_blank">View InfluxDB Community Templates</a>

View File

@ -0,0 +1,51 @@
---
title: InfluxDB stacks
description: >
InfluxDB stacks are stateful InfluxDB templates that let you add,
update, and remove templated resources over time, avoid duplicating resources
when applying the same or similar templates more than once, and apply
changes to distributed instances of InfluxDB OSS or InfluxDB Cloud.
menu:
influxdb_cloud:
parent: InfluxDB templates
weight: 105
related:
- /influxdb/cloud/reference/cli/stacks/
---
**InfluxDB stacks** are **stateful [InfluxDB templates](/influxdb/cloud/influxdb-templates)**
that let you add, update, and remove templated resources over time, avoid
duplicating resources when applying the same or similar templates more than once,
and apply changes to distributed instances of InfluxDB OSS or InfluxDB Cloud.
## Ideal use cases for InfluxDB stacks
Stacks help save time and effort in the following use cases:
- [Actively develop and extend templates](#actively-develop-and-extend-templates)
- [Apply updates from source-controlled templates](#apply-updates-from-source-controlled-templates)
- [Apply template updates across multiple InfluxDB instances](#apply-template-updates-across-multiple-influxdb-instances)
### Actively develop and extend templates
InfluxDB stacks aid in developing and maintaining InfluxDB templates.
Stacks let you modify and update template manifests and apply those changes in
any stack that uses the template.
### Apply updates from source-controlled templates
You can use a variety of InfluxDB templates from many different sources including
[Community Templates](https://github.com/influxdata/community-templates/) or
self-built custom templates.
As templates are updated over time, stacks allow template users to gracefully
apply updates without creating duplicate resources.
### Apply template updates across multiple InfluxDB instances
In many cases, users have more than one instance of InfluxDB running and apply
the same template to each separate instance.
By using stacks, you can make changes to a stack on one instance,
[export the stack as a template](/influxdb/cloud/influxdb-templates/create/#export-a-stack)
and then apply the changes to your other InfluxDB instances.
## Manage InfluxDB Stacks
{{< children type="anchored-list" >}}
{{< children readmore=true >}}

View File

@ -0,0 +1,73 @@
---
title: Initialize an InfluxDB stack
list_title: Initialize a stack
description: >
InfluxDB automatically creates a new stack each time you [apply an InfluxDB template](/influxdb/cloud/influxdb-templates/use/)
**without providing a stack ID**.
To manually create or initialize a new stack, use the [`influx stacks init` command](/influxdb/cloud/reference/cli/influx/stacks/init/).
menu:
influxdb_cloud:
parent: InfluxDB stacks
name: Initialize a stack
weight: 201
related:
- /influxdb/cloud/reference/cli/influx/stacks/init/
list_code_example: |
```sh
influx apply \
-o example-org \
-f path/to/template.yml
```
```sh
influx stacks init \
-o example-org \
-n "Example Stack" \
-d "InfluxDB stack for monitoring some awesome stuff" \
-u https://example.com/template-1.yml \
-u https://example.com/template-2.yml
```
---
InfluxDB automatically creates a new stack each time you [apply an InfluxDB template](/influxdb/cloud/influxdb-templates/use/)
**without providing a stack ID**.
To manually create or initialize a new stack, use the [`influx stacks init` command](/influxdb/cloud/reference/cli/influx/stacks/init/).
## Initialize a stack when applying a template
To automatically create a new stack when [applying an InfluxDB template](/influxdb/cloud/influxdb-templates/use/)
**don't provide a stack ID**.
InfluxDB applies the resources in the template to a new stack and provides the **stack ID** the output.
```sh
influx apply \
-o example-org \
-f path/to/template.yml
```
## Manually initialize a new stack
Use the [`influx stacks init` command](/influxdb/cloud/reference/cli/influx/stacks/init/)
to create or initialize a new InfluxDB stack.
**Provide the following:**
- Organization name or ID
- Stack name
- Stack description
- InfluxDB template URLs
<!-- -->
```sh
# Syntax
influx stacks init \
-o <org-name> \
-n <stack-name> \
-d <stack-description \
-u <package-url>
# Example
influx stacks init \
-o example-org \
-n "Example Stack" \
-d "InfluxDB stack for monitoring some awesome stuff" \
-u https://example.com/template-1.yml \
-u https://example.com/template-2.yml
```

View File

@ -0,0 +1,39 @@
---
title: Remove an InfluxDB stack
list_title: Remove a stack
description: >
Use the [`influx stacks remove` command](/influxdb/cloud/reference/cli/influx/stacks/remove/)
to remove an InfluxDB stack and all its associated resources.
menu:
influxdb_cloud:
parent: InfluxDB stacks
name: Remove a stack
weight: 204
related:
- /influxdb/cloud/reference/cli/influx/stacks/remove/
list_code_example: |
```sh
influx stacks remove \
-o example-org \
--stack-id=12ab34cd56ef
```
---
Use the [`influx stacks remove` command](/influxdb/cloud/reference/cli/influx/stacks/remove/)
to remove an InfluxDB stack and all its associated resources.
**Provide the following:**
- Organization name or ID
- Stack ID
<!-- -->
```sh
# Syntax
influx stacks remove -o <org-name> --stack-id=<stack-id>
# Example
influx stacks remove \
-o example-org \
--stack-id=12ab34cd56ef
```

View File

@ -0,0 +1,56 @@
---
title: Update an InfluxDB stack
list_title: Update a stack
description: >
Use the [`influx apply` command](/influxdb/cloud/reference/cli/influx/apply/)
to update a stack with a modified template.
When applying a template to an existing stack, InfluxDB checks to see if the
resources in the template match existing resources.
InfluxDB updates, adds, and removes resources to resolve differences between
the current state of the stack and the newly applied template.
menu:
influxdb_cloud:
parent: InfluxDB stacks
name: Update a stack
weight: 202
related:
- /influxdb/cloud/reference/cli/influx/apply
- /influxdb/cloud/reference/cli/influx/stacks/update/
list_code_example: |
```sh
influx apply \
-o example-org \
-u http://example.com/template-1.yml \
-u http://example.com/template-2.yml \
--stack-id=12ab34cd56ef
```
---
Use the [`influx apply` command](/influxdb/cloud/reference/cli/influx/apply/)
to update a stack with a modified template.
When applying a template to an existing stack, InfluxDB checks to see if the
resources in the template match existing resources.
InfluxDB updates, adds, and removes resources to resolve differences between
the current state of the stack and the newly applied template.
Each stack is uniquely identified by a **stack ID**.
For information about retrieving your stack ID, see [View stacks](/influxdb/cloud/influxdb-templates/stacks/view/).
**Provide the following:**
- Organization name or ID
- Stack ID
- InfluxDB template URLs to apply
<!-- -->
```sh
influx apply \
-o example-org \
-u http://example.com/template-1.yml \
-u http://example.com/template-2.yml \
--stack-id=12ab34cd56ef
```
Template resources are uniquely identified by their `metadata.name` field.
If errors occur when applying changes to a stack, all applied changes are
reversed and the stack is returned to its previous state.

View File

@ -0,0 +1,66 @@
---
title: View InfluxDB stacks
list_title: View stacks
description: >
Use the [`influx stacks` command](/influxdb/cloud/reference/cli/influx/stacks/)
to view installed InfluxDB stacks and their associated resources.
menu:
influxdb_cloud:
parent: InfluxDB stacks
name: View stacks
weight: 203
related:
- /influxdb/cloud/reference/cli/influx/stacks/
list_code_example: |
```sh
influx stacks -o example-org
```
---
Use the [`influx stacks` command](/influxdb/cloud/reference/cli/influx/stacks/)
to view installed InfluxDB stacks and their associated resources.
**Provide the following:**
- Organization name or ID
<!-- -->
```sh
# Syntax
influx stacks -o <org-name>
# Example
influx stacks -o example-org
```
### Filter stacks
To output information about specific stacks, use the `--stack-name` or `--stack-id`
flags to filter output by stack names or stack IDs.
##### Filter by stack name
```sh
# Syntax
influx stacks \
-o <org-name> \
--stack-name=<stack-name>
# Example
influx stacks \
-o example-org \
--stack-name=stack1 \
--stack-name=stack2
```
### Filter by stack ID
```sh
# Syntax
influx stacks \
-o <org-name> \
--stack-id=<stack-id>
# Example
influx stacks \
-o example-org \
--stack-id=12ab34cd56ef \
--stack-id=78gh910i11jk
```

View File

@ -0,0 +1,241 @@
---
title: Use InfluxDB templates
description: >
Use the `influx` command line interface (CLI) to summarize, validate, and apply
templates from your local filesystem and from URLs.
menu:
influxdb_cloud:
parent: InfluxDB templates
name: Use templates
weight: 102
influxdb/cloud/tags: [templates]
related:
- /influxdb/cloud/reference/cli/influx/apply/
- /influxdb/cloud/reference/cli/influx/template/
- /influxdb/cloud/reference/cli/influx/template/validate/
---
Use the `influx` command line interface (CLI) to summarize, validate, and apply
templates from your local filesystem and from URLs.
- [Use InfluxDB community templates](#use-influxdb-community-templates)
- [View a template summary](#view-a-template-summary)
- [Validate a template](#validate-a-template)
- [Apply templates](#apply-templates)
## Use InfluxDB community templates
The [InfluxDB community templates repository](https://github.com/influxdata/community-templates/)
is home to a growing number of InfluxDB templates developed and maintained by
others in the InfluxData community.
Apply community templates directly from GitHub using a template's download URL
or download the template.
{{< youtube 2JjW4Rym9XE >}}
{{% note %}}
When attempting to access the community templates via the URL, the templates use the following
as the root of the URL:
```sh
https://raw.githubusercontent.com/influxdata/community-templates/master/
```
For example, the Docker community template can be accessed via:
```sh
https://raw.githubusercontent.com/influxdata/community-templates/master/docker/docker.yml
```
{{% /note %}}
<a class="btn" href="https://github.com/influxdata/community-templates/" target="\_blank">View InfluxDB Community Templates</a>
## View a template summary
To view a summary of what's included in a template before applying the template,
use the [`influx template` command](/influxdb/cloud/reference/cli/influx/template/).
View a summary of a template stored in your local filesystem or from a URL.
{{% code-tabs-wrapper %}}
{{% code-tabs %}}
[From a file](#)
[From a URL](#)
{{% /code-tabs %}}
{{% code-tab-content %}}
```sh
# Syntax
influx template -f <template-file-path>
# Example
influx template -f /path/to/template.yml
```
{{% /code-tab-content %}}
{{% code-tab-content %}}
```sh
# Syntax
influx template -u <template-url>
# Example
influx template -u https://raw.githubusercontent.com/influxdata/community-templates/master/linux_system/linux_system.yml
```
{{% /code-tab-content %}}
{{% /code-tabs-wrapper %}}
## Validate a template
To validate a template before you install it or troubleshoot a template, use
the [`influx template validate` command](/influxdb/cloud/reference/cli/influx/template/validate/).
Validate a template stored in your local filesystem or from a URL.
{{% code-tabs-wrapper %}}
{{% code-tabs %}}
[From a file](#)
[From a URL](#)
{{% /code-tabs %}}
{{% code-tab-content %}}
```sh
# Syntax
influx template validate -f <template-file-path>
# Example
influx template validate -f /path/to/template.yml
```
{{% /code-tab-content %}}
{{% code-tab-content %}}
```sh
# Syntax
influx template validate -u <template-url>
# Example
influx template validate -u https://raw.githubusercontent.com/influxdata/community-templates/master/linux_system/linux_system.yml
```
{{% /code-tab-content %}}
{{% /code-tabs-wrapper %}}
## Apply templates
Use the [`influx apply` command](/influxdb/cloud/reference/cli/influx/apply/) to install templates
from your local filesystem or from URLs.
- [Apply a template from a file](#apply-a-template-from-a-file)
- [Apply all templates in a directory](#apply-all-templates-in-a-directory)
- [Apply a template from a URL](#apply-a-template-from-a-url)
- [Apply templates from both files and URLs](#apply-templates-from-both-files-and-urls)
- [Define environment references](#define-environment-references)
- [Include a secret when installing a template](#include-a-secret-when-installing-a-template)
{{% note %}}
#### Apply templates to an existing stack
To apply a template to an existing stack, include the stack ID when applying the template.
Any time you apply a template without a stack ID, InfluxDB initializes a new stack
and all new resources.
For more information, see [InfluxDB stacks](/influxdb/cloud/influxdb-templates/stacks/).
{{% /note %}}
### Apply a template from a file
To install templates stored on your local machine, use the `-f` or `--file` flag
to provide the **file path** of the template manifest.
```sh
# Syntax
influx apply -o <org-name> -f <template-file-path>
# Examples
# Apply a single template
influx apply -o example-org -f /path/to/template.yml
# Apply multiple templates
influx apply -o example-org \
-f /path/to/this/template.yml \
-f /path/to/that/template.yml
```
### Apply all templates in a directory
To apply all templates in a directory, use the `-f` or `--file` flag to provide
the **directory path** of the directory where template manifests are stored.
By default, this only applies templates stored in the specified directory.
To apply all templates stored in the specified directory and its subdirectories,
include the `-R`, `--recurse` flag.
```sh
# Syntax
influx apply -o <org-name> -f <template-directory-path>
# Examples
# Apply all templates in a directory
influx apply -o example-org -f /path/to/template/dir/
# Apply all templates in a directory and its subdirectories
influx apply -o example-org -f /path/to/template/dir/ -R
```
### Apply a template from a URL
To apply templates from a URL, use the `-u` or `--template-url` flag to provide the URL
of the template manifest.
```sh
# Syntax
influx apply -o <org-name> -u <template-url>
# Examples
# Apply a single template from a URL
influx apply -o example-org -u https://example.com/templates/template.yml
# Apply multiple templates from URLs
influx apply -o example-org \
-u https://example.com/templates/template1.yml \
-u https://example.com/templates/template2.yml
```
### Apply templates from both files and URLs
To apply templates from both files and URLs in a single command, include multiple
file or directory paths and URLs, each with the appropriate `-f` or `-u` flag.
```sh
# Syntax
influx apply -o <org-name> -u <template-url> -f <template-path>
# Example
influx apply -o example-org \
-u https://example.com/templates/template1.yml \
-u https://example.com/templates/template2.yml \
-f ~/templates/custom-template.yml \
-f ~/templates/iot/home/ \
--recurse
```
### Define environment references
Some templates include [environment references](/influxdb/cloud/influxdb-templates/create/#include-user-definable-resource-names) that let you provide custom resource names.
The `influx apply` command prompts you to provide a value for each environment
reference in the template.
You can also provide values for environment references by including an `--env-ref`
flag with a key-value pair comprised of the environment reference key and the
value to replace it.
```sh
influx apply -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
```
### Include a secret when installing a template
Some templates use [secrets](/influxdb/cloud/security/secrets/) in queries.
Secret values are not included in templates.
To define secret values when installing a template, include the `--secret` flag
with the secret key-value pair.
```sh
# Syntax
influx apply -o <org-name> -f <template-file-path> \
--secret=<secret-key>=<secret-value>
# Examples
# Define a single secret when applying a template
influx apply -o example-org -f /path/to/template.yml \
--secret=FOO=BAR
# Define multiple secrets when applying a template
influx apply -o example-org -f /path/to/template.yml \
--secret=FOO=bar \
--secret=BAZ=quz
```
_To add a secret after applying a template, see [Add secrets](/influxdb/cloud/security/secrets/manage-secrets/add/)._

View File

@ -0,0 +1,38 @@
---
title: Monitor data and send alerts
seotitle: Monitor data and send alerts
description: >
Monitor your time series data and send alerts by creating checks, notification
rules, and notification endpoints. Or use community templates to monitor supported environments.
menu:
influxdb_cloud:
name: Monitor & alert
weight: 6
influxdb/cloud/tags: [monitor, alert, checks, notification, endpoints]
---
Monitor your time series data and send alerts by creating checks, notification
rules, and notification endpoints. Or use [community templates to monitor](/influxdb/cloud/monitor-alert/templates/) supported environments.
## Overview
1. A [check](/influxdb/cloud/reference/glossary/#check) in InfluxDB queries data and assigns a status with a `_level` based on specific conditions.
2. InfluxDB stores the output of a check in the `statuses` measurement in the `_monitoring` system bucket.
3. [Notification rules](/influxdb/cloud/reference/glossary/#notification-rule) check data in the `statuses`
measurement and, based on conditions set in the notification rule, send a message
to a [notification endpoint](/influxdb/cloud/reference/glossary/#notification-endpoint).
4. InfluxDB stores notifications in the `notifications` measurement in the `_monitoring` system bucket.
## Create an alert
To get started, do the following:
1. [Create checks](/influxdb/cloud/monitor-alert/checks/create/) to monitor data and assign a status.
2. [Add notification endpoints](/influxdb/cloud/monitor-alert/notification-endpoints/create/)
to send notifications to third parties.
3. [Create notification rules](/influxdb/cloud/monitor-alert/notification-rules/create) to check
statuses and send notifications to your notifications endpoints.
## Manage your monitoring and alerting pipeline
{{< children >}}

View File

@ -0,0 +1,19 @@
---
title: Manage checks
seotitle: Manage monitoring checks in InfluxDB
description: >
Checks in InfluxDB query data and apply a status or level to each data point based on specified conditions.
menu:
influxdb_cloud:
parent: Monitor & alert
weight: 101
influxdb/cloud/tags: [monitor, checks, notifications, alert]
related:
- /influxdb/cloud/monitor-alert/notification-rules/
- /influxdb/cloud/monitor-alert/notification-endpoints/
---
Checks in InfluxDB query data and apply a status or level to each data point based on specified conditions.
Learn how to create and manage checks:
{{< children >}}

View File

@ -0,0 +1,152 @@
---
title: Create checks
seotitle: Create monitoring checks in InfluxDB
description: >
Create a check in the InfluxDB UI.
menu:
influxdb_cloud:
parent: Manage checks
weight: 201
related:
- /influxdb/cloud/monitor-alert/notification-rules/
- /influxdb/cloud/monitor-alert/notification-endpoints/
---
Create a check in the InfluxDB user interface (UI).
Checks query data and apply a status to each point based on specified conditions.
## Parts of a check
A check consists of two parts a query and check configuration.
#### Check query
- Specifies the dataset to monitor.
- May include tags to narrow results.
#### Check configuration
- Defines check properties, including the check interval and status message.
- Evaluates specified conditions and applies a status (if applicable) to each data point:
- `crit`
- `warn`
- `info`
- `ok`
- Stores status in the `_level` column.
## Check types
There are two types of checks a threshold check and a deadman check.
#### Threshold check
A threshold check assigns a status based on a value being above, below,
inside, or outside of defined thresholds.
#### Deadman check
A deadman check assigns a status to data when a series or group doesn't report
in a specified amount of time.
## Create a check in the InfluxDB UI
1. In the navigation menu on the left, select **Alerts**.
{{< nav-icon "alerts" >}}
2. Click **{{< icon "plus" >}} Create** and select the [type of check](#check-types) to create.
3. Click **Name this check** in the top left corner and provide a unique name for the check.
#### Configure the check query
1. Select the **bucket**, **measurement**, **field** and **tag sets** to query.
2. If creating a threshold check, select an **aggregate function**.
Aggregate functions aggregate data between the specified check intervals and
return a single value for the check to process.
In the **Aggregate functions** column, select an interval from the interval drop-down list
(for example, "Every 5 minutes") and an aggregate function from the list of functions.
3. Click **Submit** to run the query and preview the results.
To see the raw query results, click the **{{< icon "toggle" >}} View Raw Data** toggle.
#### Configure the check
1. Click **2. Configure Check** near the top of the window.
2. In the **Properties** column, configure the following:
##### Schedule Every
Select the interval to run the check (for example, "Every 5 minutes").
This interval matches the aggregate function interval for the check query.
_Changing the interval here will update the aggregate function interval._
##### Offset
Delay the execution of a task to account for any late data.
Offset queries do not change the queried time range.
{{% note %}}Your offset must be shorter than your [check interval](#schedule-every).
{{% /note %}}
##### Tags
Add custom tags to the query output.
Each custom tag appends a new column to each row in the query output.
The column label is the tag key and the column value is the tag value.
Use custom tags to associate additional metadata with the check.
Common metadata tags across different checks lets you easily group and organize checks.
You can also use custom tags in [notification rules](/influxdb/cloud/monitor-alert/notification-rules/create/).
3. In the **Status Message Template** column, enter the status message template for the check.
Use [Flux string interpolation](/influxdb/cloud/reference/flux/language/string-interpolation/)
to populate the message with data from the query.
{{% note %}}
#### Flux only interpolates string values
Flux currently interpolates only string values.
Use the [string() function](/influxdb/cloud/reference/flux/stdlib/built-in/transformations/type-conversions/string/)
to convert non-string values to strings.
```js
count = 12
"I currently have ${string(v: count)} cats."
```
{{% /note %}}
Check data is represented as a record, `r`.
Access specific column values using dot notation: `r.columnName`.
Use data from the following columns:
- columns included in the query output
- [custom tags](#tags) added to the query output
- `_check_id`
- `_check_name`
- `_level`
- `_source_measurement`
- `_type`
###### Example status message template
```
From ${r._check_name}:
${r._field} is ${r._level}.
Its value is ${string(v: r.field_name)}.
```
When a check generates a status, it stores the message in the `_message` column.
4. Define check conditions that assign statuses to points.
Condition options depend on your check type.
##### Configure a threshold check
1. In the **Thresholds** column, click the status name (CRIT, WARN, INFO, or OK)
to define conditions for that specific status.
2. From the **When value** drop-down list, select a threshold: is above, is below,
is inside of, is outside of.
3. Enter a value or values for the threshold.
You can also use the threshold sliders in the data visualization to define threshold values.
##### Configure a deadman check
1. In the **Deadman** column, enter a duration for the deadman check in the **for** field.
For example, `90s`, `5m`, `2h30m`, etc.
2. Use the **set status to** drop-down list to select a status to set on a dead series.
3. In the **And stop checking after** field, enter the time to stop monitoring the series.
For example, `30m`, `2h`, `3h15m`, etc.
5. Click the green **{{< icon "check" >}}** in the top right corner to save the check.
## Clone a check
Create a new check by cloning an existing check.
1. In the **Checks** column, hover over the check you want to clone.
2. Click the **{{< icon "clone" >}}** icon, then **Clone**.

View File

@ -0,0 +1,34 @@
---
title: Delete checks
seotitle: Delete monitoring checks in InfluxDB
description: >
Delete checks in the InfluxDB UI.
menu:
influxdb_cloud:
parent: Manage checks
weight: 204
related:
- /influxdb/cloud/monitor-alert/notification-rules/
- /influxdb/cloud/monitor-alert/notification-endpoints/
---
If you no longer need a check, use the InfluxDB user interface (UI) to delete it.
{{% warn %}}
Deleting a check cannot be undone.
{{% /warn %}}
1. In the navigation menu on the left, select **Alerts**.
{{< nav-icon "alerts" >}}
2. Hover over the check you want to delete, click the **{{< icon "delete" >}}**
icon, and then **Delete**.
After a check is deleted, all statuses generated by the check remain in the `_monitoring`
bucket until the retention period for the bucket expires.
{{% note %}}
You can also [disable a check](/influxdb/cloud/monitor-alert/checks/update/#enable-or-disable-a-check)
without having to delete it.
{{% /note %}}

View File

@ -0,0 +1,60 @@
---
title: Update checks
seotitle: Update monitoring checks in InfluxDB
description: >
Update, rename, enable or disable checks in the InfluxDB UI.
menu:
influxdb_cloud:
parent: Manage checks
weight: 203
related:
- /influxdb/cloud/monitor-alert/notification-rules/
- /influxdb/cloud/monitor-alert/notification-endpoints/
---
Update checks in the InfluxDB user interface (UI).
Common updates include:
- [Update check queries and logic](#update-check-queries-and-logic)
- [Enable or disable a check](#enable-or-disable-a-check)
- [Rename a check](#rename-a-check)
- [Add or update a check description](#add-or-update-a-check-description)
- [Add a label to a check](#add-a-label-to-a-check)
To update checks, select **Alerts** in the navigation menu on the left.
{{< nav-icon "alerts" >}}
## Update check queries and logic
1. Click the name of the check you want to update. The check builder appears.
2. To edit the check query, click **1. Define Query** at the top of the check builder window.
3. To edit the check logic, click **2. Configure Check** at the top of the check builder window.
_For details about using the check builder, see [Create checks](/influxdb/cloud/monitor-alert/checks/create/)._
## Enable or disable a check
Click the {{< icon "toggle" >}} toggle next to a check to enable or disable it.
## Rename a check
1. Hover over the name of the check you want to update.
2. Click the **{{< icon "edit" >}}** icon that appears next to the check name.
2. Enter a new name and click out of the name field or press enter to save.
_You can also rename a check in the [check builder](#update-check-queries-and-logic)._
## Add or update a check description
1. Hover over the check description you want to update.
2. Click the **{{< icon "edit" >}}** icon that appears next to the description.
2. Enter a new description and click out of the name field or press enter to save.
## Add a label to a check
1. Click **Add a label** next to the check you want to add a label to.
The **Add Labels** box opens.
2. To add an existing label, select the label from the list.
3. To create and add a new label:
- In the search field, enter the name of the new label. The **Create Label** box opens.
- In the **Description** field, enter an optional description for the label.
- Select a color for the label.
- Click **Create Label**.
4. To remove a label, hover over the label under to a rule and click **{{< icon "x" >}}**.

View File

@ -0,0 +1,43 @@
---
title: View checks
seotitle: View monitoring checks in InfluxDB
description: >
View check details and statuses and notifications generated by checks in the InfluxDB UI.
menu:
influxdb_cloud:
parent: Manage checks
weight: 202
related:
- /influxdb/cloud/monitor-alert/notification-rules/
- /influxdb/cloud/monitor-alert/notification-endpoints/
---
View check details and statuses and notifications generated by checks in the InfluxDB user interface (UI).
- [View a list of all checks](#view-a-list-of-all-checks)
- [View check details](#view-check-details)
- [View statuses generated by a check](#view-statuses-generated-by-a-check)
- [View notifications triggered by a check](#view-notifications-triggered-by-a-check)
To view checks, click **Alerts** in navigation menu on the left.
{{< nav-icon "alerts" >}}
## View a list of all checks
The **Checks** section of the Alerts landing page displays all existing checks.
## View check details
Click the name of the check you want to view.
The check builder appears.
Here you can view the check query and logic.
## View statuses generated by a check
1. Hover over the check and click the **{{< icon "view" >}}** icon.
2. Click **View History**.
The Statuses History page displays statuses generated by the selected check.
## View notifications triggered by a check
1. Hover over the check, click the **{{< icon "view" >}}**
icon, then **View History**.
2. In the top left corner, click **Notifications**.
The Notifications History page displays notifications initiated by the selected check.

View File

@ -0,0 +1,102 @@
---
title: Create custom checks
seotitle: Custom checks
description: >
Create custom checks with a Flux task.
menu:
influxdb_cloud:
parent: Monitor & alert
weight: 201
v2.0/tags: [alerts, checks, tasks, Flux]
---
In the UI, you can create two kinds of [checks](/influxdb/cloud/reference/glossary/#check):
[`threshold`](/influxdb/cloud/monitor-alert/checks/create/#threshold-check) and
[`deadman`](/influxdb/cloud/monitor-alert/checks/create/#deadman-check).
Using a Flux task, you can create a custom check that provides a couple advantages:
- Customize and transform the data you would like to use for the check.
- Set up custom criteria for your alert (other than `threshold` and `deadman`).
## Create a task
1. In the InfluxDB UI, select **Tasks** in the navigation menu on the left.
{{< nav-icon "tasks" >}}
2. Click **{{< icon "plus" >}} Create Task**, and then select **New Task**.
3. In the **Name** field, enter a descriptive name,
and then enter how often to run the task in the **Every** field (for example, `10m`).
For more detail, such as using cron syntax or including an offset, see [Task configuration options](/influxdb/cloud/process-data/task-options/).
4. Enter the Flux script for your custom check, including the [`monitor.check`](/influxdb/cloud/reference/flux/stdlib/monitor/check/) function.
{{% note %}}
Use the the API endpoint `/checks/{checkID}/query` to see the Flux code for a check built in the UI.
This can be useful for constructing custom checks.
{{% /note %}}
### Example: Monitor failed tasks
The script below is fairly complex, and can be used as a framework for similar tasks.
It does the following:
- Import the necessary `influxdata/influxdb/monitor` package, and other packages for data processing.
- Query the `_tasks` bucket to retrieve all statuses generated by your check.
- Set the `_level` to alert on, for example, `crit`, `warn`, `info`, or `ok`.
- Create a `check` object that specifies an ID, name, and type for the check.
- Define the `ok` and `crit` statuses.
- Execute the `monitor` function on the `check` using the `task_data`.
#### Example alert task script
```js
import "strings"
import "regexp"
import "influxdata/influxdb/monitor"
import "influxdata/influxdb/v1"
option task = {name: "Failed Tasks Check", every: 1h, offset: 4m}
task_data = from(bucket: "_tasks")
|> range(start: -task.every)
|> filter(fn: (r) =>
(r["_measurement"] == "runs"))
|> filter(fn: (r) =>
(r["_field"] == "logs"))
|> map(fn: (r) => ({ r with name: strings.split(v: regexp.findString(r: /option task = \{([^\}]+)/, v: r._value), t: "\\\\\\\"")[1] }))
|> drop(columns: ["_value", "_start", "_stop"])
|> group(columns: ["name", "taskID", "status", "_measurement"])
|> map(fn: (r) =>
({r with _value: if r.status == "failed" then 1 else 0}))
|> last()
check = {
_check_id: "0000000000000001", // 16 characters, alphanumeric
_check_name: "Failed Tasks Check", // string
_type: "custom", // can also use "threashold" or "deadman"
tags: {},
}
ok = (r) =>
(r["logs"] == 0)
crit = (r) =>
(r["logs"] == 1)
messageFn = (r) =>
("The task: ${r.taskID} - ${r.name} has a status of ${r.status}")
task_data
|> v1["fieldsAsCols"]()
|> monitor["check"](
data: check,
messageFn: messageFn,
ok: ok,
crit: crit,
)
```
{{% note %}}
Creating a custom check does not send a notification email.
For information on how to create notification emails, see
[Create notification endpoints](/influxdb/cloud/monitor-alert/notification-endpoints/create),
[Create notification rules](/influxdb/cloud/monitor-alert/notification-rules/create),
and [Send alert email](/influxdb/cloud/monitor-alert/send-email/)
{{% /note %}}

View File

@ -0,0 +1,20 @@
---
title: Manage notification endpoints
list_title: Manage notification endpoints
description: >
Create, read, update, and delete endpoints in the InfluxDB UI.
influxdb/cloud/tags: [monitor, endpoints, notifications, alert]
menu:
influxdb_cloud:
parent: Monitor & alert
weight: 102
related:
- /influxdb/cloud/monitor-alert/checks/
- /influxdb/cloud/monitor-alert/notification-rules/
---
Notification endpoints store information to connect to a third party service.
If you're using the Free Plan, create a Slack endpoint.
If you're using the Usage-based Plan, create a connection to a HTTP, Slack, or PagerDuty endpoint.
{{< children >}}

View File

@ -0,0 +1,45 @@
---
title: Create notification endpoints
description: >
Create notification endpoints to send alerts on your time series data.
menu:
influxdb_cloud:
name: Create endpoints
parent: Manage notification endpoints
weight: 201
related:
- /influxdb/cloud/monitor-alert/checks/
- /influxdb/cloud/monitor-alert/notification-rules/
---
To send notifications about changes in your data, start by creating a notification endpoint to a third party service. After creating notification endpoints, [create notification rules](/influxdb/cloud/monitor-alert/notification-rules/create) to send alerts to third party services on [check statuses](/influxdb/cloud/monitor-alert/checks/create).
## Create a notification endpoint in the UI
1. In the navigation menu on the left, select **Alerts**.
{{< nav-icon "alerts" >}}
2. Select **Notification Endpoints** near to top of the page.
3. Click **{{< icon "plus" >}} Create**.
4. From the **Destination** drop-down list, select a destination endpoint to send notifications.
The following endpoints are available for the InfluxDB Cloud Free Plan and Usage-based Plan:
| Endpoint | Free Plan | Usage-based Plan |
|:-------- |:-------------------: |:----------------------------:|
| **Slack** | **{{< icon "check" >}}** | **{{< icon "check" >}}** |
| **PagerDuty** | | **{{< icon "check" >}}** |
| **HTTP** | | **{{< icon "check" >}}** |
5. In the **Name** and **Description** fields, enter a name and description for the endpoint.
6. Enter enter information to connect to the endpoint:
- For HTTP, enter the **URL** to send the notification. Select the **auth method** to use: **None** for no authentication. To authenticate with a username and password, select **Basic** and then enter credentials in the **Username** and **Password** fields. To authenticate with a token, select **Bearer**, and then enter the authentication token in the **Token** field.
- For Slack, create an [Incoming WebHook](https://api.slack.com/incoming-webhooks#posting_with_webhooks) in Slack, and then enter your webHook URL in the **Slack Incoming WebHook URL** field.
- For PagerDuty:
- [Create a new service](https://support.pagerduty.com/docs/services-and-integrations#section-create-a-new-service), [add an integration for your service](https://support.pagerduty.com/docs/services-and-integrations#section-add-integrations-to-an-existing-service), and then enter the PagerDuty integration key for your new service in the **Routing Key** field.
- The **Client URL** provides a useful link in your PagerDuty notification. Enter any URL that you'd like to use to investigate issues. This URL is sent as the `client_url` property in the PagerDuty trigger event. By default, the **Client URL** is set to your Monitoring & Alerting History page, and the following included in the PagerDuty trigger event: `"client_url": "https://us-west-2-1.aws.cloud2.influxdata.net/orgs/<your-org-ID>/alert-history”`
6. Click **Create Notification Endpoint**.

View File

@ -0,0 +1,26 @@
---
title: Delete notification endpoints
description: >
Delete a notification endpoint in the InfluxDB UI.
menu:
influxdb_cloud:
name: Delete endpoints
parent: Manage notification endpoints
weight: 204
related:
- /influxdb/cloud/monitor-alert/checks/
- /influxdb/cloud/monitor-alert/notification-rules/
---
If notifications are no longer sent to an endpoint, complete the steps below to delete the endpoint, and then [update notification rules](/influxdb/cloud/monitor-alert/notification-rules/update) with a new notification endpoint as needed.
## Delete a notification endpoint in the UI
1. In the navigation menu on the left, select **Alerts**.
{{< nav-icon "alerts" >}}
2. Select **Notification Endpoints** near to top of the page.
find the rule you want to delete.
3. Hover over the endpoint you want to delete and click the **{{< icon "trash" >}}** icon.
4. Click **Delete** to confirm.

View File

@ -0,0 +1,66 @@
---
title: Update notification endpoints
description: >
Update notification endpoints in the InfluxDB UI.
menu:
influxdb_cloud:
name: Update endpoints
parent: Manage notification endpoints
weight: 203
related:
- /influxdb/cloud/monitor-alert/checks/
- /influxdb/cloud/monitor-alert/notification-rules/
---
To update the notification endpoint details, complete the procedures below as needed. To update the notification endpoint selected for a notification rule, see [update notification rules](/influxdb/cloud/monitor-alert/notification-rules/update/).
## Add a label to notification endpoint
1. In the navigation menu on the left, select **Alerts**.
{{< nav-icon "alerts" >}}
2. Select **Notification Endpoints** near to top of the page.
3. Click **{{< icon "add-label" >}} Add a label** next to the endpoint you want to add a label to.
The **Add Labels** box opens.
4. To add an existing label, select the label from the list.
5. To create and add a new label:
- In the search field, enter the name of the new label. The **Create Label** box opens.
- In the **Description** field, enter an optional description for the label.
- Select a color for the label.
- Click **Create Label**.
6. To remove a label, hover over the label under an endpoint and click X.
## Disable notification endpoint
1. In the navigation menu on the left, select **Alerts**.
{{< nav-icon "alerts" >}}
2. Select **Notification Endpoints** near to top of the page.
3. Click the {{< icon "toggle" >}} toggle to disable the notification endpoint.
## Update the name or description for notification endpoint
1. In the navigation menu on the left, select **Alerts**.
{{< nav-icon "alerts" >}}
2. Select **Notification Endpoints** near to top of the page.
3. Hover over the name or description of the endpoint and click the pencil icon
(**{{< icon "edit" >}}**) to edit the field.
4. Click outside of the field to save your changes.
## Change endpoint details
1. In the navigation menu on the left, select **Alerts**.
{{< nav-icon "alerts" >}}
2. Select **Notification Endpoints** near to top of the page.
3. Click the endpoint to update.
4. Update details as needed, and then click **Edit Notification Endpoint**.
For details about each field, see [Create notification endpoints](/influxdb/cloud/monitor-alert/notification-endpoints/create/).

View File

@ -0,0 +1,51 @@
---
title: View notification endpoint history
seotitle: View notification endpoint details and history
description: >
View notification endpoint details and history in the InfluxDB UI.
menu:
influxdb_cloud:
name: View endpoint history
parent: Manage notification endpoints
weight: 202
related:
- /influxdb/cloud/monitor-alert/checks/
- /influxdb/cloud/monitor-alert/notification-rules/
---
View notification endpoint details and history in the InfluxDB user interface (UI).
- [View notification endpoints](#view-notification-endpoints)
- [View notification endpoint details](#view-notification-endpoint-details)
- [View history notification endpoint history](#view-notification-endpoint-history), including statues and notifications sent to the endpoint
## View notification endpoints
1. In the navigation menu on the left, select **Alerts**.
{{< nav-icon "alerts" >}}
2. Select **Notification Endpoints** near to top of the page.
## View notification endpoint details
1. In the navigation menu on the left, select **Alerts**.
{{< nav-icon "alerts" >}}
2. Select **Notification Endpoints** near to top of the page.
3. Click the name of the notification endpoint you want to view.
4. View the notification endpoint destination, name, and information to connect to the endpoint.
## View notification endpoint history
1. In the navigation menu on the left, select **Alerts**.
{{< nav-icon "alerts" >}}
2. Select **Notification Endpoints** near to top of the page.
3. Hover over the notification endpoint, click the **{{< icon "view" >}}** icon, then **View History**.
The Check Statuses History page displays:
- Statuses generated for the selected notification endpoint
- Notifications sent to the selected notification endpoint

View File

@ -0,0 +1,17 @@
---
title: Manage notification rules
description: >
Manage notification rules in InfluxDB.
weight: 103
influxdb/cloud/tags: [monitor, notifications, alert]
menu:
influxdb_cloud:
parent: Monitor & alert
related:
- /influxdb/cloud/monitor-alert/checks/
- /influxdb/cloud/monitor-alert/notification-endpoints/
---
The following articles provide information on managing your notification rules:
{{< children >}}

View File

@ -0,0 +1,44 @@
---
title: Create notification rules
description: >
Create notification rules to send alerts on your time series data.
weight: 201
menu:
influxdb_cloud:
parent: Manage notification rules
related:
- /influxdb/cloud/monitor-alert/checks/
- /influxdb/cloud/monitor-alert/notification-endpoints/
---
Once you've set up checks and notification endpoints, create notification rules to alert you.
_For details, see [Manage checks](/influxdb/cloud/monitor-alert/checks/) and
[Manage notification endpoints](/influxdb/cloud/monitor-alert/notification-endpoints/)._
## Create a new notification rule in the UI
1. In the navigation menu on the left, select **Alerts**.
{{< nav-icon "alerts" >}}
2. Select **Notification Rules** near to top of the page.
3. Click **{{< icon "plus" >}} Create**.
4. Complete the **About** section:
1. In the **Name** field, enter a name for the notification rule.
2. In the **Schedule Every** field, enter how frequently the rule should run.
3. In the **Offset** field, enter an offset time. For example,if a task runs on the hour, a 10m offset delays the task to 10 minutes after the hour. Time ranges defined in the task are relative to the specified execution time.
5. In the **Conditions** section, build a condition using a combination of status and tag keys.
- Next to **When status is equal to**, select a status from the drop-down field.
- Next to **AND When**, enter one or more tag key-value pairs to filter by.
6. In the **Message** section, select an endpoint to notify.
7. Click **Create Notification Rule**.
## Clone an existing notification rule in the UI
1. 1. In the navigation menu on the left, select **Alerts**.
{{< nav-icon "alerts" >}}
2. Select **Notification Rules** near to top of the page.
3. Hover over the rule you want to clone and click the **{{< icon "clone" >}}** icon and select **Clone**.
The cloned rule appears.

View File

@ -0,0 +1,22 @@
---
title: Delete notification rules
description: >
If you no longer need to receive an alert, delete the associated notification rule.
weight: 204
menu:
influxdb_cloud:
parent: Manage notification rules
related:
- /influxdb/cloud/monitor-alert/checks/
- /influxdb/cloud/monitor-alert/notification-endpoints/
---
## Delete a notification rule in the UI
1. In the navigation menu on the left, select **Alerts**.
{{< nav-icon "alerts" >}}
2. Select **Notification Rules** near to top of the page.
3. Hover over the rule you want to delete and click the **{{< icon "trash" >}}** icon.
4. Click **Delete** to confirm.

View File

@ -0,0 +1,50 @@
---
title: Update notification rules
description: >
Update notification rules to update the notification message or change the schedule or conditions.
weight: 203
menu:
influxdb_cloud:
parent: Manage notification rules
related:
- /influxdb/cloud/monitor-alert/checks/
- /influxdb/cloud/monitor-alert/notification-endpoints/
---
## Add a label to notification rules
1. In the navigation menu on the left, select **Alerts**.
{{< nav-icon "alerts" >}}
2. Select **Notification Rules** near to top of the page.
3. Click **{{< icon "add-label" >}} Add a label** next to the rule you want to add a label to.
The **Add Labels** box opens.
4. To add an existing label, select the label from the list.
5. To create and add a new label:
- In the search field, enter the name of the new label. The **Create Label** box opens.
- In the **Description** field, enter an optional description for the label.
- Select a color for the label.
- Click **Create Label**.
6. To remove a label, hover over the label under to a rule and click **{{< icon "x" >}}**.
## Disable notification rules
1. In the navigation menu on the left, select **Alerts**.
{{< nav-icon "alerts" >}}
2. Select **Notification Rules** near to top of the page.
3. Click the {{< icon "toggle" >}} toggle to disable the notification rule.
## Update the name or description for notification rules
1. In the navigation menu on the left, select **Alerts**.
{{< nav-icon "alerts" >}}
2. Select **Notification Rules** near to top of the page.
3. Hover over the name or description of a rule and click the pencil icon
(**{{< icon "edit" >}}**) to edit the field.
4. Click outside of the field to save your changes.

View File

@ -0,0 +1,45 @@
---
title: View notification rules
description: >
Update notification rules to update the notification message or change the schedule or conditions.
weight: 202
menu:
influxdb_cloud:
parent: Manage notification rules
related:
- /influxdb/cloud/monitor-alert/checks/
- /influxdb/cloud/monitor-alert/notification-endpoints/
---
View notification rule details and statuses and notifications generated by notification rules in the InfluxDB user interface (UI).
- [View a list of all notification rules](#view-a-list-of-all-notification-rules)
- [View notification rule details](#view-notification-rule-details)
- [View statuses generated by a check](#view-statuses-generated-by-a-notification-rule)
- [View notifications triggered by a notification rule](#view-notifications-triggered-by-a-notification-rule)
**To view notification rules:**
1. In the navigation menu on the left, select **Alerts**.
{{< nav-icon "alerts" >}}
2. Select **Notification Rules** near to top of the page.
## View a list of all notification rules
The **Notification Rules** section of the Alerts landing page displays all existing checks.
## View notification rule details
Click the name of the check you want to view.
The check builder appears.
Here you can view the check query and logic.
## View statuses generated by a notification rule
Hover over the check, click the **{{< icon "view" >}}** icon, and then **View History**.
The Statuses History page displays statuses generated by the selected check.
## View notifications triggered by a notification rule
1. Hover over the notification rule, click the **{{< icon "view" >}}**
icon, and then **View History**.
2. In the top left corner, click **Notifications**.
The Notifications History page displays notifications initiated by the selected notification rule.

View File

@ -0,0 +1,235 @@
---
title: Send alert email
description: >
Send an alert email.
menu:
influxdb_cloud:
parent: Monitor & alert
weight: 104
influxdb/cloud/tags: [alert, email, notifications, check]
related:
- /influxdb/cloud/monitor-alert/checks/
---
Send an alert email using a third party service, such as [SendGrid](https://sendgrid.com/), [Amazon Simple Email Service (SES)](https://aws.amazon.com/ses/), [Mailjet](https://www.mailjet.com/), or [Mailgun](https://www.mailgun.com/). To send an alert email, complete the following steps:
1. [Create a check](/influxdb/cloud/monitor-alert/checks/create/#create-a-check-in-the-influxdb-ui) to identify the data to monitor and the status to alert on.
2. Set up your preferred email service (sign up, retrieve API credentials, and send test email):
- **SendGrid**: See [Getting Started With the SendGrid API](https://sendgrid.com/docs/API_Reference/api_getting_started.html)
- **AWS Simple Email Service (SES)**: See [Using the Amazon SES API](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email.html). Your AWS SES request, including the `url` (endpoint), authentication, and the structure of the request may vary. For more information, see [Amazon SES API requests](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/using-ses-api-requests.html) and [Authenticating requests to the Amazon SES API](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/using-ses-api-authentication.html).
- **Mailjet**: See [Getting Started with Mailjet](https://dev.mailjet.com/email/guides/getting-started/)
- **Mailgun**: See [Mailgun Signup](https://signup.mailgun.com/new/signup)
3. [Create an alert email task](#create-an-alert-email-task) to call your email service and send an alert email.
{{% note %}}
In the procedure below, we use the **Task** page in the InfluxDB UI (user interface) to create a task. Explore other ways to [create a task](/influxdb/cloud/process-data/manage-tasks/create-task/).
{{% /note %}}
### Create an alert email task
1. In the InfluxDB UI, select **Tasks** in the navigation menu on the left.
{{< nav-icon "tasks" >}}
2. Click **{{< icon "plus" >}} Create Task**, and then select **New Task**.
3. In the **Name** field, enter a descriptive name, for example, **Send alert email**, and then enter how often to run the task in the **Every** field, for example, `10m`. For more detail, such as using cron syntax or including an offset, see [Task configuration options](/influxdb/cloud/process-data/task-options/).
4. In the right panel, enter the following detail in your **task script** (see [examples below](#examples)):
- Import the [Flux HTTP package](/influxdb/cloud/reference/flux/stdlib/http/).
- (Optional) Store your API key as a secret for reuse. First, [add your API key as a secret](/influxdb/cloud/security/secrets/manage-secrets/add/), and then import the [Flux InfluxDB Secrets package](/influxdb/cloud/reference/flux/stdlib/secrets/).
- Query the `statuses` measurement in the `_monitoring` bucket to retrieve all statuses generated by your check.
- Set the time range to monitor; use the same interval that the task is scheduled to run. For example, `range (start: -task.every)`.
- Set the `_level` to alert on, for example, `crit`, `warn`, `info`, or `ok`.
- Use the `map()` function to evaluate the criteria to send an alert using `http.post()`.
- Specify your email service `url` (endpoint), include applicable request `headers`, and verify your request `data` format follows the format specified for your email service.
#### Examples
{{< tabs-wrapper >}}
{{% tabs %}}
[SendGrid](#)
[AWS SES](#)
[Mailjet](#)
[Mailgun](#)
{{% /tabs %}}
<!-------------------------------- BEGIN SendGrid -------------------------------->
{{% tab-content %}}
The example below uses the SendGrid API to send an alert email when more than 3 critical statuses occur since the previous task run.
```js
import "http"
// Import the Secrets package if you store your API key as a secret.
// For detail on how to do this, see Step 4 above.
import "influxdata/influxdb/secrets"
// Retrieve the secret if applicable. Otherwise, skip this line
// and add the API key as the Bearer token in the Authorization header.
SENDGRID_APIKEY = secrets.get(key: "SENDGRID_APIKEY")
numberOfCrits = from(bucket: "_monitoring")
|> range(start: -task.every)
|> filter(fn: (r) => r.measurement == "statuses" and r.level == "crit")
|> count()
numberOfCrits
|> map(fn: (r) => (if r._value > 3 then {
r with _value: http.post(
url: "https://api.sendgrid.com/v3/mail/send",
headers: {"Content-Type": "application/json", Authorization: "Bearer ${SENDGRID_APIKEY}"},
data: bytes(v: "{
\"personalizations\": [{
\"to\": [{
\"email\": \”jane.doe@example.com\"}],
\"subject\": \”InfluxData critical alert\"
}],
\"from\": {\"email\": \"john.doe@example.com\"},
\"content\": [{
\"type\": \"text/plain\",
\"value\": \”Example alert text\"
}]
}\""))} else {r with _value: 0}))
```
{{% /tab-content %}}
<!-------------------------------- BEGIN AWS SES -------------------------------->
{{% tab-content %}}
The example below uses the AWS SES API v2 to send an alert email when more than 3 critical statuses occur since the last task run.
{{% note %}}
Your AWS SES request, including the `url` (endpoint), authentication, and the structure of the request may vary. For more information, see [Amazon SES API requests](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/using-ses-api-requests.html) and [Authenticating requests to the Amazon SES API](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/using-ses-api-authentication.html). We recommend signing your AWS API requests using the [Signature Version 4 signing process](https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html).
{{% /note %}}
```js
import "http"
// Import the Secrets package if you store your API credentials as secrets.
// For detail on how to do this, see Step 4 above.
import "influxdata/influxdb/secrets"
// Retrieve the secrets if applicable. Otherwise, skip this line
// and add the API key as the Bearer token in the Authorization header.
AWS_AUTH_ALGORITHM = secrets.get(key: "AWS_AUTH_ALGORITHM")
AWS_CREDENTIAL = secrets.get(key: "AWS_CREDENTIAL")
AWS_SIGNED_HEADERS = secrets.get(key: "AWS_SIGNED_HEADERS")
AWS_CALCULATED_SIGNATURE = secrets.get(key: "AWS_CALCULATED_SIGNATURE")
numberOfCrits = from(bucket: "_monitoring")
|> range(start: -task.every)
|> filter(fn: (r) => (r.measurement == "statuses" and r._level == "crit")
|> count()
numberOfCrits
|> map(fn: (r) => (if r._value > 3 then {
r with _value: http.post(
url: "https://email.your-aws-region.amazonaws.com/sendemail/v2/email/outbound-emails",
headers: {"Content-Type": "application/json", Authorization: "Bearer ${AWS_AUTH_ALGORITHM}${AWS_CREDENTIAL}${AWS_SIGNED_HEADERS}${AWS_CALCULATED_SIGNATURE}"},
data: bytes(v: "{
\"personalizations\": [{
\"to\": [{
\"email\": \”jane.doe@example.com\"}],
\"subject\": \”InfluxData critical alert\"
}],
\"from\": {\"email\": \"john.doe@example.com\"},
\"content\": [{
\"type\": \"text/plain\",
\"value\": \”Example alert text\"
}]
}\""))} else {r with _value: 0}))
```
For details on the request syntax, see [SendEmail API v2 reference](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_SendEmail.html).
{{% /tab-content %}}
<!-------------------------------- BEGIN Mailjet ------------------------------->
{{% tab-content %}}
The example below uses the Mailjet Send API to send an alert email when more than 3 critical statuses occur since the last task run.
{{% note %}}
To view your Mailjet API credentials, sign in to Mailjet and open the [API Key Management page](https://app.mailjet.com/account/api_keys).
{{% /note %}}
```js
import "http"
// Import the Secrets package if you store your API keys as secrets.
// For detail on how to do this, see Step 4 above.
import "influxdata/influxdb/secrets"
// Retrieve the secrets if applicable. Otherwise, skip this line
// and add the API keys as Basic credentials in the Authorization header.
MAILJET_APIKEY = secrets.get(key: "MAILJET_APIKEY")
MAILJET_SECRET_APIKEY = secrets.get(key: "MAILJET_SECRET_APIKEY")
numberOfCrits = from(bucket: "_monitoring")
|> range(start: -task.every)
|> filter(fn: (r) => (r.measurement == "statuses" and "r.level" == "crit")
|> count()
numberOfCrits
|> map(fn: (r) => (if r._value > 3 then {
r with _value: http.post(
url: "https://api.mailjet.com/v3.1/send",
headers: {"Content-type": "application/json", Authorization: "Basic ${MAILJET_APIKEY}:${MAILJET_SECRET_APIKEY}"},
data: bytes(v: "{
\"Messages\": [{
\"From\": {\"Email\": \”jane.doe@example.com\"},
\"To\": [{\"Email\": \"john.doe@example.com\"]},
\"Subject\": \”InfluxData critical alert\",
\"TextPart\": \”Example alert text\"
\"HTMLPart\": `"<h3>Hello, to review critical alerts, review your <a href=\"https://www.example-dashboard.com/\">Critical Alert Dashboard</a></h3>}]}'
}\""))} else {r with _value: 0}))
```
{{% /tab-content %}}
<!-------------------------------- BEGIN Mailgun ---------------------------->
{{% tab-content %}}
The example below uses the Mailgun API to send an alert email when more than 3 critical statuses occur since the last task run.
{{% note %}}
To view your Mailgun API keys, sign in to Mailjet and open [Account Security - API security](https://app.mailgun.com/app/account/security/api_keys). Mailgun requires that a domain be specified via Mailgun. A domain is automatically created for you when you first set up your account. You must include this domain in your `url` endpoint (for example, `https://api.mailgun.net/v3/YOUR_DOMAIN` or `https://api.eu.mailgun.net/v3/YOUR_DOMAIN`. If you're using a free version of Mailgun, you can set up a maximum of five authorized recipients (to receive email alerts) for your domain. To view your Mailgun domains, sign in to Mailgun and view the [Domains page](https://app.mailgun.com/app/sending/domains).
{{% /note %}}
```js
import "http"
// Import the Secrets package if you store your API key as a secret.
// For detail on how to do this, see Step 4 above.
import "influxdata/influxdb/secrets"
// Retrieve the secret if applicable. Otherwise, skip this line
// and add the API key as the Bearer token in the Authorization header.
MAILGUN_APIKEY = secrets.get(key: "MAILGUN_APIKEY")
numberOfCrits = from(bucket: "_monitoring")
|> range(start: -task.every)
|> filter(fn: (r) => (r["_measurement"] == "statuses"))
|> filter(fn: (r) => (r["_level"] == "crit"))
|> count()
numberOfCrits
|> map(fn: (r) =>
(if r._value > 1 then {r with _value: http.post(
url: "https://api.mailgun.net/v3/YOUR_DOMAIN/messages",
headers: {"Content-type": "application/json", Authorization: "Basic api:${MAILGUN_APIKEY}"},
data: bytes(v: "{
\"from\": \"Username <mailgun@YOUR_DOMAIN_NAME>\",
\"to\"=\"YOU@YOUR_DOMAIN_NAME\",
\"to\"=\"email@example.com\",
\"subject\"=\"Critical InfluxData alert\",
\"text\"=\"You have critical alerts to review\"
}\""))} else {r with _value: 0}))
```
{{% /tab-content %}}
{{< /tabs-wrapper >}}

View File

@ -0,0 +1,14 @@
---
title: Monitor with templates
description: >
Use community templates to monitor data in many supported environments. Monitor infrastructure, networking, IoT, software, security, TICK stack, and more.
menu:
influxdb_cloud:
parent: Monitor & alert
weight: 104
influxdb/cloud/tags: [monitor, templates]
---
Use one of our community templates to quickly set up InfluxDB (with a bucket and dashboard) to collect, analyze, and monitor data in supported environments.
{{< children >}}

View File

@ -0,0 +1,14 @@
---
title: Monitor infrastructure
description: >
Use one of our community templates to quickly set up InfluxDB (with a bucket and dashboard) to collect, analyze, and monitor your infrastructure.
menu:
influxdb_cloud:
parent: Monitor with templates
weight: 104
influxdb/cloud/tags: [monitor, templates, infrastructure]
---
Use one of our community templates to quickly set up InfluxDB (with a bucket and dashboard) to collect, analyze, and monitor your infrastructure.
{{< children >}}

View File

@ -0,0 +1,57 @@
---
title: Monitor Amazon Web Services (AWS)
description: >
Use the AWS CloudWatch Monitoring template to monitor data from Amazon Web Services (AWS), Amazon Elastic Compute Cloud (EC2), and Amazon Elastic Load Balancing (ELB) with the AWS CloudWatch Service.
menu:
influxdb_cloud:
parent: Monitor infrastructure
name: AWS CloudWatch
weight: 201
---
Use the [AWS CloudWatch Monitoring template](https://github.com/influxdata/community-templates/tree/master/aws_cloudwatch) to monitor data from [Amazon Web Services (AWS)](https://aws.amazon.com/), [Amazon Elastic Compute Cloud (EC2)](https://aws.amazon.com/ec2/), and [Amazon Elastic Load Balancing (ELB)](https://aws.amazon.com/elasticloadbalancing/) with the [AWS CloudWatch Service](https://aws.amazon.com/cloudwatch/).
The AWS CloudWatch Monitoring template includes the following:
- two [dashboards](/influxdb/cloud/reference/glossary/#dashboard):
- **AWS CloudWatch NLB (Network Load Balancers) Monitoring**: Displays data from the `cloudwatch_aws_network_elb measurement`
- **AWS CloudWatch Instance Monitoring**: Displays data from the `cloudwatch_aws_ec2` measurement
- two [buckets](/influxdb/cloud/reference/glossary/#bucket): `kubernetes` and `cloudwatch`
- two labels: `inputs.cloudwatch`, `AWS`
- one variable: `v.bucket`
- one [Telegraf configuration](/influxdb/cloud/telegraf-configs/): [AWS CloudWatch input plugin](/{{< latest "telegraf" >}}/plugins//#cloudwatch)
## Apply the template
1. Use the [`influx` CLI](/influxdb/cloud/reference/cli/influx/) to run the following command:
```sh
influx apply -f https://raw.githubusercontent.com/influxdata/community-templates/master/aws_cloudwatch/aws_cloudwatch.yml
```
For more information, see [influx apply](/influxdb/cloud/reference/cli/influx/apply/).
2. [Install Telegraf](/{{< latest "telegraf" >}}/introduction/installation/) on a server with network access to both the CloudWatch API and [InfluxDB v2 API](/influxdb/cloud/reference/api/).
3. In your Telegraf configuration file (`telegraf.conf`), find the following example `influxdb_v2` output plugins, and then **replace** the `urls` to specify the servers to monitor:
```sh
## k8s
[[outputs.influxdb_v2]]
urls = ["http://influxdb.monitoring:9999"]
organization = "InfluxData"
bucket = "kubernetes"
token = "secret-token"
## cloudv2 sample
[[outputs.influxdb_v2]]
urls = ["$INFLUX_HOST"]
token = "$INFLUX_TOKEN"
organization = "$INFLUX_ORG"
bucket = “cloudwatch"
```
4. [Start Telegraf](/influxdb/cloud/write-data/no-code/use-telegraf/auto-config/#start-telegraf).
## View the incoming data
1. In the InfluxDB user interface (UI), select **Boards** (**Dashboards**).
{{< nav-icon "dashboards" >}}
2. Open your AWS dashboards, and then set the `v.bucket` variable to specify the bucket to query data from (`kubernetes` or `cloudwatch`).

View File

@ -0,0 +1,54 @@
---
title: Monitor Docker
description: >
Use the [Docker Monitoring template](https://github.com/influxdata/community-templates/tree/master/docker) to monitor your Docker containers.
menu:
influxdb_cloud:
parent: Monitor infrastructure
name: Docker
weight: 202
---
Use the [Docker Monitoring template](https://github.com/influxdata/community-templates/tree/master/docker) to monitor your Docker containers. First, [apply the template](#apply-the-template), and then [view incoming data](#view-incoming-data).
This template uses the [Docker input plugin](/{{< latest "telegraf" >}}/plugins//#docker) to collect metrics stored in InfluxDB and display these metrics in a dashboard.
The Docker Monitoring template includes the following:
- one [dashboard](/influxdb/cloud/reference/glossary/#dashboard): **Docker**
- one [bucket](/influxdb/cloud/reference/glossary/#bucket): `docker, 7d retention`
- labels: Docker input plugin labels
- one [Telegraf configuration](/influxdb/cloud/telegraf-configs/): Docker input plugin
- one variable: `bucket`
- four [checks](/influxdb/cloud/reference/glossary/#check): `Container cpu`, `mem`, `disk`, `non-zero exit`
- one [notification endpoint](/influxdb/cloud/reference/glossary/#notification-endpoint): `Http Post`
- one [notification rule](/influxdb/cloud/reference/glossary/#notification-rule): `Crit Alert`
For more information about how checks, notification endpoints, and notifications rules work together, see [monitor data and send alerts](/influxdb/cloud/monitor-alert/).
## Apply the template
1. Use the [`influx` CLI](/influxdb/cloud/reference/cli/influx/) to run the following command:
```sh
influx apply -f https://raw.githubusercontent.com/influxdata/community-templates/master/docker/docker.yml
```
For more information, see [influx apply](/influxdb/cloud/reference/cli/influx/apply/).
> **Note:** Ensure your `influx` CLI is configured with your account credentials and that configuration is active. For more information, see [influx config](/influxdb/cloud/reference/cli/influx/config/).
2. [Install Telegraf](/{{< latest "telegraf" >}}/introduction/installation/) on a server with network access to both the Docker containers and [InfluxDB v2 API](/influxdb/cloud/reference/api/).
3. In your [Telegraf configuration file (`telegraf.conf`)](/influxdb/cloud/telegraf-configs/), do the following:
- Depending on how you run Docker, you may need to customize the [Docker input plugin](/{{< latest "telegraf" >}}/plugins//#docker) configuration, for example, you may need to specify the `endpoint` value.
- Set the following environment variables:
- INFLUX_TOKEN: Token must have permissions to read Telegraf configurations and write data to the `telegraf` bucket. See how to [view tokens](/influxdb/cloud/security/tokens/view-tokens/).
- INFLUX_ORG: Name of your organization. See how to [view your organization](/influxdb/cloud/organizations/view-orgs/).
- INFLUX_HOST: Your InfluxDB host URL, for example, localhost, a remote instance, or InfluxDB Cloud.
4. [Start Telegraf](/influxdb/cloud/write-data/no-code/use-telegraf/auto-config/#start-telegraf).
## View incoming data
1. In the InfluxDB user interface (UI), select **Boards** (**Dashboards**).
{{< nav-icon "dashboards" >}}
2. Open the **Docker** dashboard to start monitoring.

View File

@ -0,0 +1,55 @@
---
title: Monitor vSphere
description: >
Use the [vSphere Dashboard for InfluxDB v2 template](https://github.com/influxdata/community-templates/tree/master/vsphere) to monitor your vSphere host.
menu:
influxdb_cloud:
parent: Monitor infrastructure
name: vSphere
weight: 206
---
Use the [vSphere Dashboard for InfluxDB v2 template](https://github.com/influxdata/community-templates/tree/master/vsphere) to monitor your vSphere host. First, [apply the template](#apply-the-template), and then [view incoming data](#view-incoming-data).
This template uses the [Docker input plugin](/{{< latest "telegraf" >}}/plugins//#docker) to collect metrics stored in InfluxDB and display these metrics in a dashboard.
The Docker Monitoring template includes the following:
- one [dashboard](/influxdb/cloud/reference/glossary/#dashboard): **vsphere**
- one [bucket](/influxdb/cloud/reference/glossary/#bucket): `vsphere`
- label: vsphere
- one [Telegraf configuration](/influxdb/cloud/telegraf-configs/): InfluxDB v2 output plugin, vSphere input plugin
- one variable: `bucket`
## Apply the template
1. Use the [`influx` CLI](/influxdb/cloud/reference/cli/influx/) to run the following command:
```sh
influx apply -f https://raw.githubusercontent.com/influxdata/community-templates/master/vsphere/vsphere.yml
```
For more information, see [influx apply](/influxdb/cloud/reference/cli/influx/apply/).
> **Note:** Ensure your `influx` CLI is configured with your account credentials and that configuration is active. For more information, see [influx config](/influxdb/cloud/reference/cli/influx/config/).
2. [Install Telegraf](/{{< latest "telegraf" >}}/introduction/installation/) on a server with network access to both the vSphere host and [InfluxDB v2 API](/influxdb/cloud/reference/api/).
3. In your [Telegraf configuration file (`telegraf.conf`)](/influxdb/cloud/telegraf-configs/), do the following:
- Set the following environment variables:
- INFLUX_TOKEN: Token must have permissions to read Telegraf configurations and write data to the `telegraf` bucket. See how to [view tokens](/influxdb/cloud/security/tokens/view-tokens/).
- INFLUX_ORG: Name of your organization. See how to [view your organization](/influxdb/cloud/organizations/view-orgs/).
- INFLUX_HOST: Your InfluxDB host URL, for example, localhost, a remote instance, or InfluxDB Cloud.
- INFLUX_BUCKET: Bucket to store data in. To use the bucket included, you must export the variable: `export INFLUX_BUCKET=vsphere`
4. - Set the host address to the vSphere and provide the `username` and `password` as variables:
```sh
vcenters = [ "https://$VSPHERE_HOST/sdk" ]
username = "$vsphere-user"
password = "$vsphere-password"
```
4. [Start Telegraf](/influxdb/cloud/write-data/no-code/use-telegraf/auto-config/#start-telegraf).
## View incoming data
1. In the InfluxDB user interface (UI), select **Boards** (**Dashboards**).
{{< nav-icon "dashboards" >}}
2. Open the **vsphere** dashboard to start monitoring.

View File

@ -0,0 +1,52 @@
---
title: Monitor Windows
description: >
Use the [Windows System Monitoring template](https://github.com/influxdata/community-templates/tree/master/windows_system) to monitor your Windows system.
menu:
influxdb_cloud:
parent: Monitor infrastructure
name: Windows
weight: 207
---
Use the [Windows System Monitoring template](https://github.com/influxdata/community-templates/tree/master/windows_system) to monitor your Windows system. First, [apply the template](#apply-the-template), and then [view incoming data](#view-incoming-data).
The Windows System Monitoring template includes the following:
- one [dashboard](/influxdb/cloud/reference/glossary/#dashboard): **Windows System**
- one [bucket](/influxdb/cloud/reference/glossary/#bucket): `telegraf`, 7d retention
- label: `Windows System Template`, Telegraf plugin labels: `outputs.influxdb_v2`
- one [Telegraf configuration](/influxdb/cloud/telegraf-configs/): InfluxDB v2 output plugin, Windows Performance Counters input plugin
- two variables: `bucket`, `windows_host`
## Apply the template
1. Use the [`influx` CLI](/influxdb/cloud/reference/cli/influx/) to run the following command:
```sh
influx apply -f https://raw.githubusercontent.com/influxdata/community-templates/master/windows_system/windows_system.yml
```
For more information, see [influx apply](/influxdb/cloud/reference/cli/influx/apply/).
> **Note:** Ensure your `influx` CLI is configured with your account credentials and that configuration is active. For more information, see [influx config](/influxdb/cloud/reference/cli/influx/config/).
2. [Install Telegraf](/{{< latest "telegraf" >}}/introduction/installation/) on a server with network access to both the Windows system and [InfluxDB v2 API](/influxdb/cloud/reference/api/).
3. In your [Telegraf configuration file (`telegraf.conf`)](/influxdb/cloud/telegraf-configs/), do the following:
- Set the following environment variables:
- INFLUX_TOKEN: Token must have permissions to read Telegraf configurations and write data to the `telegraf` bucket. See how to [view tokens](/influxdb/cloud/security/tokens/view-tokens/).
- INFLUX_ORG: Name of your organization. See how to [view your organization](/influxdb/cloud/organizations/view-orgs/).
- INFLUX_URL: Your InfluxDB host URL, for example, localhost, a remote instance, or InfluxDB Cloud.
4. [Start Telegraf](/influxdb/cloud/write-data/no-code/use-telegraf/auto-config/#start-telegraf).
5. To monitor multiple Windows systems, repeat steps 1-4 for each system.
## View incoming data
1. In the InfluxDB user interface (UI), select **Boards** (**Dashboards**).
{{< nav-icon "dashboards" >}}
2. Open the **Windows System** dashboard to start monitoring.
{{% note %}}
If you're monitoring multiple Windows machines, switch between them using the `windows_host` filter at the top of the dashboard.
{{% /note %}}

View File

@ -0,0 +1,14 @@
---
title: Monitor networks
description: >
Use one of our community templates to quickly set up InfluxDB (with a bucket and dashboard) to collect, analyze, and monitor your networks.
menu:
influxdb_cloud:
parent: Monitor with templates
weight: 104
influxdb/cloud/tags: [monitor, templates, networks, networking]
---
Use one of our community templates to quickly set up InfluxDB (with a bucket and dashboard) to collect, analyze, and monitor your networks.
{{< children >}}

View File

@ -0,0 +1,48 @@
---
title: Monitor HAProxy
description: >
Use the [HAProxy for InfluxDB v2 template](https://github.com/influxdata/community-templates/tree/master/haproxy) to monitor your HAProxy instance.
menu:
influxdb_cloud:
parent: Monitor networks
name: HAproxy
weight: 201
---
Use the [HAProxy for InfluxDB v2 template](https://github.com/influxdata/community-templates/tree/master/haproxy) to monitor your HAProxy instances. First, [apply the template](#apply-the-template), and then [view incoming data](#view-incoming-data).
This template uses the [HAProxy input plugin](/{{< latest "telegraf" >}}/plugins//#haproxy) to collect metrics stored in an HAProxy instance and display these metrics in a dashboard.
The HAProxy for InfluxDB v2 template includes the following:
- one [dashboard](/influxdb/cloud/reference/glossary/#dashboard): **HAProxy**
- one [bucket](/influxdb/cloud/reference/glossary/#bucket): `haproxy`
- label: `haproxy`
- one [Telegraf configuration](/influxdb/cloud/telegraf-configs/): HAProxy input plugin, InfluxDB v2 output plugin
- one variable: `bucket`
## Apply the template
1. Use the [`influx` CLI](/influxdb/cloud/reference/cli/influx/) to run the following command:
```sh
influx apply -f https://raw.githubusercontent.com/influxdata/community-templates/master/haproxy/haproxy.yml
```
For more information, see [influx apply](/influxdb/cloud/reference/cli/influx/apply/).
> **Note:** Ensure your `influx` CLI is configured with your account credentials and that configuration is active. For more information, see [influx config](/influxdb/cloud/reference/cli/influx/config/).
2. [Install Telegraf](/{{< latest "telegraf" >}}/introduction/installation/) on a server with network access to both the HAProxy instances and [InfluxDB v2 API](/influxdb/cloud/reference/api/).
3. In your [Telegraf configuration file (`telegraf.conf`)](/influxdb/cloud/telegraf-configs/), do the following:
- Set the following environment variables:
- INFLUX_TOKEN: Token must have permissions to read Telegraf configurations and write data to the `haproxy` bucket. See how to [view tokens](/influxdb/cloud/security/tokens/view-tokens/).
- INFLUX_ORG: Name of your organization. See how to [view your organization](/influxdb/cloud/organizations/view-orgs/).
- INFLUX_HOST: Your InfluxDB host URL, for example, localhost, a remote instance, or InfluxDB Cloud.
4. [Start Telegraf](/influxdb/cloud/write-data/no-code/use-telegraf/auto-config/#start-telegraf).
## View incoming data
1. In the InfluxDB user interface (UI), select **Boards** (**Dashboards**).
{{< nav-icon "dashboards" >}}
2. Open the **HAProxy** dashboard to start monitoring.

View File

@ -0,0 +1,22 @@
---
title: Manage organizations
seotitle: Manage organizations in InfluxDB
description: Manage organizations in InfluxDB using the InfluxDB UI or the influx CLI.
menu:
influxdb_cloud:
name: Manage organizations
weight: 10
influxdb/cloud/tags: [organizations]
---
An **organization** is a workspace for a group of users.
All dashboards, tasks, buckets, members, etc., belong to an organization.
{{% cloud %}}
You cannot currently create additional organizations in {{< cloud-name >}}.
Only the default organization is available.
{{% /cloud %}}
The following articles provide information about managing organizations:
{{< children >}}

View File

@ -0,0 +1,19 @@
---
title: Manage buckets
seotitle: Manage buckets in InfluxDB
description: Manage buckets in InfluxDB using the InfluxDB UI or the influx CLI.
menu:
influxdb_cloud:
name: Manage buckets
parent: Manage organizations
weight: 105
influxdb/cloud/tags: [buckets]
---
A **bucket** is a named location where time series data is stored.
All buckets have a **retention policy**, a duration of time that each data point persists.
A bucket belongs to an organization.
The following articles provide information about managing buckets:
{{< children >}}

View File

@ -0,0 +1,68 @@
---
title: Create a bucket
seotitle: Create a bucket in InfluxDB
description: Create buckets to store time series data in InfluxDB using the InfluxDB UI or the influx CLI.
menu:
influxdb_cloud:
name: Create a bucket
parent: Manage buckets
weight: 201
---
Use the InfluxDB user interface (UI) or the `influx` command line interface (CLI)
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" >}}
2. Click **{{< icon "plus" >}} Create Bucket** in the upper right.
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 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](/influxdb/cloud/reference/cli/influx/bucket/create)
to create a new bucket. A bucket requires the following:
- bucket name
- organization name or ID
- retention period (duration to keep data) in one of the following units:
- nanoseconds (`ns`)
- microseconds (`us` or `µs`)
- milliseconds (`ms`)
- seconds (`s`)
- minutes (`m`)
- hours (`h`)
- days (`d`)
- weeks (`w`)
```sh
# Syntax
influx bucket create -n <bucket-name> -o <org-name> -r <retention-period-duration>
# Example
influx bucket create -n my-bucket -o my-org -r 72h
```

View File

@ -0,0 +1,56 @@
---
title: Delete a bucket
seotitle: Delete a bucket from InfluxDB
description: Delete a bucket from InfluxDB using the InfluxDB UI or the influx CLI
menu:
influxdb_cloud:
name: Delete a bucket
parent: Manage buckets
weight: 203
---
Use the InfluxDB user interface (UI) or the `influx` command line interface (CLI)
to delete a bucket.
## Delete a bucket in the InfluxDB UI
1. In the navigation menu on the left, select **Data (Load Data)** > **Buckets**.
{{< nav-icon "data" >}}
2. Hover over the bucket you would like to delete.
3. Click **{{< icon "delete" >}} Delete Bucket** and **Confirm** to delete the bucket.
## Delete a bucket using the influx CLI
Use the [`influx bucket delete` command](/influxdb/cloud/reference/cli/influx/bucket/delete)
to delete a bucket a bucket by name or ID.
### Delete a bucket by name
**To delete a bucket by name, you need:**
- Bucket name
- Bucket's organization name or ID
<!-- -->
```sh
# Syntax
influx bucket delete -n <bucket-name> -o <org-name>
# Example
influx bucket delete -n my-bucket -o my-org
```
### Delete a bucket by ID
**To delete a bucket by ID, you need:**
- Bucket ID _(provided in the output of `influx bucket list`)_
<!-- -->
```sh
# Syntax
influx bucket delete -i <bucket-id>
# Example
influx bucket delete -i 034ad714fdd6f000
```

View File

@ -0,0 +1,73 @@
---
title: Update a bucket
seotitle: Update a bucket in InfluxDB
description: Update a bucket's name or retention policy in InfluxDB using the InfluxDB UI or the influx CLI.
menu:
influxdb_cloud:
name: Update a bucket
parent: Manage buckets
weight: 202
---
Use the `influx` command line interface (CLI) or the InfluxDB user interface (UI) to update a bucket.
Note that updating an bucket's name will affect any assets that reference the bucket by name, including the following:
- Queries
- Dashboards
- Tasks
- Telegraf configurations
- Templates
If you change a bucket name, be sure to update the bucket in the above places as well.
## Update a bucket's name in the InfluxDB UI
1. In the navigation menu on the left, select **Data (Load Data)** > **Buckets**.
{{< nav-icon "data" >}}
2. Click **Settings** under the bucket you want to rename.
3. Click **Rename**.
3. Review the information in the window that appears and click **I understand, let's rename my bucket**.
4. Update the bucket's name and click **Change Bucket Name**.
## Update a bucket's retention policy in the InfluxDB UI
1. In the navigation menu on the left, select **Data (Load Data)** > **Buckets**.
{{< nav-icon "data" >}}
2. Click **Settings** next to the bucket you want to update.
3. In the window that appears, edit the bucket's retention policy.
4. Click **Save Changes**.
## Update a bucket using the influx CLI
Use the [`influx bucket update` command](/influxdb/cloud/reference/cli/influx/bucket/update)
to update a bucket. Updating a bucket requires the following:
- The bucket ID _(provided in the output of `influx bucket list`)_
- The name or ID of the organization the bucket belongs to.
##### Update the name of a bucket
```sh
# Syntax
influx bucket update -i <bucket-id> -o <org-name> -n <new-bucket-name>
# Example
influx bucket update -i 034ad714fdd6f000 -o my-org -n my-new-bucket
```
##### Update a bucket's retention policy
Valid retention policy duration units are nanoseconds (`ns`), microseconds (`us` or `µs`), milliseconds (`ms`), seconds (`s`), minutes (`m`), hours (`h`), days (`d`), or weeks (`w`).
```sh
# Syntax
influx bucket update -i <bucket-id> -r <retention period in nanoseconds>
# Example
influx bucket update -i 034ad714fdd6f000 -r 1209600000000000
```

View File

@ -0,0 +1,34 @@
---
title: View buckets
seotitle: View buckets in InfluxDB
description: View a list of all the buckets for an organization in InfluxDB using the InfluxDB UI or the influx CLI.
menu:
influxdb_cloud:
name: View buckets
parent: Manage buckets
weight: 202
---
## View buckets in the InfluxDB UI
1. In the navigation menu on the left, select **Data (Load Data)** > **Buckets**.
{{< nav-icon "data" >}}
A list of buckets with their retention policies and IDs appears.
2. Click a bucket to open it in the **Data Explorer**.
3. Click the bucket ID to copy it to the clipboard.
## View buckets using the influx CLI
Use the [`influx bucket list` command](/influxdb/cloud/reference/cli/influx/bucket/list)
to view a buckets in an organization.
```sh
influx bucket list
```
Other filtering options such as filtering by a name or ID are available.
See the [`influx bucket list` documentation](/influxdb/cloud/reference/cli/influx/bucket/list)
for information about other available flags.

View File

@ -0,0 +1,16 @@
---
title: Manage organization members
seotitle: Manage members of an organization in InfluxDB
description: Manage members of an organization in InfluxDB using the InfluxDB UI or CLI.
menu:
influxdb_cloud:
name: Manage members
parent: Manage organizations
weight: 106
influxdb/cloud/tags: [members]
---
A **member** is a user that belongs to an organization.
The following articles provide information about managing users:
{{< children >}}

View File

@ -0,0 +1,40 @@
---
title: Add a member
seotitle: Add a member to an organization in InfluxDB
description: Add a member to an organization.
menu:
influxdb_cloud:
name: Add a member
parent: Manage members
weight: 201
---
Use the `influx` command line interface (CLI) to add a member to an organization.
{{% cloud %}}
To manage members of an organization in {{< cloud-name >}}, see [Manage multiple users](/influxdb/cloud/account-management/multi-user/).
{{% /cloud %}}
<!-- ## Add a member to an organization in the InfluxDB UI
1. In the navigation menu on the left, select **Org (Organization)** > **Members**.
{{< nav-icon "org" >}}
_Complete content coming soon_ -->
## Add a member to an organization using the influx CLI
1. Get a list of users and their IDs by running the following:
```sh
influx user list
```
2. To add a user to an organization, run the following command:
```sh
influx org members add -n <org-name> -m <user-ID>
```
For more information, see the [`influx org members add` command](/influxdb/cloud/reference/cli/influx/org/members/add).

View File

@ -0,0 +1,42 @@
---
title: Remove a member
seotitle: Remove a member from an organization in InfluxDB
description: Remove a member from an organization.
menu:
influxdb_cloud:
name: Remove a member
parent: Manage members
weight: 203
---
Use the InfluxDB user interface (UI) or the `influx` command line interface (CLI)
to remove a member from an organization.
{{% note %}}
Removing a member from an organization removes all permissions associated with the organization.
{{% /note %}}
## Remove a member from an organization in the InfluxDB UI
1. In the navigation menu on the left, select **Org (Organization)** > **Members**.
{{< nav-icon "org" >}}
2. Hover over the member you would like to delete and click the **{{< icon "delete" >}}** icon.
3. Click **Delete**.
## Remove a member from an organization using the influx CLI
Use the [`influx org members remove` command](/influxdb/cloud/reference/cli/influx/org/members/remove)
to remove a member from an organization. Removing a member requires the following:
- The organization name or ID _(provided in the output of [`influx org list`](/influxdb/cloud/reference/cli/influx/org/list/))_
- The member ID _(provided in the output of [`influx org members list`](/influxdb/cloud/reference/cli/influx/org/members/list/))_
```sh
# Syntax
influx org members remove -o <member-id> -i <organization-id>
# Example
influx org members remove -o 00xXx0x00xXX0000 -i x0xXXXx00x0x000X
```

View File

@ -0,0 +1,35 @@
---
title: View members
seotitle: View members of an organization in InfluxDB
description: Review a list of members for an organization.
menu:
influxdb_cloud:
name: View members
parent: Manage members
weight: 202
---
Use the InfluxDB user interface (UI) or the `influx` command line interface (CLI)
to view members of an organization.
## View members of organization in the InfluxDB UI
In the navigation menu on the left, select **Org (Organization)** > **Members**.
{{< nav-icon "org" >}}
## View members of organization using the influx CLI
Use the [`influx org members list` command](/influxdb/cloud/reference/cli/influx/org/members/list)
to list members of an organization. Listing an organization's members requires the following:
- The name or ID of the organization
```sh
# Syntax
influx org members list -n <org-name>
# Example
influx org members list -n my-org
```

View File

@ -0,0 +1,50 @@
---
title: Update an organization
seotitle: Update an organization in InfluxDB
description: Update an organization's name and assets in InfluxDB using the InfluxDB UI or the influx CLI.
menu:
influxdb_cloud:
name: Update an organization
parent: Manage organizations
weight: 103
---
Use the `influx` command line interface (CLI) or the InfluxDB user interface (UI) to update an organization.
Note that updating an organization's name will affect any assets that reference the organization by name, including the following:
- Queries
- Dashboards
- Tasks
- Telegraf configurations
- Templates
If you change an organization name, be sure to update the organization in the above places as well.
## Update an organization in the InfluxDB UI
1. In the navigation menu on the left, click the **Org (Organization)** > **About**.
{{< nav-icon "org" >}}
2. Click **{{< icon "edit" >}} Rename**.
3. In the window that appears, review the information and click **I understand, let's rename my organization**.
4. Enter a new name for your organization.
5. Click **Change organization name**.
## Update an organization using the influx CLI
Use the [`influx org update` command](/influxdb/cloud/reference/cli/influx/org/update)
to update an organization. Updating an organization requires the following:
- The org ID _(provided in the output of `influx org list`)_
##### Update the name of a organization
```sh
# Syntax
influx org update -i <org-id> -n <new-org-name>
# Example
influx org update -i 034ad714fdd6f000 -n my-new-org
```

View File

@ -0,0 +1,50 @@
---
title: View organization
seotitle: View organization in InfluxDB
description: Review a list of organizations in InfluxDB using the InfluxDB UI or the influx CLI.
menu:
influxdb_cloud:
name: View organizations
parent: Manage organizations
weight: 102
---
Use the InfluxDB user interface (UI) or the `influx` command line interface (CLI)
to view organizations.
## View organizations using the influx CLI
Use the [`influx org list` command](/influxdb/cloud/reference/cli/influx/org/list)
to view organizations.
```sh
influx org list
```
Filtering options such as filtering by name or ID are available.
See the [`influx org list` documentation](/influxdb/cloud/reference/cli/influx/org/list)
for information about other available flags.
## View your organization ID
Use the InfluxDB UI or `influx` CLI to view your organization ID.
### Organization ID in the UI
After logging in to the InfluxDB UI, your organization ID appears in the URL.
<pre class="highlight">
https://cloud2.influxdata.com/orgs/<span class="bp" style="font-weight:bold;margin:0 .15rem">03a2bbf46249a000</span>/...
</pre>
### Organization ID in the CLI
Use [`influx org list`](#view-organizations-using-the-influx-cli) to view your organization ID.
```sh
> influx org list
ID Name
03a2bbf46249a000 org-1
03ace3a859669000 org-2
```

View File

@ -0,0 +1,26 @@
---
title: Process Data with InfluxDB tasks
seotitle: Process Data with InfluxDB tasks
description: >
InfluxDB's task engine runs scheduled Flux tasks that process and analyze data.
This collection of articles provides information about creating and managing InfluxDB tasks.
menu:
influxdb_cloud:
name: Process data
weight: 4
influxdb/cloud/tags: [tasks]
---
Process and analyze your data with tasks in the InfluxDB **task engine**. Use tasks (scheduled Flux queries)
to input a data stream and then analyze, modify, and act on the data accordingly.
Discover how to create and manage tasks using the InfluxDB user interface (UI)
and the `influx` command line interface (CLI).
Find examples of data downsampling, anomaly detection _(Coming)_, alerting
_(Coming)_, and other common tasks.
{{% note %}}
Tasks replace InfluxDB v1.x continuous queries.
{{% /note %}}
{{< children >}}

View File

@ -0,0 +1,22 @@
---
title: Common data processing tasks
seotitle: Common data processing tasks performed with with InfluxDB
description: >
InfluxDB Tasks process data on specified schedules.
This collection of articles walks through common use cases for InfluxDB tasks.
influxdb/cloud/tags: [tasks]
menu:
influxdb_cloud:
name: Common tasks
parent: Process data
weight: 104
---
The following articles walk through common task use cases.
{{< children >}}
{{% note %}}
This list will continue to grow.
If you have suggestions, please [submit them to the InfluxData Community](https://community.influxdata.com/c/influxdb2).
{{% /note %}}

View File

@ -0,0 +1,80 @@
---
title: Downsample data with InfluxDB
seotitle: Downsample data in an InfluxDB task
description: >
How to create a task that downsamples data much like continuous queries
in previous versions of InfluxDB.
menu:
influxdb_cloud:
name: Downsample data
parent: Common tasks
weight: 201
influxdb/cloud/tags: [tasks]
---
One of the most common use cases for InfluxDB tasks is downsampling data to reduce
the overall disk usage as data collects over time.
In previous versions of InfluxDB, continuous queries filled this role.
This article walks through creating a continuous-query-like task that downsamples
data by aggregating data within windows of time, then storing the aggregate value in a new bucket.
### Requirements
To perform a downsampling task, you need to the following:
##### A "source" bucket
The bucket from which data is queried.
##### A "destination" bucket
A separate bucket where aggregated, downsampled data is stored.
##### Some type of aggregation
To downsample data, it must be aggregated in some way.
What specific method of aggregation you use depends on your specific use case,
but examples include mean, median, top, bottom, etc.
View [Flux's aggregate functions](/influxdb/cloud/reference/flux/stdlib/built-in/transformations/aggregates/)
for more information and ideas.
## Example downsampling task script
The example task script below is a very basic form of data downsampling that does the following:
1. Defines a task named "cq-mem-data-1w" that runs once a week.
2. Defines a `data` variable that represents all data from the last 2 weeks in the
`mem` measurement of the `system-data` bucket.
3. Uses the [`aggregateWindow()` function](/influxdb/cloud/reference/flux/stdlib/built-in/transformations/aggregates/aggregatewindow/)
to window the data into 1 hour intervals and calculate the average of each interval.
4. Stores the aggregated data in the `system-data-downsampled` bucket under the
`my-org` organization.
```js
// Task Options
option task = {
name: "cq-mem-data-1w",
every: 1w,
}
// Defines a data source
data = from(bucket: "system-data")
|> range(start: -duration(v: int(v: task.every) * 2))
|> filter(fn: (r) => r._measurement == "mem")
data
// Windows and aggregates the data in to 1h averages
|> aggregateWindow(fn: mean, every: 1h)
// Stores the aggregated data in a new bucket
|> to(bucket: "system-data-downsampled", org: "my-org")
```
Again, this is a very basic example, but it should provide you with a foundation
to build more complex downsampling tasks.
## Add your task
Once your task is ready, see [Create a task](/influxdb/cloud/process-data/manage-tasks/create-task) for information about adding it to InfluxDB.
## Things to consider
- If there is a chance that data may arrive late, specify an `offset` in your
task options long enough to account for late-data.
- If running a task against a bucket with a finite retention policy, do not schedule
tasks to run too closely to the end of the retention policy.
Always provide a "cushion" for downsampling tasks to complete before the data
is dropped by the retention policy.

View File

@ -0,0 +1,148 @@
---
title: Get started with InfluxDB tasks
list_title: Get started with tasks
description: >
Learn the basics of writing an InfluxDB task that processes data, and then performs an action,
such as storing the modified data in a new bucket or sending an alert.
aliases:
- /influxdb/cloud/process-data/write-a-task/
influxdb/cloud/tags: [tasks]
menu:
influxdb_cloud:
name: Get started with tasks
parent: Process data
weight: 101
---
An **InfluxDB task** is a scheduled Flux script that takes a stream of input data, modifies or analyzes
it in some way, then stores the modified data in a new bucket or performs other actions.
This article walks through writing a basic InfluxDB task that downsamples
data and stores it in a new bucket.
## Components of a task
Every InfluxDB task needs the following four components.
Their form and order can vary, but they are all essential parts of a task.
- [Task options](#define-task-options)
- [A data source](#define-a-data-source)
- [Data processing or transformation](#process-or-transform-your-data)
- [A destination](#define-a-destination)
_[Skip to the full example task script](#full-example-task-script)_
## Define task options
Task options define specific information about the task.
The example below illustrates how task options are defined in your Flux script:
```js
option task = {
name: "cqinterval15m",
every: 1h,
offset: 0m,
concurrency: 1,
retry: 5
}
```
_See [Task configuration options](/influxdb/cloud/process-data/task-options) for detailed information
about each option._
{{% note %}}
When creating a task in the InfluxDB user interface (UI), task options are defined in form fields.
{{% /note %}}
## Define a data source
Define a data source using Flux's [`from()` function](/influxdb/cloud/reference/flux/stdlib/built-in/inputs/from/)
or any other [Flux input functions](/influxdb/cloud/reference/flux/stdlib/built-in/inputs/).
For convenience, consider creating a variable that includes the sourced data with
the required time range and any relevant filters.
```js
data = from(bucket: "telegraf/default")
|> range(start: -task.every)
|> filter(fn: (r) =>
r._measurement == "mem" and
r.host == "myHost"
)
```
{{% note %}}
#### Using task options in your Flux script
Task options are passed as part of a `task` option record and can be referenced in your Flux script.
In the example above, the time range is defined as `-task.every`.
`task.every` is dot notation that references the `every` property of the `task` option record.
`every` is defined as `1h`, therefore `-task.every` equates to `-1h`.
Using task options to define values in your Flux script can make reusing your task easier.
{{% /note %}}
## Process or transform your data
The purpose of tasks is to process or transform data in some way.
What exactly happens and what form the output data takes is up to you and your
specific use case.
The example below illustrates a task that downsamples data by calculating the average of set intervals.
It uses the `data` variable defined [above](#define-a-data-source) as the data source.
It then windows the data into 5 minute intervals and calculates the average of each
window using the [`aggregateWindow()` function](/influxdb/cloud/reference/flux/stdlib/built-in/transformations/aggregates/aggregatewindow/).
```js
data
|> aggregateWindow(
every: 5m,
fn: mean
)
```
_See [Common tasks](/influxdb/cloud/process-data/common-tasks) for examples of tasks commonly used with InfluxDB._
## Define a destination
In the vast majority of task use cases, once data is transformed, it needs to be sent and stored somewhere.
This could be a separate bucket or another measurement.
The example below uses Flux's [`to()` function](/influxdb/cloud/reference/flux/stdlib/built-in/outputs/to)
to send the transformed data to another bucket:
```js
// ...
|> to(bucket: "telegraf_downsampled", org: "my-org")
```
{{% note %}}
In order to write data into InfluxDB, you must have `_time`, `_measurement`, `_field`, and `_value` columns.
{{% /note %}}
## Full example task script
Below is a task script that combines all of the components described above:
```js
// Task options
option task = {
name: "cqinterval15m",
every: 1h,
offset: 0m,
concurrency: 1,
retry: 5
}
// Data source
data = from(bucket: "telegraf/default")
|> range(start: -task.every)
|> filter(fn: (r) =>
r._measurement == "mem" and
r.host == "myHost"
)
data
// Data transformation
|> aggregateWindow(
every: 5m,
fn: mean
)
// Data destination
|> to(bucket: "telegraf_downsampled")
```

View File

@ -0,0 +1,20 @@
---
title: Manage tasks in InfluxDB
seotitle: Manage data processing tasks in InfluxDB
list_title: Manage tasks
description: >
InfluxDB provides options for creating, reading, updating, and deleting tasks
using both the `influx` CLI and the InfluxDB UI.
influxdb/cloud/tags: [tasks]
menu:
influxdb_cloud:
name: Manage tasks
parent: Process data
weight: 102
---
InfluxDB provides two options for managing the creation, reading, updating, and deletion (CRUD) of tasks -
through the InfluxDB user interface (UI) or using the `influx` command line interface (CLI).
Both tools can perform all task CRUD operations.
{{< children >}}

View File

@ -0,0 +1,113 @@
---
title: Create a task
seotitle: Create a task for processing data in InfluxDB
description: >
Create a data processing task in InfluxDB using the InfluxDB UI or the `influx` CLI.
menu:
influxdb_cloud:
name: Create a task
parent: Manage tasks
weight: 201
related:
- /influxdb/cloud/reference/cli/influx/task/create
---
InfluxDB provides multiple ways to create tasks both in the InfluxDB user interface (UI)
and the `influx` command line interface (CLI).
_Before creating a task, review the [basics criteria for writing a task](/influxdb/cloud/process-data/get-started)._
- [InfluxDB UI](#create-a-task-in-the-influxdb-ui)
- [`influx` CLI](#create-a-task-using-the-influx-cli)
## Create a task in the InfluxDB UI
The InfluxDB UI provides multiple ways to create a task:
- [Create a task from the Data Explorer](#create-a-task-from-the-data-explorer)
- [Create a task in the Task UI](#create-a-task-in-the-task-ui)
- [Import a task](#import-a-task)
- [Create a task from a template](#create-a-task-from-a-template)
- [Clone a task](#clone-a-task)
### Create a task from the Data Explorer
1. In the navigation menu on the left, select **Explore** (**Data Explorer**).
{{< nav-icon "data-explorer" >}}
2. Build a query and click **Save As** in the upper right.
3. Select the **Task** option.
4. Specify the task options. See [Task options](/influxdb/cloud/process-data/task-options)
for detailed information about each option.
5. Select a token to use from the **Token** dropdown.
6. Click **Save as Task**.
### Create a task in the Task UI
1. In the navigation menu on the left, select **Tasks**.
{{< nav-icon "tasks" >}}
2. Click **{{< icon "plus" >}} Create Task** in the upper right.
3. Select **New Task**.
4. In the left panel, specify the task options.
See [Task options](/influxdb/cloud/process-data/task-options) for detailed information about each option.
5. Select a token to use from the **Token** dropdown.
6. In the right panel, enter your task script.
7. Click **Save** in the upper right.
### Import a task
1. In the navigation menu on the left, select **Tasks**.
{{< nav-icon "tasks" >}}
2. Click **+ Create Task** in the upper right.
3. Select **Import Task**.
4. Upload a JSON task file using one of the following options:
- Drag and drop a JSON task file in the specified area.
- Click to upload and the area to select the JSON task from from your file manager.
- Select the **JSON** option and paste in raw task JSON.
5. Click **Import JSON as Task**.
### Create a task from a template
1. In the navigation menu on the left, select **Settings** > **Templates**.
{{< nav-icon "Settings" >}}
2. Select **Templates**.
3. Hover over the template to use to create the task and click **Create**.
### Clone a task
1. In the navigation menu on the left, select **Tasks**.
{{< nav-icon "tasks" >}}
2. Hover over the task you would like to clone and click the **{{< icon "duplicate" >}}** icon that appears.
4. Click **Clone**.
## Create a task using the influx CLI
Use `influx task create` command to create a new task.
It accepts either a file path or raw Flux.
###### Create a task using a file
```sh
# Syntax
influx task create --org <org-name> -f </path/to/task-script>
# Example
influx task create --org my-org -f /tasks/cq-mean-1h.flux
```
###### Create a task using raw Flux
```sh
influx task create --org my-org - # <return> to open stdin pipe
options task = {
name: "task-name",
every: 6h
}
# ... Task script ...
# <ctrl-d> to close the pipe and submit the command
```

View File

@ -0,0 +1,36 @@
---
title: Delete a task
seotitle: Delete a task for processing data in InfluxDB
description: >
Delete a task from InfluxDB using the InfluxDB UI or the `influx` CLI.
menu:
influxdb_cloud:
name: Delete a task
parent: Manage tasks
weight: 206
related:
- /influxdb/cloud/reference/cli/influx/task/delete
---
## Delete a task in the InfluxDB UI
1. In the navigation menu on the left, select **Tasks**.
{{< nav-icon "tasks" >}}
2. In the list of tasks, hover over the task you would like to delete.
3. Click **Delete** on the far right.
4. Click **Confirm**.
## Delete a task with the influx CLI
Use the `influx task delete` command to delete a task.
_This command requires a task ID, which is available in the output of `influx task list`._
```sh
# Syntax
influx task delete -i <task-id>
# Example
influx task delete -i 0343698431c35000
```

View File

@ -0,0 +1,26 @@
---
title: Export a task
seotitle: Export an InfluxDB task
description: Export a data processing task from InfluxDB using the InfluxDB UI.
menu:
influxdb_cloud:
name: Export a task
parent: Manage tasks
weight: 205
---
InfluxDB lets you export tasks from the InfluxDB user interface (UI).
Tasks are exported as downloadable JSON files.
## Export a task in the InfluxDB UI
1. In the navigation menu on the left, select **Tasks**.
{{< nav-icon "tasks" >}}
2. In the list of tasks, hover over the task you would like to export and click
the **{{< icon "gear" >}}** icon that appears.
3. Select **Export**.
4. Downloading or save the task export file using one of the following options:
- Click **Download JSON** to download the exported JSON file.
- Click **Save as template** to save the export file as a task template.
- Click **Copy to Clipboard** to copy the raw JSON content to your machine's clipboard.

View File

@ -0,0 +1,44 @@
---
title: Run a task
seotitle: Run an InfluxDB task
description: >
Run a data processing task using the InfluxDB UI or the `influx` CLI.
menu:
influxdb_cloud:
name: Run a task
parent: Manage tasks
weight: 203
related:
- /influxdb/cloud/reference/cli/influx/task/run
- /influxdb/cloud/reference/cli/influx/task/retry
---
InfluxDB data processing tasks generally run in defined intervals or at a specific time,
however, you can manually run a task from the InfluxDB user interface (UI) or the
`influx` command line interface (CLI).
## Run a task from the InfluxDB UI
1. In the navigation menu on the left, select **Tasks**.
{{< nav-icon "tasks" >}}
2. Hover over the task you want to run and click the **{{< icon "gear" >}}** icon.
3. Select **Run Task**.
## Run a task with the influx CLI
Use the `influx task run retry` command to run a task.
{{% note %}}
To run a task from the `influx` CLI, the task must have already run at least once.
{{% /note %}}
```sh
# List all tasks to find the ID of the task to run
influx task list
# Use the task ID to list previous runs of the task
influx task run list --task-id=0000000000000000
# Use the task ID and run ID to retry a run
influx task run retry --task-id=0000000000000000 --run-id=0000000000000000
```

View File

@ -0,0 +1,46 @@
---
title: View task run history and logs
description: >
View task run histories and logs using the InfluxDB UI or the `influx` CLI.
menu:
influxdb_cloud:
name: View run history
parent: Manage tasks
weight: 203
related:
- /influxdb/cloud/reference/cli/influx/task/run/find
---
When an InfluxDB task runs, a "run" record is created in the task's history.
Logs associated with each run provide relevant log messages, timestamps,
and the exit status of the run attempt.
Use the InfluxDB user interface (UI) or the `influx` command line interface (CLI)
to view task run histories and associated logs.
## View a task's run history in the InfluxDB UI
1. In the navigation menu on the left, select **Tasks**.
{{< nav-icon "tasks" >}}
2. Hover over the task you want to run and click the **{{< icon "gear" >}}** icon.
3. Select **View Task Runs**.
### View task run logs
To view logs associated with a run, click **View Logs** next to the run in the task's run history.
## View a task's run history with the influx CLI
Use the `influx task run list` command to view a task's run history.
```sh
# List all tasks to find the ID of the task to run
influx task list
# Use the task ID to view the run history of a task
influx task run list --task-id=0000000000000000
```
{{% note %}}
Detailed run logs are not currently available in the `influx` CLI.
{{% /note %}}

View File

@ -0,0 +1,69 @@
---
title: Update a task
seotitle: Update a task for processing data in InfluxDB
description: >
Update a data processing task in InfluxDB using the InfluxDB UI or the `influx` CLI.
menu:
influxdb_cloud:
name: Update a task
parent: Manage tasks
weight: 204
related:
- /influxdb/cloud/reference/cli/influx/task/update
---
## Update a task in the InfluxDB UI
Click the **Tasks** icon in the left navigation to view the lists of tasks.
{{< nav-icon "tasks" >}}
Click the name of a task to update it.
#### Update a task Flux script
1. In the list of tasks, click the **Name** of the task you want to update.
2. In the left panel, modify the task options.
3. In the right panel, modify the task script.
4. Click **Save** in the upper right.
#### Update the status of a task
In the list of tasks, click the {{< icon "toggle" >}} toggle to the left of the
task you want to activate or inactivate.
#### Update a task description
1. In the list of tasks, hover over the name of the task you want to update.
2. Click the pencil icon {{< icon "pencil" >}}.
3. Click outside of the field or press `RETURN` to update.
## Update a task with the influx CLI
Use the `influx task update` command to update or change the status of an existing task.
_This command requires a task ID, which is available in the output of `influx task list`._
#### Update a task Flux script
Pass the file path of your updated Flux script to the `influx task update` command
with the ID of the task you want to update.
Modified [task options](/influxdb/cloud/process-data/task-options) defined in the Flux
script are also updated.
```sh
# Syntax
influx task update -i <task-id> -f </path/to/updated-task-script>
# Example
influx task update -i 0343698431c35000 -f /tasks/cq-mean-1h.flux
```
#### Update the status of a task
Pass the ID of the task you want to update to the `influx task update`
command with the `--status` flag.
_Possible arguments of the `--status` flag are `active` or `inactive`._
```sh
# Syntax
influx task update -i <task-id> --status < active | inactive >
# Example
influx task update -i 0343698431c35000 --status inactive
```

View File

@ -0,0 +1,38 @@
---
title: View tasks
seotitle: View created tasks that process data in InfluxDB
description: >
View existing data processing tasks using the InfluxDB UI or the `influx` CLI.
menu:
influxdb_cloud:
name: View tasks
parent: Manage tasks
weight: 202
related:
- /influxdb/cloud/reference/cli/influx/task/list
---
## View tasks in the InfluxDB UI
Click the **Tasks** icon in the left navigation to view the lists of tasks.
{{< nav-icon "tasks" >}}
### Filter the list of tasks
1. Click the **Show Inactive** {{< icon "toggle" >}} toggle to include or exclude
inactive tasks in the list.
2. Enter text in the **Filter tasks** field to search for tasks by name or label.
3. Click the heading of any column to sort by that field.
## View tasks with the influx CLI
Use the `influx task list` command to return a list of created tasks.
```sh
influx task list
```
#### Filter tasks using the CLI
Other filtering options such as filtering by organization or user,
or limiting the number of tasks returned, are available.
See the [`influx task list` documentation](/influxdb/cloud/reference/cli/influx/task/list)
for information about other available flags.

View File

@ -0,0 +1,112 @@
---
title: Task configuration options
seotitle: InfluxDB task configuration options
description: >
Task options define specific information about a task such as its name,
the schedule on which it runs, execution delays, and others.
menu:
influxdb_cloud:
name: Task options
parent: Process data
weight: 105
influxdb/cloud/tags: [tasks, flux]
---
Task options define specific information about a task.
They are set in a Flux script or in the InfluxDB user interface (UI).
The following task options are available:
- [name](#name)
- [every](#every)
- [cron](#cron)
- [offset](#offset)
- [concurrency](#concurrency)
- [retry](#retry)
{{% note %}}
`every` and `cron` are mutually exclusive, but at least one is required.
{{% /note %}}
## name
The name of the task. _**Required**_.
_**Data type:** String_
```js
options task = {
name: "taskName",
// ...
}
```
## every
The interval at which the task runs.
_**Data type:** Duration_
```js
options task = {
// ...
every: 1h,
}
```
{{% note %}}
In the InfluxDB UI, the **Interval** field sets this option.
{{% /note %}}
## cron
The [cron expression](https://en.wikipedia.org/wiki/Cron#Overview) that
defines the schedule on which the task runs.
Cron scheduling is based on system time.
_**Data type:** String_
```js
options task = {
// ...
cron: "0 * * * *",
}
```
## offset
Delays the execution of the task but preserves the original time range.
For example, if a task is to run on the hour, a `10m` offset will delay it to 10
minutes after the hour, but all time ranges defined in the task are relative to
the specified execution time.
A common use case is offsetting execution to account for data that may arrive late.
_**Data type:** Duration_
```js
options task = {
// ...
offset: "0 * * * *",
}
```
## concurrency
The number task of executions that can run concurrently.
If the concurrency limit is reached, all subsequent executions are queued until
other running task executions complete.
_**Data type:** Integer_
```js
options task = {
// ...
concurrency: 2,
}
```
## retry
The number of times to retry the task before it is considered as having failed.
_**Data type:** Integer_
```js
options task = {
// ...
retry: 2,
}
```

View File

@ -0,0 +1,17 @@
---
title: Query data in InfluxDB
seotitle: Query data stored in InfluxDB
description: >
Learn to query data stored in InfluxDB using Flux and tools such as the InfluxDB
user interface and the 'influx' command line interface.
menu:
influxdb_cloud:
name: Query data
weight: 3
influxdb/cloud/tags: [query, flux]
---
Learn to query data stored in InfluxDB using Flux and tools such as the InfluxDB
user interface and the 'influx' command line interface.
{{< children >}}

View File

@ -0,0 +1,17 @@
---
title: Execute queries
seotitle: Different ways to query InfluxDB
description: There are multiple ways to query data from InfluxDB including the InfluxDB UI, CLI, and API.
weight: 103
menu:
influxdb_cloud:
name: Execute queries
parent: Query data
influxdb/cloud/tags: [query]
---
There are multiple ways to execute queries with InfluxDB. Choose from the following options:
{{< children >}}

View File

@ -0,0 +1,13 @@
---
title: Query in Data Explorer
description: >
Query your data in the InfluxDB user interface (UI) Data Explorer.
weight: 201
menu:
influxdb_cloud:
name: Query with Data Explorer
parent: Execute queries
influxdb/cloud/tags: [query]
---
{{< duplicate-oss >}}

View File

@ -0,0 +1,12 @@
---
title: Query in the Flux REPL
description: Use the Flux REPL to query InfluxDB data.
weight: 203
menu:
influxdb_cloud:
name: Query in the Flux REPL
parent: Execute queries
influxdb/cloud/tags: [query]
---
{{< duplicate-oss >}}

View File

@ -0,0 +1,12 @@
---
title: Query with the InfluxDB API
description: Use the InfluxDB API to query InfluxDB data.
weight: 202
menu:
influxdb_cloud:
name: Query with the InfluxDB API
parent: Execute queries
influxdb/cloud/tags: [query]
---
{{< duplicate-oss >}}

View File

@ -0,0 +1,12 @@
---
title: Use the `influx query` command
description: Use the influx CLI to query InfluxDB data.
weight: 204
menu:
influxdb_cloud:
name: Use the influx CLI
parent: Execute queries
influxdb/cloud/tags: [query]
---
{{< duplicate-oss >}}

View File

@ -0,0 +1,12 @@
---
title: Query data with Flux
description: Guides that walk through both common and complex queries and use cases for Flux.
weight: 102
influxdb/cloud/tags: [flux, query]
menu:
influxdb_cloud:
name: Query with Flux
parent: Query data
---
{{< duplicate-oss >}}

View File

@ -0,0 +1,21 @@
---
title: Calculate percentages with Flux
list_title: Calculate percentages
description: >
Use [`pivot()` or `join()`](/influxdb/cloud/query-data/flux/mathematic-operations/#pivot-vs-join)
and the [`map()` function](/influxdb/cloud/reference/flux/stdlib/built-in/transformations/map/)
to align operand values into rows and calculate a percentage.
menu:
influxdb_cloud:
name: Calculate percentages
parent: Query with Flux
weight: 209
related:
- /influxdb/cloud/query-data/flux/mathematic-operations
- /influxdb/cloud/reference/flux/stdlib/built-in/transformations/map
- /influxdb/cloud/reference/flux/stdlib/built-in/transformations/pivot
- /influxdb/cloud/reference/flux/stdlib/built-in/transformations/join
list_query_example: percentages
---
{{< duplicate-oss >}}

View File

@ -0,0 +1,25 @@
---
title: Query using conditional logic
seotitle: Query using conditional logic in Flux
list_title: Conditional logic
description: >
This guide describes how to use Flux conditional expressions, such as `if`,
`else`, and `then`, to query and transform data. **Flux evaluates statements from left to right and stops evaluating once a condition matches.**
influxdb/cloud/tags: [conditionals, flux]
menu:
influxdb_cloud:
name: Conditional logic
parent: Query with Flux
weight: 220
related:
- /influxdb/cloud/query-data/flux/query-fields/
- /influxdb/cloud/reference/flux/stdlib/built-in/transformations/filter/
- /influxdb/cloud/reference/flux/stdlib/built-in/transformations/map/
- /influxdb/cloud/reference/flux/stdlib/built-in/transformations/aggregates/reduce/
list_code_example: |
```js
if color == "green" then "008000" else "ffffff"
```
---
{{< duplicate-oss >}}

View File

@ -0,0 +1,18 @@
---
title: Query cumulative sum
seotitle: Query cumulative sum in Flux
list_title: Cumulative sum
description: >
Use the `cumulativeSum()` function to calculate a running total of values.
weight: 210
menu:
influxdb_cloud:
parent: Query with Flux
name: Cumulative sum
influxdb/cloud/tags: [query, cumulative sum]
related:
- /influxdb/cloud/reference/flux/stdlib/built-in/transformations/cumulativesum/
list_query_example: cumulative_sum
---
{{< duplicate-oss >}}

View File

@ -0,0 +1,22 @@
---
title: Create custom Flux functions
description: Create your own custom Flux functions to transform and manipulate data.
list_title: Custom functions
influxdb/cloud/tags: [functions, custom, flux]
menu:
influxdb_cloud:
name: Custom functions
parent: Query with Flux
weight: 220
list_code_example: |
```js
multByX = (tables=<-, x) =>
tables
|> map(fn: (r) => ({ r with _value: r._value * x}))
data
|> multByX(x: 2.0)
```
---
{{< duplicate-oss >}}

View File

@ -0,0 +1,14 @@
---
title: Create custom aggregate functions
description: Create your own custom aggregate functions in Flux using the `reduce()` function.
influxdb/cloud/tags: [functions, custom, flux, aggregates]
menu:
influxdb_cloud:
name: Custom aggregate functions
parent: Custom functions
weight: 301
related:
- /influxdb/cloud/reference/flux/stdlib/built-in/transformations/aggregates/reduce/
---
{{< duplicate-oss >}}

View File

@ -0,0 +1,25 @@
---
title: Check if a value exists
seotitle: Use Flux to check if a value exists
list_title: Exists
description: >
Use the Flux `exists` operator to check if a record contains a key or if that
key's value is `null`.
influxdb/cloud/tags: [exists]
menu:
influxdb_cloud:
name: Exists
parent: Query with Flux
weight: 220
related:
- /influxdb/cloud/query-data/flux/query-fields/
- /influxdb/cloud/reference/flux/stdlib/built-in/transformations/filter/
list_code_example: |
##### Filter null values
```js
data
|> filter(fn: (r) => exists r._value)
```
---
{{< duplicate-oss >}}

Some files were not shown because too many files have changed in this diff Show More