beancount > prometheus > grafana

221 views
Skip to first unread message

Josh D

unread,
Sep 11, 2023, 10:52:50 PM9/11/23
to Beancount
Is anyone utilizing a Prometheus exporter to track, store, and graph your financial metrics in Grafana? It would be interesting to (1) store / track them over time, (2) do all sort of maths, like savings rate, runway (how long can you last without income), how long it will take to pay off your mortgage, etc. - as a dashboard.

Josh

Andreas Gerstmayr

unread,
Sep 14, 2023, 4:37:33 PM9/14/23
to bean...@googlegroups.com, Josh D
Am 12.09.23 um 04:52 schrieb Josh D:
I don't see the value of duplicating the financial data from a beancount
ledger (which is already a database, and supports BQL queries) to
Prometheus (a time-series database).

Grafana dashboards would definitely be a cool idea though.
I think it would be nice to have a Grafana data source, which can run
BQL queries against a Beancount ledger. It could work with either:
* a custom Grafana backend datasource [1]
* some daemon (standalone or Fava extension) exposing a HTTP API which
accepts BQL queries and returns Grafana Data frames [2], then we could
use some already existing general-purpose data source, e.g. [3].


For my personal dashboards I wanted something integrated in Fava,
therefore I created a little Fava extension fava-dashboards [4], which
renders charts from BQL queries. Not as fancy as Grafana, but simple to
implement and extensible.


[1]
https://grafana.com/docs/grafana/latest/developers/plugins/create-a-grafana-plugin/develop-a-plugin/build-a-data-source-backend-plugin/
[2]
https://grafana.com/docs/grafana/latest/developers/plugins/introduction-to-plugin-development/data-frames/
[3] https://grafana.com/grafana/plugins/simpod-json-datasource/
[4] https://github.com/andreasgerstmayr/fava-dashboards

Cheers,
Andreas

>
> Josh
>
> --
> You received this message because you are subscribed to the Google
> Groups "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to beancount+...@googlegroups.com
> <mailto:beancount+...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/a5517d33-09a9-4be5-a3fe-7315b991cff7n%40googlegroups.com <https://groups.google.com/d/msgid/beancount/a5517d33-09a9-4be5-a3fe-7315b991cff7n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Josh D

unread,
Sep 17, 2023, 10:31:08 PM9/17/23
to Beancount
Thanks Andreas. And I'm a happy beginner user of fava-dashboards as well. The only purpose of Prometheus was to (maybe?) post to it using some simple custom scripts, to capture select metrics, and then Prometheus<>Grafana is well established. But fully agreed that if we can go beancount<>Grafana directly, that will be the most ideal scenario. The challenge is of course having a Grafana exporter for beancount. 

Josh

Reply all
Reply to author
Forward
0 new messages