I git this request on Github, and am publishing it here for comment and response.
Hi
I’m using InfluxDB + Grafana to display the metrics. Playing with the continuous queries to limit the amount of data to be stored.
Would it be possible for Iotawatt to simplify the usage of measurements by allowing to reuse the measurement names that are transfered to influxdb. Currently you cannot combine all related metrics into one measurement. (Except if I miss something?)
At the moment iotawatt will override an existing measurement if the same name is used.
For example it would be great to place all Wh metrics into a measurement WH or Consumption . Together with the tags $name , $device , $units we would still have full details and we would follow best practices for influxdb. .
In an answer to this github post Create InfluxDB Continuous Query where the measurement name is based on tag values - Stack Overflow
Encoding tag values in a measurements names contradicts InfluxDB official best practices and being discouraged. InfluxDB schema design and data layout | InfluxDB OSS 1.5 Documentation
For now I need to use some regex queries to capture all measurements for display like this:
SELECT sum(“value”) FROM /.+dWh/ WHERE $timeFilter GROUP BY time(1d)
Having all Consumption metrics in one single measurement would allow us to select from that one directly and if desired group by tags.
This would also improve the use of continuous queries as we only need to define one for data retention, keeping the tag details if desired.
What do you think?