I use grafanalib
. I have a script that generates the dashboards depending on given parameters, then I store generated JSON as a k8s configmap that's mounted into the directory that's checked by grafana on startup. Might not be everyone's cup of tea but it is good enough for me.
Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
You can configure grafana without gui. That explain in https://grafana.com/docs/grafana/latest/administration/provisioning/
To be precise, the page how to configure some things and how to upload the config. I also tried that.
The problem is in the dashboard jsons. They are not well documented (docs on specific plots are missing), and are a pain to edit (as any json).
The grafanalib
tool I mentioned tries to help with that by implementing a sort of DSL for dashboards, but it is not ideal.
You can create graph on the UI and then export to json. To be honest, it's hard for me to imagine a situation where graphs need to be edited so often. After all, there are excellent template engines in Grafana itself. For quick look anyone can use Explore panel. Maybe I don't have so much data...
create graph on the UI
that's something I want to avoid
hard for me to imagine a situation where graphs need to be edited so often
the whole system is under development (trying new views, changing how the data is represented, etc), so I don't need to imagine it, I have it right in front of me ;)
Depending on what you’re comfortable with (and whether you want to integrate it with something else), maybe take a look at Altair? Especially nice is the declarative syntax of Vega-Altair.
It still has the limitations of JSON churn, but I find jsonnet to be a nice functional-style DSL in which to write grafana dashboards.