commit
c137885cc6
|
@ -22,7 +22,7 @@ We recommend the following design guidelines for most use cases:
|
|||
|
||||
Your queries should guide what data you store in [tags](/enterprise_influxdb/v1/concepts/glossary/#tag) and what you store in [fields](/enterprise_influxdb/v1/concepts/glossary/#field) :
|
||||
|
||||
- Store commonly queried and grouping ([`group()`](/flux/v0.x/stdlib/universe/group) or [`GROUP BY`](/enterprise_influxdb/v1/query_language/explore-data/#group-by-tags)) metadata in tags.
|
||||
- Store commonly queried and grouping ([`group()`](/flux/v0/stdlib/universe/group) or [`GROUP BY`](/enterprise_influxdb/v1/query_language/explore-data/#group-by-tags)) metadata in tags.
|
||||
- Store data in fields if each data point contains a different value.
|
||||
- Store numeric values as fields ([tag values](/enterprise_influxdb/v1/concepts/glossary/#tag-value) only support string values).
|
||||
|
||||
|
|
|
@ -433,7 +433,7 @@ representative of the Flux SPEC.
|
|||
details.
|
||||
- Add tagging support to Flux tests.
|
||||
- Add new function [`experimental.catch()`](/flux/v0/stdlib/experimental/catch/).
|
||||
- Add new function [`testing.shouldError()`](/flux/v0.x/stdlib/testing/shoulderror/).
|
||||
- Add new function [`testing.shouldError()`](/flux/v0/stdlib/testing/shoulderror/).
|
||||
|
||||
### Bug fixes
|
||||
|
||||
|
|
|
@ -12,8 +12,8 @@ menu:
|
|||
parent: Account management
|
||||
name: View data usage
|
||||
related:
|
||||
- /flux/v0.x/stdlib/experimental/usage/from/
|
||||
- /flux/v0.x/stdlib/experimental/usage/limits/
|
||||
- /flux/v0/stdlib/experimental/usage/from/
|
||||
- /flux/v0/stdlib/experimental/usage/limits/
|
||||
alt_links:
|
||||
cloud-serverless: /influxdb3/cloud-serverless/admin/billing/data-usage/
|
||||
---
|
||||
|
|
|
@ -9,8 +9,8 @@ menu:
|
|||
parent: Account management
|
||||
name: Adjustable quotas and limits
|
||||
related:
|
||||
- /flux/v0.x/stdlib/experimental/usage/from/
|
||||
- /flux/v0.x/stdlib/experimental/usage/limits/
|
||||
- /flux/v0/stdlib/experimental/usage/from/
|
||||
- /flux/v0/stdlib/experimental/usage/limits/
|
||||
- /influxdb/cloud/write-data/best-practices/resolve-high-cardinality/
|
||||
alt_links:
|
||||
cloud-serverless: /influxdb3/cloud-serverless/admin/billing/limits/
|
||||
|
@ -97,7 +97,7 @@ Combine delete predicate expressions (if possible) into a single request. Influx
|
|||
|
||||
The {{< product-name >}} UI displays a notification message when service quotas or limits are exceeded. The error messages correspond with the relevant [API error responses](#api-error-responses).
|
||||
|
||||
Errors can also be viewed in the [Usage page](/influxdb/cloud/account-management/data-usage/) under **Limit Events**, e.g. `event_type_limited_query`, `event_type_limited_write`,`event_type_limited_cardinality`, or `event_type_limited_delete_rate`.
|
||||
Errors can also be viewed in the [Usage page](/influxdb/cloud/account-management/data-usage/) under **Limit Events**, for example: `event_type_limited_query`, `event_type_limited_write`,`event_type_limited_cardinality`, or `event_type_limited_delete_rate`.
|
||||
|
||||
## API error responses
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ To replicate the state of an organization:
|
|||
### Write data with Flux
|
||||
Perform a query to return all specified data.
|
||||
Write results directly to a bucket in the new organization with the Flux
|
||||
[`to()` function](/flux/v0.x/stdlib/influxdata/influxdb/to/).
|
||||
[`to()` function](/flux/v0/stdlib/influxdata/influxdb/to/).
|
||||
|
||||
{{% note %}}
|
||||
If writes are prevented by rate limiting,
|
||||
|
|
|
@ -13,7 +13,7 @@ prepend: |
|
|||
> [Use InfluxQL to query InfluxDB](/influxdb/cloud/query-data/influxql/).
|
||||
> For information about manually converting InfluxQL queries to Flux, see:
|
||||
>
|
||||
> - [Get started with Flux](/flux/v0.x/get-started/)
|
||||
> - [Get started with Flux](/flux/v0/get-started/)
|
||||
> - [Query data with Flux](/influxdb/cloud/query-data/flux/)
|
||||
> - [Migrate continuous queries to Flux tasks](/influxdb/cloud/upgrade/v1-to-cloud/migrate-cqs/)
|
||||
source: /shared/influxdb-v2/reference/cli/influx/transpile/_index.md
|
||||
|
|
|
@ -188,7 +188,7 @@ Now, you can add the following buckets with sample data to your notebooks:
|
|||
|
||||
### Add ability to share notebooks
|
||||
|
||||
Add ability to [share a notebook](/influxdb/cloud/tools/notebooks/manage-notebooks/#share-a-notebook) in the the InfluxDB Cloud notebook UI.
|
||||
Add ability to [share a notebook](/influxdb/cloud/tools/notebooks/manage-notebooks/#share-a-notebook) in the InfluxDB Cloud notebook UI.
|
||||
|
||||
## October 2021
|
||||
|
||||
|
@ -209,7 +209,7 @@ Refresh the look and feel of InfluxDB Cloud UI. The updated icons, fonts, and la
|
|||
|
||||
### Flux update
|
||||
|
||||
Upgrade to [Flux v0.139](/flux/v0.x/release-notes/).
|
||||
Upgrade to [Flux v0.139](/flux/v0/release-notes/).
|
||||
|
||||
### Telegraf configuration UI
|
||||
|
||||
|
@ -347,7 +347,7 @@ Install and customize any [InfluxDB community template](https://github.com/influ
|
|||
|
||||
## Features
|
||||
- **InfluxDB OSS 2.0 alpha-17** –
|
||||
_See the [alpha-17 release notes](/influxdb/v2%2E0/reference/release-notes/influxdb/#v200-alpha17) for details._
|
||||
_See the [alpha-17 release notes](/influxdb/v2/reference/release-notes/influxdb/#v200-alpha17) for details._
|
||||
- Alerts and Notifications to Slack (Free Plan), PagerDuty and HTTP (Usage-based Plan).
|
||||
- Rate limiting on cardinality for Free Plan.
|
||||
- Billing notifications.
|
||||
|
@ -359,7 +359,7 @@ Install and customize any [InfluxDB community template](https://github.com/influ
|
|||
### Features
|
||||
|
||||
- **InfluxDB OSS 2.0 alpha-15** –
|
||||
_See the [alpha-9 release notes](/influxdb/v2%2E0/reference/release-notes/influxdb/#v200-alpha15) for details._
|
||||
_See the [alpha-9 release notes](/influxdb/v2/reference/release-notes/influxdb/#v200-alpha15) for details._
|
||||
- Usage-based Plan.
|
||||
- Adjusted Free Plan rate limits.
|
||||
- Timezone selection in the user interface.
|
||||
|
@ -386,7 +386,7 @@ Install and customize any [InfluxDB community template](https://github.com/influ
|
|||
### Features
|
||||
|
||||
- **InfluxDB OSS 2.0 alpha-9** –
|
||||
_See the [alpha-9 release notes](/influxdb/v2%2E0/reference/release-notes/influxdb/#v200-alpha9) for details._
|
||||
_See the [alpha-9 release notes](/influxdb/v2/reference/release-notes/influxdb/#v200-alpha9) for details._
|
||||
|
||||
### Bug fixes
|
||||
|
||||
|
@ -403,7 +403,7 @@ Install and customize any [InfluxDB community template](https://github.com/influ
|
|||
### Features
|
||||
|
||||
- **InfluxDB OSS 2.0 alpha-7** –
|
||||
_See the [alpha-7 release notes](/influxdb/v2%2E0/reference/release-notes/influxdb/#v200-alpha7) for details._
|
||||
_See the [alpha-7 release notes](/influxdb/v2/reference/release-notes/influxdb/#v200-alpha7) for details._
|
||||
|
||||
### Bug fixes
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ We recommend the following design guidelines for most use cases:
|
|||
|
||||
Your queries should guide what data you store in [tags](/influxdb/v1/concepts/glossary/#tag) and what you store in [fields](/influxdb/v1/concepts/glossary/#field) :
|
||||
|
||||
- Store commonly queried and grouping ([`group()`](/flux/v0.x/stdlib/universe/group) or [`GROUP BY`](/influxdb/v1/query_language/explore-data/#group-by-tags)) metadata in tags.
|
||||
- Store commonly queried and grouping ([`group()`](/flux/v0/stdlib/universe/group) or [`GROUP BY`](/influxdb/v1/query_language/explore-data/#group-by-tags)) metadata in tags.
|
||||
- Store data in fields if each data point contains a different value.
|
||||
- Store numeric values as fields ([tag values](/influxdb/v1/concepts/glossary/#tag-value) only support string values).
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ customSumProduct = (tables=<-) => tables
|
|||
|
||||
#### Check if a statically defined record contains a key
|
||||
|
||||
When you use the [record literal syntax](/flux/v0.x/data-types/composite/record/#record-syntax)
|
||||
When you use the [record literal syntax](/flux/v0/data-types/composite/record/#record-syntax)
|
||||
to statically define a record, Flux knows the record type and what keys to expect.
|
||||
|
||||
- If the key exists in the static record, `exists` returns `true`.
|
||||
|
|
|
@ -9,8 +9,8 @@ menu:
|
|||
parent: Manage billing
|
||||
name: View data usage
|
||||
related:
|
||||
- /flux/v0.x/stdlib/experimental/usage/from/
|
||||
- /flux/v0.x/stdlib/experimental/usage/limits/
|
||||
- /flux/v0/stdlib/experimental/usage/from/
|
||||
- /flux/v0/stdlib/experimental/usage/limits/
|
||||
alt_links:
|
||||
cloud: /influxdb/cloud/account-management/data-usage/
|
||||
aliases:
|
||||
|
|
|
@ -9,8 +9,8 @@ menu:
|
|||
parent: Manage billing
|
||||
name: Adjustable quotas and limits
|
||||
related:
|
||||
- /flux/v0.x/stdlib/experimental/usage/from/
|
||||
- /flux/v0.x/stdlib/experimental/usage/limits/
|
||||
- /flux/v0/stdlib/experimental/usage/from/
|
||||
- /flux/v0/stdlib/experimental/usage/limits/
|
||||
- /influxdb3/cloud-serverless/write-data/best-practices/
|
||||
alt_links:
|
||||
cloud: /influxdb/cloud/account-management/limits/
|
||||
|
|
|
@ -121,7 +121,7 @@ aliases:
|
|||
### Bug fixes
|
||||
|
||||
- Update the `Kafka` client to fix a bug regarding write latency.
|
||||
- Update to [Flux v0.171.0](/flux/v0.x/release-notes/#v01710) to fix "interface {} is nil, not string" issue.
|
||||
- Update to [Flux v0.171.0](/flux/v0/release-notes/#v01710) to fix "interface {} is nil, not string" issue.
|
||||
|
||||
---
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ menu:
|
|||
weight: 101
|
||||
---
|
||||
## Problem
|
||||
You may want to use the [`monitor` package](/flux/v0.x/stdlib/influxdata/influxdb/monitor/) and take advantage of functions like [monitor.stateChangesOnly()](/flux/v0.x/stdlib/influxdata/influxdb/monitor/statechangesonly/). However, `monitor.stateChangesOnly()` only allows you to monitor four states: "crit", "warn", "ok", and "info". What if you want to be able to assign and monitor state changes across custom states or more than four states?
|
||||
You may want to use the [`monitor` package](/flux/v0/stdlib/influxdata/influxdb/monitor/) and take advantage of functions like [monitor.stateChangesOnly()](/flux/v0/stdlib/influxdata/influxdb/monitor/statechangesonly/). However, `monitor.stateChangesOnly()` only allows you to monitor four states: "crit", "warn", "ok", and "info". What if you want to be able to assign and monitor state changes across custom states or more than four states?
|
||||
|
||||
## Solution
|
||||
Define your own custom `stateChangesOnly()` function. Use the function from the source code here and alter it to accommodate more than four levels. Here we account for six different levels instead of just four.
|
||||
|
@ -42,7 +42,7 @@ stateChangesOnly = (tables=<-) => {
|
|||
}
|
||||
```
|
||||
|
||||
Construct some example data with [`array.from()`](/flux/v0.x/stdlib/array/from/) and map custom levels to it:
|
||||
Construct some example data with [`array.from()`](/flux/v0/stdlib/array/from/) and map custom levels to it:
|
||||
|
||||
```js
|
||||
array.from(
|
||||
|
|
|
@ -9,9 +9,9 @@ weight: 105
|
|||
---
|
||||
|
||||
## Send data in JSON body with `http.post()`
|
||||
Use the [reduce()](/flux/v0.x/stdlib/universe/reduce/) function to create a JSON object to include as the body with `http.post()`.
|
||||
Use the [reduce()](/flux/v0/stdlib/universe/reduce/) function to create a JSON object to include as the body with `http.post()`.
|
||||
|
||||
1. Import both the [array](/flux/v0.x/stdlib/array/) package to query data and construct table(s), and the [http package](/flux/v0.x/stdlib/http/) to transfer JSON over http.
|
||||
1. Import both the [array](/flux/v0/stdlib/array/) package to query data and construct table(s), and the [http package](/flux/v0/stdlib/http/) to transfer JSON over http.
|
||||
2. Use `array.from()` to query data and construct a table. Or, use another method [to query data with Flux](/influxdb/v2/query-data/flux/).
|
||||
3. Use the `reduce()` function to construct a JSON object, and then use `yield()` to store the output of reduce. This table looks like:
|
||||
|
||||
|
@ -19,7 +19,7 @@ Use the [reduce()](/flux/v0.x/stdlib/universe/reduce/) function to create a JSON
|
|||
| :-------------------- | :----------------------------- |
|
||||
| example-field:["3"4"1 | {example-tag-key:["bar"bar"bar |
|
||||
|
||||
4. Use the [map()](/flux/v0.x/stdlib/universe/map/) function to combine the two components together into a JSON object, and then use a second `yield()` function to store this object as `final JSON`. This table looks like:
|
||||
4. Use the [map()](/flux/v0/stdlib/universe/map/) function to combine the two components together into a JSON object, and then use a second `yield()` function to store this object as `final JSON`. This table looks like:
|
||||
|
||||
| field | tag | final |
|
||||
| :-------------------- | :----------------------------- | :------------------------------------------------------- |
|
||||
|
|
|
@ -12,7 +12,7 @@ weight: 102
|
|||
You may want to select data from specific hours of the day. For example, you may only want data within normal business hours (9am - 5pm).
|
||||
|
||||
## Solution 1
|
||||
Use [hourSelection()](/flux/v0.x/stdlib/universe/hourselection/) to filter data by a specific hour range in each day.
|
||||
Use [hourSelection()](/flux/v0/stdlib/universe/hourselection/) to filter data by a specific hour range in each day.
|
||||
|
||||
```js
|
||||
import "date"
|
||||
|
@ -26,7 +26,7 @@ from(bucket: "example-bucket")
|
|||
|
||||
|
||||
## Solution 2
|
||||
Use [date.hour()](/flux/v0.x/stdlib/date/hour/) to evaluate hours in a `filter()` predicate.
|
||||
Use [date.hour()](/flux/v0/stdlib/date/hour/) to evaluate hours in a `filter()` predicate.
|
||||
|
||||
```js
|
||||
import "date"
|
||||
|
@ -37,4 +37,4 @@ from(bucket: "example-bucket")
|
|||
|> filter(fn: (r) => r["_field"] == "example-field")
|
||||
|> filter(fn: (r) => date.hour(t: r["_time"]) > 9 and date.hour(t: r["_time"]) < 17)
|
||||
|
||||
This solution also applies if you to select data from certain seconds in a minute, minutes in an hour, days in the month, months in the year, etc. Use the [Flux `date` package](/flux/v0.x/stdlib/date/) to assign integer representations to your data and filter for your desired schedule.
|
||||
This solution also applies if you to select data from certain seconds in a minute, minutes in an hour, days in the month, months in the year, etc. Use the [Flux `date` package](/flux/v0/stdlib/date/) to assign integer representations to your data and filter for your desired schedule.
|
|
@ -17,7 +17,7 @@ It's common to use [InfluxDB tasks](/influxdb/cloud/process-data/) to evaluate a
|
|||
Explicitly assign levels to your data based on thresholds.
|
||||
|
||||
### Solution Advantages
|
||||
This is the easiest solution to understand if you have never written a task with the [`monitor` package](/flux/v0.x/stdlib/influxdata/influxdb/monitor/).
|
||||
This is the easiest solution to understand if you have never written a task with the [`monitor` package](/flux/v0/stdlib/influxdata/influxdb/monitor/).
|
||||
|
||||
### Solution Disadvantages
|
||||
You have to explicitly define your thresholds, which potentially requires more code.
|
||||
|
@ -36,9 +36,9 @@ Create a task where you:
|
|||
|
||||
### Solution Explained
|
||||
1. Import packages and define task options and secrets. Import the following packages:
|
||||
- [Flux Telegram package](/flux/v0.x/stdlib/contrib/sranka/telegram/): This package
|
||||
- [Flux InfluxDB secrets package](/flux/v0.x/stdlib/influxdata/influxdb/secrets/): This package contains the [secrets.get()](/flux/v0.x/stdlib/influxdata/influxdb/secrets/get/) function which allows you to retrieve secrets from the InfluxDB secret store. Learn how to [manage secrets](/influxdb/v2/admin/secrets/) in InfluxDB to use this package.
|
||||
- [Flux InfluxDB monitoring package](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/monitor/): This package contains functions and tools for monitoring your data.
|
||||
- [Flux Telegram package](/flux/v0/stdlib/contrib/sranka/telegram/): This package
|
||||
- [Flux InfluxDB secrets package](/flux/v0/stdlib/influxdata/influxdb/secrets/): This package contains the [secrets.get()](/flux/v0/stdlib/influxdata/influxdb/secrets/get/) function which allows you to retrieve secrets from the InfluxDB secret store. Learn how to [manage secrets](/influxdb/v2/admin/secrets/) in InfluxDB to use this package.
|
||||
- [Flux InfluxDB monitoring package](https://docs.influxdata.com/flux/v0/stdlib/influxdata/influxdb/monitor/): This package contains functions and tools for monitoring your data.
|
||||
|
||||
|
||||
```js
|
||||
|
@ -88,7 +88,7 @@ Create a task where you:
|
|||
| example-measurement | example-tag-value | example-field | 50.0 | crit | 2022-01-01T00:01:00Z |
|
||||
|
||||
|
||||
4. Write “states” back to InfluxDB. You can write the data to a new measurement or to a new bucket. To write the data to a new measurement, use [`set()`](/flux/v0.x/stdlib/universe/set/) to update the value of the `_measurement` column in your “states” data.
|
||||
4. Write “states” back to InfluxDB. You can write the data to a new measurement or to a new bucket. To write the data to a new measurement, use [`set()`](/flux/v0/stdlib/universe/set/) to update the value of the `_measurement` column in your “states” data.
|
||||
|
||||
```js
|
||||
states
|
||||
|
@ -115,7 +115,7 @@ Create a task where you:
|
|||
| :------------------ | :---------------- | :------------ | -----: | :----- | :------------------- |
|
||||
| example-measurement | example-tag-value | example-field | 55.0 | crit | 2021-12-31T23:59:00Z |
|
||||
|
||||
6. Union “states” and “last_state_previous_task”. Store this data in a variable “unioned_states”. Use [`sort()`](/flux/v0.x/stdlib/universe/sort/) to ensure rows are ordered by time.
|
||||
6. Union “states” and “last_state_previous_task”. Store this data in a variable “unioned_states”. Use [`sort()`](/flux/v0/stdlib/universe/sort/) to ensure rows are ordered by time.
|
||||
|
||||
```js
|
||||
unioned_states =
|
||||
|
@ -131,7 +131,7 @@ Create a task where you:
|
|||
| example-measurement | example-tag-value | example-field | 30.0 | ok | 2022-01-01T00:00:00Z |
|
||||
| example-measurement | example-tag-value | example-field | 50.0 | crit | 2022-01-01T00:01:00Z |
|
||||
|
||||
7. Use [`monitor.stateChangesOnly()`](/flux/v0.x/stdlib/influxdata/influxdb/monitor/statechangesonly/) to return only rows where the state changed in “unioned_states”. Store this data in a variable, “state_changes”.
|
||||
7. Use [`monitor.stateChangesOnly()`](/flux/v0/stdlib/influxdata/influxdb/monitor/statechangesonly/) to return only rows where the state changed in “unioned_states”. Store this data in a variable, “state_changes”.
|
||||
|
||||
```js
|
||||
state_changes =
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: Flux Data Structure
|
||||
description: >
|
||||
[Flux](/flux/v0.x/) is the native data language for the InfluxDB platform. Here, Scott Anderson discusses the 'stream of tables' concept, and how that relates to Flux's data structure.
|
||||
[Flux](/flux/v0/) is the native data language for the InfluxDB platform. Here, Scott Anderson discusses the 'stream of tables' concept, and how that relates to Flux's data structure.
|
||||
menu:
|
||||
resources:
|
||||
parent: Videos
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: Flux Functions
|
||||
description: >
|
||||
Functions are the building blocks of the Flux scripting language. Here, Scott Anderson describes what [Flux functions](/flux/v0.x/stdlib/all-functions/) are, how they work, and how to use them.
|
||||
Functions are the building blocks of the Flux scripting language. Here, Scott Anderson describes what [Flux functions](/flux/v0/stdlib/all-functions/) are, how they work, and how to use them.
|
||||
menu:
|
||||
resources:
|
||||
parent: Videos
|
||||
|
|
Loading…
Reference in New Issue