Skip to content

Instantly share code, notes, and snippets.

@iAnatoly
Created November 10, 2020 01:13
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 iAnatoly/022834cf07ec0d83cb14eae054864aba to your computer and use it in GitHub Desktop.
Save iAnatoly/022834cf07ec0d83cb14eae054864aba to your computer and use it in GitHub Desktop.
Influxdb retention policy and downsampling
> CREATE RETENTION POLICY two_days on weather duration 2d replication 1 default
> CREATE RETENTION POLICY year on weather duration 52w replication 1
> create continuous query cq_30m on weather BEGIN SELECT mean(*) into year.:MEASUREMENT from two_days./.*/ group by time(30m),* EN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment