Merge branch 'master' into clustered/install-reorg

staging/commandbar-clustered-install
Scott Anderson 2024-10-07 09:47:06 -06:00 committed by GitHub
commit 39fadc605f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 70 additions and 7 deletions

View File

@ -1,7 +1,7 @@
---
title: influxdb.cardinality() function
description: >
`influxdb.cardinality()` returns the series cardinality of data stored in InfluxDB.
`influxdb.cardinality()` returns the series cardinality of data retrieved from InfluxDB.
menu:
flux_v0_ref:
name: influxdb.cardinality
@ -28,9 +28,16 @@ Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
------------------------------------------------------------------------------->
`influxdb.cardinality()` returns the series cardinality of data stored in InfluxDB.
`influxdb.cardinality()` returns the series cardinality of data retrieved from InfluxDB.
{{% note %}}
Although this function is similar to InfluxQL's [`SHOW SERIES CARDINALITY`](/influxdb/v1/query_language/spec/#show-series-cardinality),
it works in a slightly different manner.
`influxdb.cardinality()` is time bounded and reports the cardinality of data that matches the conditions passed into it rather than that of the bucket as a whole.
{{% /note %}}
##### Function type signature
@ -107,6 +114,12 @@ The cardinality calculation excludes points that match the specified start time.
Use a relative duration or absolute time. For example, `-1h` or `2019-08-28T22:00:00Z`.
Durations are relative to `now()`. Default is `now()`.
{{% note %}}
The default value is `now()`, so any points that have been written into the future will
not be counted unless a future `stop` date is provided.
{{% /note %}}
### predicate
Predicate function that filters records.
@ -120,15 +133,17 @@ Default is `(r) => true`.
- [Query series cardinality in a bucket](#query-series-cardinality-in-a-bucket)
- [Query series cardinality in a measurement//](#query-series-cardinality-in-a-measurement)
- [Query series cardinality for a specific tag](#query-series-cardinality-for-a-specific-tag)
- [Query series cardinality of Data Written In the Last 4 Hours](#query-series-cardinality-of-data-written-in-the-last-4-hours)
### Query series cardinality in a bucket
```js
import "influxdata/influxdb"
influxdb.cardinality(bucket: "example-bucket", start: -1y)
influxdb.cardinality(bucket: "example-bucket", start: time(v: 1))
```
Note: if points have been written into the future, you will need to add an appropriate `stop` date
### Query series cardinality in a measurement//
@ -138,7 +153,7 @@ import "influxdata/influxdb"
influxdb.cardinality(
bucket: "example-bucket",
start: -1y,
start: time(v: 1),
predicate: (r) => r._measurement == "example-measurement",
)
@ -150,7 +165,16 @@ influxdb.cardinality(
```js
import "influxdata/influxdb"
influxdb.cardinality(bucket: "example-bucket", start: -1y, predicate: (r) => r.exampleTag == "foo")
influxdb.cardinality(bucket: "example-bucket", start: time(v: 1), predicate: (r) => r.exampleTag == "foo")
```
### Query Cardinality of Data Written In the Last 4 hours
```js
import "influxdata/influxdb"
influxdb.cardinality(bucket: "example-bucket", start: -4h)
```

View File

@ -1088,7 +1088,7 @@ Each InfluxDB Cloud organization has a series cardinality limit to prevent
runaway cardinality. For information about adjusting cardinality limits, see
[How do I increase my organizations rate limits and quotas?](#how-do-i-increase-my-organizations-rate-limits-and-quotas).
{{% /oss-only %}}
{{% /cloud-only %}}
Use [`influxdb.cardinality()`](/flux/v0/stdlib/influxdata/influxdb/cardinality/) in Flux
or [`SHOW SERIES CARDINALITY`](/influxdb/v1/query_language/spec/#show-series-cardinality)

View File

@ -920,11 +920,49 @@
aliases:
- /influxdb/v2/reference/flux/stdlib/experimental/mqtt/
- /influxdb/cloud/reference/flux/stdlib/experimental/mqtt/
prepend:
block: warn
content: |
#### Only supported in InfluxDB Cloud (TSM)
The `experimental/mqtt` package only supported in InfluxDB Cloud (TSM).
It is still available to import in InfluxDB OSS and Enterprise, but
functions will not successfully publish to an MQTT broker.
exclude_from:
nightly: true
oss: ^*
enterprise: ^*
/flux/v0/stdlib/experimental/mqtt/to.md: |
aliases:
- /influxdb/v2/reference/flux/stdlib/experimental/mqtt/to/
- /influxdb/cloud/reference/flux/stdlib/experimental/mqtt/to/
prepend:
block: warn
content: |
#### Only supported in InfluxDB Cloud (TSM)
The `experimental/mqtt` package only supported in InfluxDB Cloud (TSM).
It is still available to import in InfluxDB OSS and Enterprise, but
functions will not successfully publish to an MQTT broker.
exclude_from:
nightly: true
oss: ^*
enterprise: ^*
/flux/v0/stdlib/experimental/mqtt/publish.md: |
prepend:
block: warn
content: |
#### Only supported in InfluxDB Cloud (TSM)
The `experimental/mqtt` package only supported in InfluxDB Cloud (TSM).
It is still available to import in InfluxDB OSS and Enterprise, but
functions will not successfully publish to an MQTT broker.
exclude_from:
nightly: true
oss: ^*
enterprise: ^*
/flux/v0/stdlib/experimental/oee/_index.md: |
aliases:

View File

@ -45,7 +45,8 @@
{{ $versionSemVer := split $value "." }}
{{ $supported := cond (ge (index $versionSemVer 0) (index $introducedSemVer 0)) (cond (ge (index $versionSemVer 1) (index $introducedSemVer 1)) (cond (ge (index $versionSemVer 2) (index $introducedSemVer 2)) true false) false) false }}
{{ $deprecated := and (isset $.Page.Params "deprecated") (cond (ge (index $versionSemVer 0) (index $deprecatedSemVer 0)) (cond (ge (index $versionSemVer 1) (index $deprecatedSemVer 1)) (cond (ge (index $versionSemVer 2) (index $deprecatedSemVer 2)) true false) false) false) }}
{{ $excluded := gt (len (findRE (string $excludePatternOSS) $key)) 0 }}
{{ $nightlyExcluded := and (eq $key "nightly") $.Page.Params.exclude_from.nightly }}
{{ $excluded := or (gt (len (findRE (string $excludePatternOSS) $key)) 0) $nightlyExcluded }}
<div class="version-row">
<div class="version-col"><p>InfluxDB {{ $key }}</p></div>
<div class="version-col"><p>