We are in the process of migrating our measurement data storage from PostgreSQL to InfluxDB, for all sorts of reasons which I won’t go in to here. InfluxDB’s “Continuous Query” (CQ) mechanism looks very useful but it poses some problems for us.
Our “myWatt” monitoring device collects measurement data every minute and stores it internally. Periodically it uploads batches of measurements to our server. Ideally the uploads will occur every few minutes (typically at 5-7 minute intervals) but sometimes the myWatt device will be off-line for a longer period and so the measurement batch when it arrives on our server will contain measurement timestamps that are long in the past. (myWatt can store a couple of weeks’ data internally so the measurement timestamps could be that old.)
I have defined a CQ which calculates aggregated mean, max and min for selected raw data fields. I would like to calculate the same mean/max/min fields for raw data containing timestamps which are outside the range of timestamps which the CQ would see. One way to do this would be to run the same SELECT INTO query in our application logic when it detects that the measurement batch contains “old” data. I’m sure this would work but it means that if we want to redefine how we aggregate the data we will have to update our application twice: once to update the CQ definition, and again in our application logic.
So it would be very useful to be able to trigger a pre-defined CQ for a specific time range and measurement series. I have done a bit of research and it appears this has been requested before but the InfluxDB developers have resisted implementing it. Or have I missed something?