Best practices for influxdb?

I’ve been down this road and configured half a dozen IotaWatts to use InfluxDB (and Grafana) in a variety of ways.

The short version of the outcome is here. As mentioned above, there are a number of tradeoffs and some gotchas, mainly to do with making things easy to graph in Grafana, and not overloading InfluxDB.

Specifically, my experiences suggest:

  • Use in built IotaWatt calcs as much as possible, as Bob suggests
  • Use Continuous Queries in InfluxDB to create energy (from power)
  • Use tags in InfluxDB, and don’t think of it as “SQL with time”
  • Read the docs first, to understand InfluxDB, Grafana and RegEx-with-tags. It saves time in the long run! (a gotcha for me!)
  • Understand what you’re asking InfluxDB to provide to Grafana - the query inspector is great
  • Understand timezones and specify explicitly were necessary (a gotcha for me!)

The long (and messy) version is here. Good luck!

8 Likes