Skip to content

Instantly share code, notes, and snippets.

View Lecarvalho's full-sized avatar
🐍

Leandro Carvalho Lecarvalho

🐍
View GitHub Profile
@skyrocknroll
skyrocknroll / influxdb.md
Last active October 24, 2023 13:47
[Influxdb Cardinality Debug] #influxdb
  • SHOW TAG VALUES EXACT CARDINALITY WITH KEY = "index";
  • SHOW SERIES CARDINALITY group by "measurement"; → Important useful one.
  • influxdata/influxdb#8636 → Good examples are here
  • influx_inspect report -detailed /var/lib/influxdb/data/envoy/autogen/903 The best way to ficure out high cardinality series.
  • figure out series in each database use _internal ; select * from "database" where time > now() - 900s limit 10; Faced this error ERR: cannot delete data. DB contains shards using both inmem and tsi1 indexes. Please convert all shards to use the same index type to delete data.
find /var/lib/influxdb -type d -name index | while read index; do rm -Rf "$index" ; done
influx_inspect buildtsi -database envoy -datadir /var/lib/influxdb/data/ -waldir /var/lib/influxdb/wal