ZPascal/grafana_dashboard_templater

Use case?

Closed this issue · 2 comments

Hello,

I am wondering about templating grafana dashboards myself and found this package. I am not sure I understand what particular problem this package is solving. Can you elaborate? For example, my use case is:

  1. I have two different tables called sensor1 and sensor2 in a Clickhouse database called db1.
  2. I have created a dashboard for sensor1.
  3. Now I want to programmatically create the dashboard for sensor2 to mirror how sensor1's dashboard.

Specifically, my main difficulty comes when I make an update to sensor1's dashboard and want to reflect this change in sensor2's dashboard. Now I need to go into the GUI and manually recreate the steps. I would like to ideally copy paste the JSON from sensor1 dashboard after suitable modification.

Is your package trying to address a use-case in this direction?

Thanks!

Hi @srikiran-cpn,

it's definitely possible with this and my other project grafana_api_sdk to template a dashboard and change the JSON via the Grafana API.

I've used booth packages as a possibility to template JSON predefined dashboards for new deployed K8s apps and to establish the monitoring of these apps. Furthermore, I've also integrated the functionality directly in the deployment process of the apps to roll out the dashboard directly and set up parameters like the data source or a specific name for the dashboard that matches the name of the app itself.

I hope that explains my scenario of the package and helps you to identify if the packages are helpful or not.

Pascal

@srikiran-cpn I'll close the issue now. I think the use case is clear, but if you have further questions, feel free to open a new issue.