Is it possible to automate dashboard creation?

I am supporting multiple customers and am considering using Grafana as a dashboard for representation of metrics. It is possible that at any time I may add new metrics to any given client and while I would love for all customers to be exactly the same, there will be differences.

I am wondering if it would be possible to automate the recreation of dashboards?

I have 75 customers, rather than manually create a dashboard for each client, I would like to write a program to run nightly and do a series of loops:
for each client
… delete previous dashboard if exists
… create a new dashboard
… for each measurement in the database for the customer
… … create a panel based on a predetermined set of parameters relative to the measurement

Is that even possible?

Hi @grafanaadcf - many Grafana admins who need to support a lot of different users will use the Grafana API to programmatically create and manage dashboards at scale - you can check out our API documentation to learn more about what’s possible: https://grafana.com/docs/grafana/latest/http_api/

2 Likes

Bumping this since there’s been some exciting new developments by the Grafana team on this! Check out the Dashboards-as-Code session from GrafanaCONline 2021.

1 Like