Questions over CQ and RP

Hi everyone,
I am a bit of novice when it comes to InfluxDB but I have been playing with it for about a month.
I am running Influxdb + telegraf + grafana on a Raspberrypi3 and so far I am loving it.
I have two telegraf instances collecting system data from two raspberries (the one on which InfluxDB is installed and another one) and storing them in Influxdb.

I hard a hard wake up call the first time the data started to be compacted, CPU usage 100% and not enough memory errors…
I should have expected it as I was running the autogen RP and in a small week it had stored more than 600MB of data.
I have now created a 30 days retention policy but that
I would now like to dive into sub-sampling data and using Continuous Queries.

I understood I should do the following:

  1. create a short-lived default RP for the latest data, i.e. 1 day
  2. create a longer lived RP (not default) fro the subsampled data (i.e. 3 weeks)
  3. create a CQ that saves the data from the first RP (1 day) into the other RP (3 weeks)

I have a couple of question though:

  1. the tutorial in the documentation says I should manually create the CQ for each measurement and field. Is there a way to create a CQ and apply it to a whole bucket?
  2. right now I am using Grafana (or Chronograf) to plot the graphs of the last 1 day but sometime I need to zoom out to identify trends or inspect something that happened more than 1 day ago.
    How should I do that if my data are split in two RP (the 1 day and the 30 days)?

I am sorry if these questions might be too novice!
Thanks!

Hello @nick2k3,
Welcome! I’m so happy to hear your experience has been good. I recommend upgrading to v2 so that you can take advantage of Flux and tasks for downsampling. I recommend Flux because it’s a functional data scripting language which gives you way more control than InfluxQL.

You can also use Flux to perform joins, in case you write your data to different measurements. So you could write a task that writes data into a bucket with measurement=1day and also measurement=30day. Then you could join that data to view it on the same graph.

Unfortunately, I think using Flux is the only way to do that.

Does this help at all?

Hi,
thank you for the answer. Unfortunately I am running Influx 1.8 over a docker image on a RaspberryPi 4.
From what I understood there are no plans of extending v2 to be used on RPi4, mostly due to the kernel being still 32 bit.

If this might not be the case in the future i would certainly try the v2 out, but until then I am afraid I am stuck with the features of 1.8.

Is there really no way to do these two things with 1.8?