Skip to content

Instantly share code, notes, and snippets.

@twei55
Last active June 22, 2023 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twei55/c69eddef4e3e0f9f6e7f43d3e5e7c279 to your computer and use it in GitHub Desktop.
Save twei55/c69eddef4e3e0f9f6e7f43d3e5e7c279 to your computer and use it in GitHub Desktop.
InfluxDB commands

Drop all series

DROP SERIES FROM /.*/

Drop all series starting with A

DROP SERIES FROM /^A+/

COPY all measurements FROM database A to database B

USE A
SELECT * INTO B..:MEASUREMENT FROM /.*/ GROUP BY *

Show timestamps in human-readable format in query

influx -username [user] -password [pwd] -precision rfc3339

Show all measurements by regex

SHOW MEASUREMENTS WITH MEASUREMENT =~ /regular expression/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment