Flux Documentation | cardinality


cardinality : (start:A, ?bucket:string, ?bucketID:string, ?host:string, ?org:string, ?orgID:string, ?predicate:(r:{B with _value:C, _measurement:string, _field:string}) => bool, ?stop:D, ?token:string) => [{_value:int, _stop:time, _start:time}] where A: Timeable, D: Timeable

cardinality will return the cardinality of data for a given bucket. If a predicate is specified, then the cardinality only includes series that match the predicate.

This is a companion discussion topic for the original entry at https://fluxlang.dev/stdlib/influxdata/influxdb/cardinality.html

For an excellent example of what you can do with the cardinality function, see TL;DR InfluxDB Tech Tips - Monitoring Tasks and Finding the Source of Runaway Cardinality | InfluxData