Best practice for storing daily values and sensor types




I‘m new to Influx and looking for some best practices regarding database structure and how cumulative values should be stored.
We have weather sensors from different manufacturers. Depending on the manufacturer they send different data sets. All send at least the current temperature, some also send the wind velocity and others the illumination.
Topic 1:
Because mostly all available data values for a device will be queried, does it make sense to create one “big table” containing all these different measurements and adding some empty dummy value if the specific device does not provide a measurment? Is it still better to create one table per measurement? Or is there any other approach to this, that makes more sense?
(As a tag I wanted to use the device id, which should be fine, right?)

Topic 2:
From some devices we also get a “hours of sunlight” per day value from the sensors. How would you store such a once-per-day value?

Thanks for your help!


Hi Tek,

I’m having a similar question regarding once-per-day metrics. Not hours of sunlight in my case, but a nightly database back-up. Did you find a solution to your problem? How are you storing these values? Ideally I’d like to create some dashboard that provides insight in the status of all daily back-ups, how long they took, if they succeeded or failed, etc.


Hi verhage,

yes, I found a solution, but I guess not really an optimal one. What I do is to use flags for the cumulative values (for example: “day” for daily values) and set the time of that value to the middle of the day.

I also thought about creating a different measurement, like {measurement_name}_daily, but thought that the flag option might be better.

But yeah, to be honest, both solutions sound workaroundish to me and I‘m still looking for a best practice here or even that cumulative values are supported directly by the database.
However in the end the approach works, which is the important part. :wink:

Hope that helps!

Best regards