Merge branch 'master' into v2-layout

pull/232/head
Scott Anderson 2019-05-10 15:18:41 -06:00
commit 8b3e0f4c0d
27 changed files with 647 additions and 71 deletions

View File

@ -11,8 +11,5 @@ menu:
The following issues currently exist in {{< cloud-name >}}:
- IDPE 2868: Users can delete a token with an active Telegraf configuration pointed to it.
- IDPE 3388: Users can delete themselves from their Cloud 2.0 account.
- IDPE 3392: Free tier users bucket retention is unlimited and should be set to 72 hours.
- IDPE 3393: Retention period for buckets in free tier can be changed by users.
- [TELEGRAF-5600](https://github.com/influxdata/telegraf/issues/5600): Improve error message in Telegraf when the bucket it's reporting to is not found.
- [INFLUXDB-12687](https://github.com/influxdata/influxdb/issues/12687): Create organization button should only be displayed for users with permissions to create an organization.

View File

@ -8,9 +8,29 @@ menu:
name: Release notes
---
## 2019-05-06 _Public Beta_
### Features
- Add rate limiting for Free tier users.
- Add client libraries for Go and JS.
### Bug fixes
- Users cannot delete themselves from their Cloud 2.0 account.
- The bucket retention period for Free tier users is set to 72 hours.
- Free tier users cannot change a bucket's retention period.
---
## 2019-05-02
### Bug Fixes
### Features
- **InfluxDB 2.0 alpha-9**
_See the [alpha-9 release notes](/v2.0/reference/release-notes/#v2-0-0-alpha-9-2019-05-01) for details._
### Bug fixes
- Usage statistics on the Usage page show correct values.
- Existing tasks with duration specified in nanoseconds no longer need to be resubmitted.
@ -18,14 +38,16 @@ menu:
- Cloud users can use CLI tools to interact with their Cloud tenant.
---
## 2019-04-05
### Features
- **InfluxDB 2.0 alpha-7**
_See the [alpha-7 release notes](/v2.0/reference/release-notes/#v2-0-0-alpha-7-2019-03-28) for details._
_See the [alpha-7 release notes](/v2.0/reference/release-notes/#v2-0-0-alpha-7-2019-03-28) for details._
### Bug Fixes
### Bug fixes
- Logout works in InfluxDB Cloud 2.0 UI.
- Single sign-on works between https://cloud2.influxdata.com and https://us-west-2-1.aws.cloud2.influxdata.com.

View File

@ -6,9 +6,8 @@ weight: 1
menu:
v2_0_cloud:
name: Get started with InfluxDB Cloud
---
{{< cloud-name >}} is a fully managed and hosted version of the [InfluxDB v2 API](/v2.0/reference/api/).
{{< cloud-name >}} is a fully managed and hosted version of the InfluxDB 2.0.
To get started, complete the tasks below.
{{% cloud-msg %}}
@ -17,41 +16,76 @@ InfluxDB v2.0 alpha documentation applies to {{< cloud-name "short" >}} unless o
## Sign up
1. Go to [InfluxDB Cloud 2.0]({{< cloud-link >}}), enter your email and password, and then click **Sign Up**.
1. Go to [InfluxDB Cloud 2.0]({{< cloud-link >}}), enter your email and password,
and then click **Sign Up**.
2. Open email from cloudbeta@influxdata.com (subject: Please verify your email for InfluxDB Cloud), and then click **Verify Your Email**. The Welcome to InfluxDB Cloud 2.0 page is displayed.
2. Open email from cloudbeta@influxdata.com (subject: Please verify your email for InfluxDB Cloud),
and then click **Verify Your Email**. The Welcome to InfluxDB Cloud 2.0 page is displayed.
3. Currently, {{< cloud-name >}} us-west-2 region is the only region available. To suggest regions to add, click the **Let us know** link under Regions.
3. Currently, {{< cloud-name >}} us-west-2 region is the only region available.
To suggest regions to add, click the **Let us know** link under Regions.
3. Click **View cloud beta agreement** to review the terms, and then select **I viewed and agree to InfluxDB Cloud 2.0 Beta Agreement**. (You must open the agreement before you can accept the terms.)
4. Click **Continue**. InfluxDB Cloud 2.0 opens with a default organization and bucket (created from your email local-part).
4. Review the terms of the beta agreement, and then select
**I viewed and agree to InfluxDB Cloud 2.0 Beta Agreement**.
5. Click **Continue**. InfluxDB Cloud 2.0 opens with a default organization
(created from your email) and bucket (created from your email local-part).
## Log in
Log in to [InfluxDB Cloud 2.0](https://us-west-2-1.aws.cloud2.influxdata.com) using the credentials created above.
## Collect data
## Collect and write data
Collect and write data to InfluxDB using Telegraf, the InfluxDB v2 API, `influx`
command line interface (CLI), the InfluxDB user interface (UI), or client libraries.
Use Telegraf to collect and write data to {{< cloud-name >}}. Create Telegraf configurations automatically in the UI or manually configure Telegraf.
### Use Telegraf
Use Telegraf to quickly write data to {{< cloud-name >}}.
Create new Telegraf configurations automatically in the UI or manually update an
existing Telegraf configuration to send data to your {{< cloud-name "short" >}} instance.
For details, see [Automatically configure Telegraf](https://v2.docs.influxdata.com/v2.0/collect-data/use-telegraf/auto-config/#create-a-telegraf-configuration) and [Manually configure Telegraf](https://v2.docs.influxdata.com/v2.0/collect-data/use-telegraf/manual-config/).
For details, see [Automatically configure Telegraf](/v2.0/write-data/use-telegraf/auto-config/#create-a-telegraf-configuration)
and [Manually update Telegraf configurations](/v2.0/write-data/use-telegraf/manual-config/).
### API, CLI, and client libraries
For information about using the InfluxDB API, CLI, and client libraries to write data,
see [Write data to InfluxDB](/v2.0/write-data/).
{{% note %}}
#### InfluxDB Cloud instance endpoint
When using Telegraf, the API, CLI, or client libraries to interact with your {{< cloud-name "short" >}}
instance, extract the "host" or "endpoint" of your instance from your {{< cloud-name "short" >}} UI URL.
For example:
```
https://us-west-2-1.aws.cloud2.influxdata.com
```
{{% /note %}}
## Query and visualize data
Once you've set up {{< cloud-name "short" >}} to collect data, you can do the following:
Once you've set up {{< cloud-name "short" >}} to collect data with Telegraf, you can do the following:
- Query data using Flux, the UI, and the `influx` command line interface. See [Query data](/v2.0/query-data/).
- Build custom dashboards to visualize your data. See [Visualize data](/v2.0/visualize-data/).
- Query data using Flux, the UI, and the `influx` command line interface. See [Query data](https://v2.docs.influxdata.com/v2.0/query-data/).
- Build custom dashboards to visualize your data. See [Visualize data](https://v2.docs.influxdata.com/v2.0/visualize-data/).
## View data usage
Once you've set up {{< cloud-name "short" >}} to collect data, view your data usage, including:
## Monitor usage
- **Writes:** Total kilobytes ingested.
- **Reads:** Total kilobytes sent out for responses to queries.
- **Total Query Duration:** Sum of time spent processing queries in seconds.
- **Storage:** Average disk usage in gigabytes.
Once you've set up {{< cloud-name "short" >}} to collect data, monitor your data usage, including:
You'll see sparkline data over the past 4 hours and a single value that shows usage in the last 5 minutes.
To view your data, click **Usage** in the left navigation menu.
- Writes: Total bytes ingested in the past 24 hours.
- Reads: Total bytes sent out for responses to queries in the past 24 hours.
- Total Query Duration: Sum of time spent processing all queries in the past 24 hours.
- Storage: Average disk usage every hour, over the past 24 hrs.
{{< img-hd src="/img/2-0-cloud-usage.png" />}}
## Review rate limits
To optimize InfluxDB Cloud 2.0 services, [rate limits](/v2.0/cloud/rate-limits/) are in place for Free tier users.
During beta, you can check out our Paid tier for free.
To upgrade to Paid tier for free, discuss use cases, or increase rate limits,
reach out to <a href="mailto:cloudbeta@influxdata.com?subject={{< cloud-name >}} Feedback">cloudbeta@influxdata.com</a>.
{{% note %}}
#### Known issues and disabled features

View File

@ -0,0 +1,36 @@
---
title: InfluxDB Cloud 2.0 rate limits
description: Rate limits for Free tier users optimize InfluxDB Cloud 2.0 services.
weight: 2
menu:
v2_0_cloud:
name: Rate limits
---
To optimize InfluxDB Cloud 2.0 services, the following rate limits are in place for Free tier users.
To increase your rate limits, contact <a href="mailto:cloudbeta@influxdata.com?subject={{ $cloudName }} Feedback">cloudbeta@influxdata.com</a>.
- `write` endpoint:
- 5 concurrent API calls
- 3000 KB (10 KB/s) of data written in a 5 minute window
- `query` endpoint:
- 20 concurrent API calls
- 3000 MB (10 MB/s) of data returned in a 5 minute window
- 5 dashboards
- 5 tasks
- 2 buckets
- 72 hour retention period
## View data usage
To view data usage, click **Usage** in the left navigation bar.
{{< nav-icon "usage" >}}
## HTTP response codes
When a request exceeds the rate limit for the endpoint, the InfluxDB API returns:
- HTTP 429 “Too Many Requests”
- Retry-After: xxx (seconds to wait before retrying the request)

View File

@ -1,17 +0,0 @@
---
title: Collect data with InfluxDB 2.0
weight: 2
description: >
InfluxDB provides multiple ways to collect time series data including using Telegraf,
using InfluxDB's built-in data scraper, and using line protocol.
weight: 2
menu:
v2_0:
name: Collect data
---
The following guides will give you a taste of how you can use the InfluxDB user
interface (UI) to collect data into InfluxDB 2.0 buckets and display the data
in dashboards.
{{< children >}}

View File

@ -209,7 +209,7 @@ the `influx` command line interface (CLI).
5. Click **Continue**.
InfluxDB is now initialized with a primary user, organization, and bucket.
You are ready to [collect data](/v2.0/collect-data).
You are ready to [write or collect data](/v2.0/write-data).
{{% note %}}
#### Using the influx CLI after setting up InfluxDB through the UI
@ -247,7 +247,7 @@ influx setup
7. Confirm the details for your primary user, organization, and bucket.
InfluxDB is now initialized with a primary user, organization, and bucket.
You are ready to [collect data](/v2.0/collect-data).
You are ready to [write or collect data](/v2.0/write-data).
{{% /tab-content %}}
<!------------------------------- END UI Setup -------------------------------->

View File

@ -7,7 +7,7 @@ description: >
menu:
v2_0:
name: Query data
weight: 2
weight: 3
v2.0/tags: [query, flux]
---

View File

@ -0,0 +1,22 @@
---
title: InfluxDB client libraries
description: >
InfluxDB client libraries are language-specific tools that integrate with the InfluxDB v2 API.
View the list of available client libraries.
weight: 6
menu:
v2_0_ref:
name: Client libraries
v2.0/tags: [client libraries]
---
InfluxDB client libraries are language-specific packages that integrate with the InfluxDB v2 API.
The following **InfluxDB v2** client libraries are available:
{{% note %}}
These client libraries are in active development and may not be feature-complete.
This list will continue to grow as more client libraries are released.
{{% /note %}}
<!-- - [Go](https://github.com/influxdata/influxdb-client-go) -->
- [JavaScript/Node.js](https://github.com/influxdata/influxdb-client-js)

View File

@ -24,6 +24,25 @@ _**Output data type:** Object_
map(fn: (r) => r._value * r._value), mergeKey: true)
```
{{% note %}}
#### Dropped columns
`map()` drops any columns that:
1. Are not part of the input table's group key
2. Are not explicitly mapped in the `map()` function.
This often results in the `_time` column being dropped.
To preserve the `_time` column, include it in your column mapping.
```js
map(fn: (r) => ({
_time: r._time,
...
})
)
```
{{% /note %}}
## Parameters
### fn

View File

@ -0,0 +1,264 @@
---
title: Line protocol reference
description: >
InfluxDB uses line protocol to write data points.
It is a text-based format that provides the measurement, tag set, field set, and timestamp of a data point.
menu:
v2_0_ref:
name: Line protocol
weight: 6
v2.0/tags: [write, line protocol]
---
InfluxDB uses line protocol to write data points.
It is a text-based format that provides the measurement, tag set, field set, and timestamp of a data point.
- [Elements of line protocol](#elements-of-line-protocol)
- [Data types and format](#data-types-and-format)
- [Quotes](#quotes)
- [Special characters](#special-characters)
- [Comments](#comments)
- [Naming restrictions](#naming-restrictions)
- [Duplicate points](#duplicate-points)
```js
// Syntax
<measurement>[,<tag_key>=<tag_value>[,<tag_key>=<tag_value>]] <field_key>=<field_value>[,<field_key>=<field_value>] [<timestamp>]
// Example
myMeasurement,tag1=value1,tag2=value2 fieldKey="fieldValue" 1556813561098000000
```
Lines separated by the newline character `\n` represent a single point
in InfluxDB. Line protocol is whitespace sensitive.
{{% note %}}
Line protocol does not support the newline character `\n` in tag or field values.
{{% /note %}}
## Elements of line protocol
```
measurementName,tagKey=tagValue fieldKey="fieldValue" 1465839830100400200
--------------- --------------- --------------------- -------------------
| | | |
Measurement Tag set Field set Timestamp
```
### Measurement
<span class="required">Required</span>
The measurement name.
InfluxDB accepts one measurement per point.
_Measurement names are case-sensitive and subject to [naming restrictions](#naming-restrictions)._
_**Data type:** [String](#string)_
### Tag set
_**Optional**_
All tag key-value pairs for the point.
Key-value relationships are denoted with the `=` operand.
Multiple tag key-value pairs are comma-delimited.
_Tag keys and tag values are case-sensitive.
Tag keys are subject to [naming restrictions](#naming-restrictions)._
_**Key data type:** [String](#string)_
_**Value data type:** [String](#string)_
_See [naming restrictions](#naming-restrictions)_
### Field set
<span class="required">Required</span>
All field key-value pairs for the point.
Points must have at least one field.
_Field keys and string values are case-sensitive.
Field keys are subject to [naming restrictions](#naming-restrictions)._
_**Key data type:** [String](#string)_
_**Value data type:** [Float](#float) | [Integer](#integer) | [String](#string) | [Boolean](#boolean)_
_See [naming restrictions](#naming-restrictions)_
{{% note %}}
_Always double quote string field values. More on quotes [below](#quotes)._
```sh
measurementName fieldKey="field string value" 1556813561098000000
```
{{% /note %}}
### Timestamp
_**Optional**_
The Unix nanosecond timestamp for the data point.
InfluxDB accepts one timestamp per point.
If no timestamp is provided, InfluxDB uses the system time (UTC) of its host machine.
_**Data type:** [Unix timestamp](#unix-timestamp)_
{{% note %}}
_Use the default nanosecond precision timestamp or specify an alternative precision
when [writing the data](/v2.0/write-data/#precision)._
{{% /note %}}
### Whitespace
Whitespace in line protocol determines how InfluxDB interprets the data point.
The **first unescaped space** delimits the measurement and the tag set from the field set.
The **second unescaped space** delimits the field set from the timestamp.
```
measurementName,tagKey=tagValue fieldKey="fieldValue" 1465839830100400200
┬ ┬
1st space 2nd space
```
## Data types and format
### Float
IEEE-754 64-bit floating-point numbers.
Default numerical type.
_InfluxDB supports scientific notation in float field values._
##### Float field value examples
```js
myMeasurement fieldKey=1.0
myMeasurement fieldKey=1
myMeasurement fieldKey=-1.234456e+78
```
### Integer
Signed 64-bit integers.
Trailing `i` on the number specifies an integer.
| Minimum integer | Maximum integer |
| --------------- | --------------- |
| `-9223372036854775808i` | `9223372036854775807i` |
##### Integer field value examples
```js
myMeasurement fieldKey=1i
myMeasurement fieldKey=12485903i
myMeasurement fieldKey=-12485903i
```
### String
Plain text string.
Length limit 64KB.
##### String example
```sh
# String measurement name, field key, and field value
myMeasurement fieldKey="this is a string"
```
### Boolean
Stores `true` or `false` values.
| Boolean value | Accepted syntax |
|:-------------:|:--------------- |
| True | `t`, `T`, `true`, `True`, `TRUE` |
| False | `f`, `F`, `false`, `False`, `FALSE` |
##### Boolean field value examples
```js
myMeasurement fieldKey=true
myMeasurement fieldKey=false
myMeasurement fieldKey=t
myMeasurement fieldKey=f
myMeasurement fieldKey=TRUE
myMeasurement fieldKey=FALSE
```
{{% note %}}
Do not quote boolean field values.
Quoted field values are interpreted as strings.
{{% /note %}}
### Unix timestamp
Unix nanosecond timestamp.
| Minimum timestamp | Maximum timestamp |
| ----------------- | ----------------- |
| `-9223372036854775806` | `9223372036854775806` |
##### Unix timestamp example
```js
myMeasurementName fieldKey="fieldValue" 1556813561098000000
```
## Quotes
Line protocol supports single and double quotes as described in the following table:
| Element | Double quotes | Single quotes |
| :------ | :------------: |:-------------: |
| Measurement | _Limited_ <sup class="required">*</sup> | _Limited_ <sup class="required">*</sup> |
| Tag key | _Limited_ <sup class="required">*</sup> | _Limited_ <sup class="required">*</sup> |
| Tag value | _Limited_ <sup class="required">*</sup> | _Limited_ <sup class="required">*</sup> |
| Field key | _Limited_ <sup class="required">*</sup> | _Limited_ <sup class="required">*</sup> |
| Field value | **Strings only** | Never |
| Timestamp | Never | Never |
<sup class="required">\*</sup> _Line protocol accepts double and single quotes in
measurement names, tag keys, tag values, and field keys, but interprets them as
part of the name, key, or value._
## Special Characters
Line protocol supports special characters in [string elements](#string).
In the following contexts, it requires escaping certain characters with a backslash (`\`):
| Element | Escape characters |
|:------- |:----------------- |
| Measurement | Comma, Space |
| Tag key | Comma, Equals Sign, Space |
| Tag value | Comma, Equals Sign, Space |
| Field key | Comma, Equals Sign, Space |
| Field value | Double quote, Backslash |
You do not need to escape other special characters.
##### Examples of special characters in line protocol
```sh
# Measurement name with spaces
my\ Measurement fieldKey="string value"
# Double quotes in a string field value
myMeasurement fieldKey="\"string\" within a string"
# Tag keys and values with spaces
myMeasurement,tag\ Key1=tag\ Value1,tag\ Key2=tag\ Value2 fieldKey=100
# Emojis
myMeasurement,tagKey=🍭 fieldKey="Launch 🚀" 1556813561098000000
```
### Escaping backslashes
Line protocol supports both literal backslashes and backslashes as an escape character.
With two contiguous backslashes, the first is interpreted as an escape character.
For example:
| Backslashes | Intepreted as |
|:-----------:|:-------------:|
| `\` | `\` |
| `\\` | `\` |
| `\\\` | `\\` |
| `\\\\` | `\\` |
| `\\\\\` | `\\\` |
| `\\\\\\` | `\\\` |
## Comments
Line protocol interprets `#` at the beginning of a line as a comment character
and ignores all subsequent characters until the next newline `\n`.
```sh
# This is a comment
myMeasurement fieldKey="string value" 1556813561098000000
```
## Naming restrictions
Measurement names, tag keys, and field keys cannot begin with an underscore `_`.
The `_` namespace is reserved for InfluxDB system use.
## Duplicate points
A point is uniquely identified by the measurement name, tag set, and timestamp.
If you submit line protocol with the same measurement, tag set, and timestamp,
but with a different field set, the field set becomes the union of the old
field set and the new field set, where any conflicts favor the new field set.

View File

@ -0,0 +1,147 @@
---
title: Write data to InfluxDB
list_title: Write data
description: >
Collect and write time series data to InfluxDB using line protocol, Telegraf, data scrapers,
the InfluxDB v2 API, `influx` CLI, the InfluxDB UI, and client libaries.
weight: 2
menu:
v2_0:
name: Write data
v2.0/tags: [write, line protocol]
---
Collect and write time series data to InfluxDB using [line protocol](/v2.0/reference/line-protocol),
Telegraf, data scrapers, the InfluxDB v2 API, `influx` command line interface (CLI),
the InfluxDB user interface (UI), and client libraries.
- [Requirements to write data](#requirements-to-write-data)
- [InfluxDB v2 API](#write-data-using-the-influxdb-v2-api)
- [influx CLI](#write-data-using-the-influx-cli)
- [InfluxDB UI](#write-data-in-the-influxdb-ui)
- [Other ways to write data to InfluxDB](#other-ways-to-write-data-to-influxdb)
## Requirements to write data
To write data to InfluxDB, you must have an organization, bucket, authentication token,
and data formatted in line protocol.
### Organization
The organization in which to write data.
Use your organization name or ID.
### Bucket
The bucket in which to write data.
Use the bucket name or ID.
The bucket must belong to the specified organization.
### Precision
The precision of timestamps provided in the line protocol.
Default timestamp precision is in nanoseconds.
If the precision of the timestamps is anything other than nanoseconds (ns),
you must specify the precision in your write request.
InfluxDB accepts the following precisions:
- `ns` - Nanoseconds
- `us` - Microseconds
- `ms` - Milliseconds
- `s` - Seconds
### Authentication token
All InfluxDB write interactions require an [authentication token](http://localhost:1313/v2.0/security/tokens/).
### Line protocol
Use line protocol to write data points to InfluxDB.
Each line represents a data point.
Each point requires a [measurement](/v2.0/reference/line-protocol/#measurement)
and [field set](/v2.0/reference/line-protocol/#field-set) but can also include
a [tag set](/v2.0/reference/line-protocol/#tag-set) and a [timestamp](/v2.0/reference/line-protocol/#timestamp).
{{% note %}}
_If a data point does not include a timestamp, InfluxDB uses the system time (UTC)
of its host machine when it receives the data point._
{{% /note %}}
##### Example line protocol
```sh
mem,host=host1 used_percent=23.43234543 1556892576842902000
cpu,host=host1 usage_user=3.8234,usage_system=4.23874 1556892726597397000
mem,host=host1 used_percent=21.83599203 1556892777007291000
```
_For details about line protocol, see the [Line protocol reference](/v2.0/reference/line-protocol) ._
<!-- Link to line protocol best practices -->
## Write data using the InfluxDB v2 API
Use the InfluxDB API `/write` endpoint to write data to InfluxDB.
Include the following in your request:
| Requirement | Include by |
|:----------- |:---------- |
| Organization | Use the `org` query parameter in your request URL. |
| Bucket | Use the `bucket` query parameter in your request URL. |
| Precision | Use the `precision` query parameter in your request URL. |
| Authentication token | Use the `Authorization: Token` header. |
| Line protocol | Pass as plain text in your request body. |
###### Example API write request
```sh
curl "http://localhost:9999/api/v2/write?org=YOUR_ORG&bucket=YOUR_BUCKET&precision=s" \
--header "Authorization: Token YOURAUTHTOKEN" \
--data-raw "mem,host=host1 used_percent=23.43234543 1556896326"
```
## Write data using the influx CLI
Use the [`influx write` command](/v2.0/reference/cli/influx/write/) to write data to InfluxDB.
Include the following in your command:
| Requirement | Include by |
|:----------- |:---------- |
| Organization | Use the `-o`,`--org`, or `--org-id` flags. |
| Bucket | Use the `-b`, `--bucket`, or `--bucket-id` flags. |
| Precision | Use the the `-p`, `--precision` flag. |
| Authentication token | Set the `INFLUX_TOKEN` environment variable or use the `t`, `--token` flag. |
| Line protocol | Write a single line as a string or pass a file path prefixed with `@`. |
##### Example influx write commands
```sh
# Write a single data point
influx write -b bucketName -o orgName -p s 'myMeasurement,host=myHost testField="testData" 1556896326'
# Write line protocol from a file
influx write -b bucketName -o orgName -p s @/path/to/line-protocol.txt
```
## Write data in the InfluxDB UI
1. Click **Settings** in the left navigation menu.
{{< nav-icon "settings" >}}
2. Select the **Buckets** tab.
3. Hover over the bucket to write data to and click **{{< icon "plus" >}} Add Data**.
4. Select **Line Protocol**.
_You can also [use Telegraf](/v2.0/write-data/use-telegraf/) or
[scrape data](/v2.0/write-data/scrape-data/)._
5. Select **Upload File** or **Enter Manually**.
- **Upload File:**
Select the time precision of your data.
Drag and drop the line protocol file into the UI or click to select the
file from your file manager.
- **Enter Manually:**
Select the time precision of your data.
Manually enter line protocol.
6. Click **Continue**.
A message indicates whether data is successfully written to InfluxDB.
7. To add more data or correct line protocol, click **Previous**.
8. Click **Finish**.
## Other ways to write data to InfluxDB
{{< children >}}
### InfluxDB client libraries
Use language-specific client libraries to integrate with the InfluxDB v2 API.
See [Client libraries reference](/v2.0/reference/client-libraries/) for more information.

View File

@ -6,10 +6,11 @@ description: >
that collects InfluxDB metrics from the InfluxDB `/metrics` endpoint.
aliases:
- /v2.0/collect-data/scraper-quickstart
- /v2.0/collect-data/quick-start
menu:
v2_0:
name: Quick start
parent: Collect data
parent: Write data
weight: 101
---
@ -23,18 +24,20 @@ After [setting up InfluxDB v2.0](/v2.0/get-started/#set-up-influxdb),
the "Let's start collecting data!" page displays options for collecting data.
Click **Quick Start**.
InfluxDB creates and configures a new [scraper](/v2.0/collect-data/scrape-data/).
The target URL points to the `/metrics` HTTP endpoint of your local InfluxDB instance (e.g. `http://localhost:9999/metrics`),
which outputs internal InfluxDB metrics in the [Prometheus data format](https://prometheus.io/docs/instrumenting/exposition_formats/).
It stores the scraped metrics in the bucket created during the [initial setup process](/v2.0/get-started/#set-up-influxdb).
InfluxDB creates and configures a new [scraper](/v2.0/write-data/scrape-data/).
The target URL points to the `/metrics` HTTP endpoint of your local InfluxDB instance
(for example, `http://localhost:9999/metrics`), which outputs internal InfluxDB
metrics in the [Prometheus data format](https://prometheus.io/docs/instrumenting/exposition_formats/).
The scraper stores the scraped metrics in the bucket created during the
[initial setup process](/v2.0/get-started/#set-up-influxdb).
The following message briefly appears in the UI:
{{< ui-message text="The InfluxDB scraper has been configured for http://localhost:9999/metrics" >}}
{{% note %}}
Quick Start is available only in the last step of the setup process.
If you missed the Quick Start option, you can [manually create a scraper](/v2.0/collect-data/scrape-data)
Quick Start is only available in the last step of the setup process.
If you missed the Quick Start option, you can [manually create a scraper](/v2.0/write-data/scrape-data)
that scrapes data from the `/metrics` endpoint.
{{% /note %}}

View File

@ -7,11 +7,12 @@ description: >
Create a scraper in the InfluxDB UI to collect metrics from a specified target.
aliases:
- /v2.0/collect-data/scraper-metrics-endpoint
- /v2.0/collect-data/scrape-data
v2.0/tags: [scraper]
menu:
v2_0:
name: Scrape data
parent: Collect data
parent: Write data
---
InfluxDB scrapers collect data from specified targets at regular intervals,

View File

@ -2,6 +2,8 @@
title: Manage scrapers
seotitle: Manage InfluxDB scrapers
description: Create, update, and delete InfluxDB data scrapers in the InfluxDB user interface.
aliases:
- /v2.0/collect-data/scrape-data/manage-scrapers
menu:
v2_0:
name: Manage scrapers

View File

@ -2,6 +2,8 @@
title: Create a scraper
seotitle: Create an InfluxDB scraper
description: Create an InfluxDB scraper that collects data from InfluxDB or a remote endpoint.
aliases:
- /v2.0/collect-data/scrape-data/manage-scrapers/create-a-scraper
menu:
v2_0:
parent: Manage scrapers

View File

@ -2,6 +2,8 @@
title: Delete a scraper
seotitle: Delete an InfluxDB scraper
description: Delete an InfluxDB scraper in the InfluxDB user interface.
aliases:
- /v2.0/collect-data/scrape-data/manage-scrapers/delete-a-scraper
menu:
v2_0:
parent: Manage scrapers

View File

@ -2,6 +2,8 @@
title: Update a scraper
seotitle: Update an InfluxDB scraper
description: Update an InfluxDB scraper that collects data from InfluxDB or a remote endpoint.
aliases:
- /v2.0/collect-data/scrape-data/manage-scrapers/update-a-scraper
menu:
v2_0:
parent: Manage scrapers
@ -12,7 +14,7 @@ Update a scraper in the InfluxDB user interface (UI).
{{% note %}}
Scraper **Target URLs** and **BUCKETS** can not be updated.
To modify either, [create a new scraper](/v2.0/collect-data/scrape-data/manage-scrapers/create-a-scraper).
To modify either, [create a new scraper](/v2.0/write-data/scrape-data/manage-scrapers/create-a-scraper).
{{% /note %}}
## Update a scraper in the InfluxDB UI

View File

@ -6,6 +6,8 @@ description: >
returns data in the Prometheus data format.
This article provides links to information about the Prometheus data format
and tools that generate Prometheus-formatted metrics.
aliases:
- /v2.0/collect-data/scrape-data/scrapable-endpoints
menu:
v2_0:
parent: Scrape data

View File

@ -8,10 +8,11 @@ description: >
Create Telegraf configurations in the InfluxDB UI or manually configure Telegraf.
aliases:
- /v2.0/collect-data/advanced-telegraf
- /v2.0/collect-data/use-telegraf
menu:
v2_0:
name : Use Telegraf
parent: Collect data
parent: Write data
---

View File

@ -4,6 +4,8 @@ seotitle: Automatically configure Telegraf for InfluxDB v2.0
description: >
Use the InfluxDB UI to automatically generate a Telegraf configuration,
then start Telegraf using the generated configuration file.
aliases:
- /v2.0/collect-data/use-telegraf/auto-config
menu:
v2_0:
parent: Use Telegraf
@ -16,7 +18,7 @@ This article describes how to create a Telegraf configuration in the InfluxDB UI
start Telegraf using the generated configuration file.
{{% note %}}
_View the [requirements](/v2.0/collect-data/use-telegraf#requirements)
_View the [requirements](/v2.0/write-data/use-telegraf#requirements)
for using Telegraf with InfluxDB v2.0._
{{% /note %}}
@ -35,7 +37,7 @@ for using Telegraf with InfluxDB v2.0._
(e.g. **System**, **Docker**, **Kubernetes**, **NGINX**, or **Redis**), and click **Continue**.
{{% note %}}
All Telegraf plugins are supported, but only a subset are configurable using the InfluxDB UI.
To use plugins other than those listed, you must [manually configure Telegraf](/v2.0/collect-data/use-telegraf/manual-config).
To use plugins other than those listed, you must [manually configure Telegraf](/v2.0/write-data/use-telegraf/manual-config).
{{% /note %}}
8. Review the list of **Plugins to Configure** for configuration requirements.
Plugins listed with a <span style="color:#32B08C">{{< icon "check" >}}</span>

View File

@ -2,6 +2,8 @@
title: Delete a Telegraf configuration
seotitle: Delete a Telegraf configuration from the InfluxDB UI
description: Delete a Telegraf configuration created in the InfluxDB UI.
aliases:
- /v2.0/collect-data/use-telegraf/auto-config/delete-telegraf-config
menu:
v2_0:
parent: Automatically configure Telegraf

View File

@ -2,6 +2,8 @@
title: Update a Telegraf configuration
seotitle: Update Telegraf configurations in the InfluxDB UI
description: Update the name and description of a Telegraf configuration created in the InfluxDB UI.
aliases:
- /v2.0/collect-data/use-telegraf/auto-config/update-telegraf-config
menu:
v2_0:
parent: Automatically configure Telegraf

View File

@ -4,6 +4,8 @@ seotitle: View a Telegraf configuration in the InfluxDB UI
description: >
View the `telegraf.conf` and setup instructions associated with a Telegraf configuration
created in the InfluxDB UI.
aliases:
- /v2.0/collect-data/use-telegraf/auto-config/view-telegraf-config
menu:
v2_0:
parent: Automatically configure Telegraf

View File

@ -2,21 +2,23 @@
title: Manually configure Telegraf
seotitle: Manually configure Telegraf for InfluxDB v2.0
description: >
Manually configure Telegraf to write to InfluxDB v2.0 using the Telegraf `influxdb_v2`
output plugin, and then start Telegraf using the custom configuration.
Update existing or create new Telegraf configurations to use the `influxdb_v2`
output plugin to write to InfluxDB v2.0.
Start Telegraf using the custom configuration.
aliases:
- /v2.0/collect-data/use-telegraf/manual-config
menu:
v2_0:
parent: Use Telegraf
weight: 202
---
Telegraf's `influxdb_v2` output plugin pushes all metrics collected by Telegraf
into an InfluxDB v2.0 bucket.
This article describes how to enable the `influxdb_v2` output plugin,
and then start Telegraf using the custom configuration file.
Use the Telegraf `influxdb_v2` output plugin to collect and write metrics into an InfluxDB v2.0 bucket.
This article describes how to enable the `influxdb_v2` output plugin in new and existing Telegraf configurations,
then start Telegraf using the custom configuration file.
{{% note %}}
_View the [requirements](/v2.0/collect-data/use-telegraf#requirements)
_View the [requirements](/v2.0/write-data/use-telegraf#requirements)
for using Telegraf with InfluxDB v2.0._
{{% /note %}}
@ -30,12 +32,18 @@ To send data to an InfluxDB v2.0 instance, enable in the
[`influxdb_v2` output plugin](https://github.com/influxdata/telegraf/blob/master/plugins/outputs/influxdb_v2/README.md)
in the `telegraf.conf`.
The following settings are required:
Specify the following:
##### urls
An array of URLs for your InfluxDB v2.0 instances.
_By default, InfluxDB runs on port `9999`._
{{% cloud-msg %}}
To write data to an {{< cloud-name "short" >}} instance, use the URL of your {{< cloud-name "short" >}}
user interface (UI).
For example: <code>https:<nolink>//us-west-2-1.aws.cloud2.influxdata.com</code>
{{% /cloud-msg %}}
##### token
Your InfluxDB v2.0 authorization token.
For information about viewing tokens, see [View tokens](/v2.0/security/tokens/view-tokens/).
@ -60,6 +68,12 @@ The name of the organization that owns the target bucket.
The name of the bucket to write data to.
#### Example influxdb_v2 configuration
{{< code-tabs-wrapper >}}
{{% code-tabs %}}
[InfluxDB OSS](#)
[{{< cloud-name "short" >}}](#)
{{% /code-tabs %}}
{{% code-tab-content %}}
```toml
# ...
@ -71,6 +85,21 @@ The name of the bucket to write data to.
# ...
```
{{% /code-tab-content %}}
{{% code-tab-content %}}
```toml
# ...
[[outputs.influxdb_v2]]
urls = ["https://us-west-2-1.aws.cloud2.influxdata.com"]
token = "$INFLUX_TOKEN"
organization = "example-org"
bucket = "example-bucket"
# ...
```
{{% /code-tab-content %}}
{{< /code-tabs-wrapper >}}
{{% note %}}
##### Write to InfluxDB v1.x and v2.0

View File

@ -13,8 +13,8 @@
</div>
<div class="group">
<a class="card quarter" href="collect-data">
<h3>Collect Data</h3>
<a class="card quarter" href="write-data">
<h3>Write Data</h3>
</a>
<a class="card quarter"href="query-data">

View File

@ -20,9 +20,9 @@
{{ else if or (eq $navIcon "feedback") }}
{{ .Scratch.Set "icon" "nav-chat" }}
{{ .Scratch.Set "title" "Feedback" }}
{{ else if or (eq $navIcon "cloud") }}
{{ else if or (eq $navIcon "cloud") (eq $navIcon "usage") }}
{{ .Scratch.Set "icon" "cloud" }}
{{ .Scratch.Set "title" "Cloud" }}
{{ .Scratch.Set "title" "Usage" }}
{{ end }}
{{ $icon := .Scratch.Get "icon" }}

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB