Merge branch 'master' into influxdb-pr22998-docs
commit
433024b466
|
@ -60,8 +60,7 @@ An **empty group key** groups all data in a stream of tables into a single table
|
|||
|
||||
_For an example of how group keys work, see the [Table grouping example](#table-grouping-example) below._
|
||||
|
||||
{{% note %}}
|
||||
#### Data sources determine data structure
|
||||
## Data sources determine data structure
|
||||
The Flux data model is separate from the queried data source model.
|
||||
Queried sources return data structured into columnar tables.
|
||||
The table structure and columns included depends on the data source.
|
||||
|
@ -70,7 +69,13 @@ For example, InfluxDB returns data grouped by [series](/{{< latest "influxdb" >}
|
|||
so each table in the returned stream of tables represents a unique series.
|
||||
However, [SQL data sources](/flux/v0.x/stdlib/sql/from/) return a stream of tables
|
||||
with a single table and an empty group key.
|
||||
{{% /note %}}
|
||||
|
||||
### Column labels beginning with underscores
|
||||
Some data sources return column labels prefixed with an underscore (`_`).
|
||||
This is a Flux convention used to identify important or reserved column names.
|
||||
While the underscore doesn't change the functionality of the column, many
|
||||
functions in the [Flux standard library](/flux/v0.x/stdlib/) expect or require
|
||||
these specific column names.
|
||||
|
||||
## Operate on tables
|
||||
At its core, Flux operates on tables.
|
||||
|
|
|
@ -98,23 +98,24 @@ Default is `false`.
|
|||
- [Query downsampled usage data for a different InfluxDB Cloud organization](#query-downsampled-usage-data-for-a-different-influxdb-cloud-organization)
|
||||
- [Query number of bytes in requests to the /api/v2/write endpoint](#query-number-of-bytes-in-requests-to-the-apiv2write-endpoint)
|
||||
- [Query number of bytes returned from the /api/v2/query endpoint](#query-number-of-bytes-returned-from-the-apiv2query-endpoint)
|
||||
- [Query the query count for InfluxDB Cloud query endpoints](#query-the-query-count-for-influxdb-cloud-query-endpoints)
|
||||
- [Compare usage metrics to organization usage limits](#compare-usage-metrics-to-organization-usage-limits)
|
||||
|
||||
##### Query downsampled usage data for your InfluxDB Cloud organization
|
||||
### Query downsampled usage data for your InfluxDB Cloud organization
|
||||
```js
|
||||
import "experimental/usage"
|
||||
|
||||
usage.from(start: -30d, stop: now())
|
||||
```
|
||||
|
||||
##### Query raw usage data for your InfluxDB Cloud organization
|
||||
### Query raw usage data for your InfluxDB Cloud organization
|
||||
```js
|
||||
import "experimental/usage"
|
||||
|
||||
usage.from(start: -1h, stop: now(), raw: true)
|
||||
```
|
||||
|
||||
##### Query downsampled usage data for a different InfluxDB Cloud organization
|
||||
### Query downsampled usage data for a different InfluxDB Cloud organization
|
||||
```js
|
||||
import "experimental/usage"
|
||||
import "influxdata/influxdb/secrets"
|
||||
|
@ -130,7 +131,7 @@ usage.from(
|
|||
)
|
||||
```
|
||||
|
||||
##### Query number of bytes in requests to the /api/v2/write endpoint
|
||||
### Query number of bytes in requests to the /api/v2/write endpoint
|
||||
```js
|
||||
import "experimental/usage"
|
||||
|
||||
|
@ -143,7 +144,7 @@ usage.from(start: -30d, stop: now())
|
|||
|> group()
|
||||
```
|
||||
|
||||
##### Query number of bytes returned from the /api/v2/query endpoint
|
||||
### Query number of bytes returned from the /api/v2/query endpoint
|
||||
```js
|
||||
import "experimental/usage"
|
||||
|
||||
|
@ -156,10 +157,31 @@ usage.from(start: -30d, stop: now())
|
|||
|> group()
|
||||
```
|
||||
|
||||
##### Compare usage metrics to organization usage limits
|
||||
### Query the query count for InfluxDB Cloud query endpoints
|
||||
The following query returns query counts for the following query endpoints:
|
||||
|
||||
- **/api/v2/query**: Flux queries
|
||||
- **/query**: InfluxQL queries
|
||||
|
||||
```javascript
|
||||
import "experimental/usage"
|
||||
|
||||
usage.from(start: -30d, stop: now())
|
||||
|> filter(fn: (r) => r._measurement == "query_count")
|
||||
|> sort(columns: ["_time"])
|
||||
```
|
||||
|
||||
### Compare usage metrics to organization usage limits
|
||||
The following query compares the amount of data written to and queried from your
|
||||
InfluxDB Cloud organization to your organization's rate limits.
|
||||
It appends a `limitReached` column to each row that indicates if your rate
|
||||
limit was exceeded.
|
||||
|
||||
```js
|
||||
import "experimental/usage"
|
||||
|
||||
limits = usage.limits()
|
||||
|
||||
checkLimit = (tables=<-, limit) => tables
|
||||
|> map(fn: (r) => ({r with _value: r._value / 1000, limit: int(v: limit) * 60 * 5}))
|
||||
|> map(fn: (r) => ({r with limitReached: r._value > r.limit}))
|
||||
|
@ -171,6 +193,7 @@ read = usage.from(start: -30d, stop: now())
|
|||
|> group(columns: ["_time"])
|
||||
|> sum()
|
||||
|> group()
|
||||
|> checkLimit(limit: limits.rate.readKBs)
|
||||
|
||||
write = usage.from(start: -30d, stop: now())
|
||||
|> filter(fn: (r) => r._measurement == "http_request")
|
||||
|
|
|
@ -31,8 +31,7 @@ usage.limits(
|
|||
)
|
||||
```
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "View example usage limits record" %}}
|
||||
#### Example output record
|
||||
```js
|
||||
{
|
||||
orgID: "123",
|
||||
|
@ -65,8 +64,6 @@ usage.limits(
|
|||
}
|
||||
}
|
||||
```
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
@ -89,14 +86,14 @@ Default is `""`.
|
|||
- [Output organization limits in a table](#output-organization-limits-in-a-table)
|
||||
- [Output current cardinality with your cardinality limit](#output-current-cardinality-with-your-cardinality-limit)
|
||||
|
||||
##### Get rate limits for your InfluxDB Cloud organization
|
||||
### Get rate limits for your InfluxDB Cloud organization
|
||||
```js
|
||||
import "experimental/usage"
|
||||
|
||||
usage.limits()
|
||||
```
|
||||
|
||||
##### Get rate limits for a different InfluxDB Cloud organization
|
||||
### Get rate limits for a different InfluxDB Cloud organization
|
||||
```js
|
||||
import "experimental/usage"
|
||||
import "influxdata/influxdb/secrets"
|
||||
|
@ -106,7 +103,7 @@ token = secrets.get(key: "INFLUX_TOKEN")
|
|||
usage.limits(host: "https://cloud2.influxdata.com", orgID: "x000X0x0xx0X00x0", token: token)
|
||||
```
|
||||
|
||||
##### Output organization limits in a table
|
||||
### Output organization limits in a table
|
||||
```js
|
||||
import "array"
|
||||
import "experimental/usage"
|
||||
|
@ -133,7 +130,7 @@ array.from(
|
|||
)
|
||||
```
|
||||
|
||||
##### Output current cardinality with your cardinality limit
|
||||
### Output current cardinality with your cardinality limit
|
||||
```js
|
||||
import "experimental/usage"
|
||||
import "influxdata/influxdb"
|
||||
|
|
|
@ -13,10 +13,11 @@ influxdb/cloud/tags: [get-started, install]
|
|||
|
||||
After you've [signed up for InfluxDB Cloud](/influxdb/cloud/sign-up/), you're ready to get started:
|
||||
|
||||
1. Do one of the following:
|
||||
- Do one of the following:
|
||||
- [Write and query data using the programming language of your choice](#write-and-query-data-using-the-programming-language-of-your-choice).
|
||||
- Add [sample data](#add-sample-data).
|
||||
- [Use your own data](/influxdb/cloud/write-data/) to explore InfluxDB Cloud.
|
||||
2. [Create a notebook](#create-a-notebook):
|
||||
- [Create a notebook](#create-a-notebook):
|
||||
1. Click **Notebooks** in the navigation menu on the left.
|
||||
|
||||
{{< nav-icon "books" >}}
|
||||
|
@ -27,6 +28,16 @@ After you've [signed up for InfluxDB Cloud](/influxdb/cloud/sign-up/), you're re
|
|||
5. (Optional) [Monitor data](#monitor-data)
|
||||
6. (Optional) [Output to a new bucket and export as a task](#output-to-a-new-bucket-and-export-as-a-task)
|
||||
|
||||
## Write and query data using the programming language of your choice
|
||||
|
||||
Follow the steps to write data, execute a simple query, and execute a sample query in the selected programming language:
|
||||
|
||||
Click one of the following:
|
||||
- [Python](https://cloud2.influxdata.com/orgs/me/new-user-wizard/python)
|
||||
- [JavaScript/Node](https://cloud2.influxdata.com/orgs/me/new-user-wizard/nodejs)
|
||||
- [Go](https://cloud2.influxdata.com/orgs/me/new-user-wizard/go)
|
||||
|
||||
|
||||
## Add sample data
|
||||
|
||||
{{% note %}}
|
||||
|
|
|
@ -9,6 +9,14 @@ menu:
|
|||
influxdb/cloud/tags: [key concepts]
|
||||
---
|
||||
|
||||
Before working with InfluxDB Cloud, it's helpful to learn a few key concepts. Browse the topics below to learn more.
|
||||
Before working with InfluxDB Cloud, it's helpful to learn a few key concepts. Browse the topics and videos below to learn more.
|
||||
|
||||
{{< children >}}
|
||||
|
||||
{{< youtube KZwr1xBDbBQ >}}
|
||||
|
||||
{{< youtube rrdtyP4OyGM >}}
|
||||
|
||||
{{< youtube B6qHmtRUEWY >}}
|
||||
|
||||
{{< youtube kHIjROe0ZpA >}}
|
||||
|
|
|
@ -38,9 +38,9 @@ This query:
|
|||
|
||||
```js
|
||||
from(bucket: "noaa")
|
||||
|> range(start: -30d)
|
||||
|> group()
|
||||
|> range(start: 2019-08-17)
|
||||
|> keep(columns: ["location"])
|
||||
|> group()
|
||||
|> unique(column: "location")
|
||||
```
|
||||
|
||||
|
@ -59,6 +59,8 @@ This query:
|
|||
|
||||
```js
|
||||
from(bucket: "noaa")
|
||||
|> range(start: 2019-08-17)
|
||||
|> keep(columns: ["location"])
|
||||
|> group()
|
||||
|> unique(column: "location")
|
||||
|> count(column: "location")
|
||||
|
@ -83,8 +85,8 @@ The following query:
|
|||
```js
|
||||
|
||||
from(bucket: "noaa")
|
||||
|> range(start: 2019-08-17)
|
||||
|> filter(fn: (r) => r._measurement == "average_temperature")
|
||||
|> range(start: -30d)
|
||||
|> map(fn: (r) => ({r with _value: (float(v: r._value) - 32.0) * 5.0 / 9.0} ))
|
||||
```
|
||||
|
||||
|
@ -115,8 +117,8 @@ The following query:
|
|||
|
||||
```js
|
||||
from(bucket: "noaa")
|
||||
|> range(start: 2019-08-17)
|
||||
|> filter(fn: (r) => r._measurement == "average_temperature")
|
||||
|> range(start: -30d)
|
||||
|> map(fn: (r) => ({r with celsius: (r._value - 32.0) * 5.0 / 9.0}))
|
||||
```
|
||||
|
||||
|
|
|
@ -9,6 +9,14 @@ menu:
|
|||
influxdb/v2.2/tags: [key concepts]
|
||||
---
|
||||
|
||||
Before working with InfluxDB {{< current-version >}}, it's helpful to learn a few key concepts. Browse the topics below to learn more.
|
||||
Before working with InfluxDB {{< current-version >}}, it's helpful to learn a few key concepts. Browse the topics and videos below to learn more.
|
||||
|
||||
{{< children >}}
|
||||
|
||||
{{< youtube KZwr1xBDbBQ >}}
|
||||
|
||||
{{< youtube rrdtyP4OyGM >}}
|
||||
|
||||
{{< youtube B6qHmtRUEWY >}}
|
||||
|
||||
{{< youtube kHIjROe0ZpA >}}
|
||||
|
|
|
@ -18,7 +18,7 @@ To get install and configure the **InfluxData 1.x** platform, use one of the fol
|
|||
|
||||
- [Install the open source version of InfluxData 1.x platform](/platform/install-and-deploy/install/oss-install)
|
||||
- Install InfluxData 1.x Enterprise:
|
||||
1. [Install Telegraf](/{{< latest "telegraf" >}}/introduction/installation/)
|
||||
1. [Install Telegraf](/{{< latest "telegraf" >}}/install/)
|
||||
2. [Install InfluxDB Enterprise](/{{< latest "enterprise_influxdb" >}}/install-and-deploy/)
|
||||
3. [Install Kapacitor Enterprise](https://archive.docs.influxdata.com/enterprise_kapacitor/latest/introduction/installation_guide/)
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ to be installed, configured, and started separately.
|
|||
|
||||
## Install Telegraf
|
||||
|
||||
The [Telegraf installation instructions](/{{< latest "telegraf" >}}/introduction/installation/)
|
||||
The [Telegraf installation instructions](/{{< latest "telegraf" >}}/install/)
|
||||
walk through installing and configuring Telegraf.
|
||||
|
||||
## Install InfluxDB
|
||||
|
|
|
@ -6,6 +6,8 @@ menu:
|
|||
|
||||
name: Install
|
||||
weight: 20
|
||||
aliases:
|
||||
- /telegraf/v1.22/introduction/installation/
|
||||
---
|
||||
|
||||
This page provides directions for installing, starting, and configuring Telegraf. To install Telegraf, do the following:
|
||||
|
|
|
@ -21,3 +21,7 @@
|
|||
document.getElementsByTagName('head')[0].appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
<!-- Dealtale -->
|
||||
<script>window._dtPixelLayer={orgId:"6266e28c3aae2400137ae93b"};var script=document.createElement("script");script.setAttribute("src","https://pixel.dealtale.com/pixel.bundle.js"),script.setAttribute("type","text/javascript"),document.getElementsByTagName("head")[0].appendChild(script);</script>
|
||||
<!-- End Dealtale-->
|
||||
|
|
Loading…
Reference in New Issue