Re: Any Grafana / Influxdb gurus out there?
Adam Nielsen via linux-aus <[email protected]>
| Newsgroups | gmane.linux.australia |
|---|---|
| Message-ID | <[email protected]> |
> However, in Grafana I'm graphing the energy measurements from > InfluxDB that are supplied from three current clamps. What I've been > trying to get sorted out in my head is how I graph a calculated > datapoint on my graph. One on the energy readings is for the main > circuit and the other two monitor sub-circuits. I'm using Grafana quite a bit in my day job, but with TimescaleDB (PostgreSQL) behind it instead of InfluxDB. Generally I've found with Grafana that for anything beyond the basics you're better off switching the panel into text query mode and writing the SQL or equivalent yourself. This way you can put calculations into the query to subtract one data source from another, however depending on your data structure you can run into difficulties if the timestamps don't line up exactly. It can become quite complicated to get it exactly right depending on the underlying database schema. With TimescaleDB you can use a function called TIME_BUCKET which will shift your timestamps (and interpolate the data) so that even if your readings are taken a few seconds or minutes early or late, you'll end up with values all at the same exact timestamp that makes it easier to do the kind of addition or subtraction that you describe. Presumably InfluxDB can do the same thing but unfortunately I haven't used it enough to be able to offer any advice there. I'd look into the Influx query language to see if you can write a statement there that performs the calculations you are after. Cheers, Adam. _______________________________________________ linux-aus mailing list [email protected] http://lists.linux.org.au/mailman/listinfo/linux-aus To unsubscribe from this list, send a blank email to linux-aus-unsubscribe-cunTk1MwBs8iFSDQTTA3OBCuuivNXqWP@public.gmane.org