Upload dashboard and data source to grafana docker instance during build process

Hello,

Looking for some guidance and direction to automate the configuration of grafana data source and dashboard when building a docker image with docker compose / dockerfiles.

I need to be able to add a Prometheus Data Source, and import a Dashboard that has been previously created using the dashboard editing tool.

  1. Create and Save Dashboard using Grafana UI
  2. Export Saved Dashboard
    3.1 Build Docker Image
    3.2 Create Admin User
    3.3 Add Prometheus Data Source
    3.4 Add / Upload Grafana Dashboard

Appreciate any guidance or direction.

Thanks,

2 Likes