Storing Hourly Daily data

influxdb

#1

I need to create measurement for my hourly , daily records e.g.

24 Hour Data | Average Voltage
28-7-2018 1:00:00 | 42
28-7-2018 2:00:00 | 42
28-7-2018 3:00:00 | 43
28-7-2018 4:00:00 | 40
28-7-2018 5:00:00 | 40
28-7-2018 6:00:00 | 41
28-7-2018 7:00:00 | 43
28-7-2018 8:00:00 | 46
28-7-2018 9:00:00 | 52
28-7-2018 10:00:00 | 59
28-7-2018 11:00:00 | 61
28-7-2018 12:00:00 | 60
28-7-2018 13:00:00 | 59.9
28-7-2018 14:00:00 | 58
28-7-2018 15:00:00 | 50
28-7-2018 16:00:00 | 61
28-7-2018 17:00:00 | 60
28-7-2018 18:00:00 | 59.9
28-7-2018 19:00:00 | 54
28-7-2018 20:00:00 | 52
28-7-2018 21:00:00 | 50
28-7-2018 22:00:00 | 49
28-7-2018 23:00:00 | 45
28-7-2018 0:00:00 | 44

tried inserting records through CLI using following command, unable to create record
Insert 24HourData Voltage=25.2 28-7-2018\ 1:00:00
Similarly i will have monthly data with each day one record.
I tried creating separate tag to store hourly daily timestamp. but challenge is plotting onto grafana
Also my hourly calculations can run only after completion of hour, but the timestamp of that record needs to be exact XX:00:00

Any suggestions?


#2
  • I’ve never tried to insert on the CLI with a string timestamp. I think using seconds since epoch may be easier. You can convert with something like https://www.epochconverter.com/. precision s;Insert 24HourData Voltage=25.2 1532739600
  • See if Influx’s continuous queries can work for your hourly calculations.