Create and manage Grafana Dashboards as code.
This project aims to create and manage Grafana Dashboards as code, using AWS CDK Custom resources together with Grafonnet and Grafana HTTP APIs.
Grafonnet is a new library from Grafana that allows users to create and manage Grafana dashboards using Jsonnet, a data templating language. Grafonnet simplifies the process of defining dashboards as code, making them easier to version, share and reuse.
Grafana HTTP APIs are used to interact with Grafana instances and perform operations such as creating, updating, and deleting dashboards.
AWS CDK Custom resources are used to integrate Grafonnet and Grafana HTTP APIs with AWS CloudFormation, allowing users to define and deploy Grafana dashboards as part of their AWS infrastructure.
- AWS CLI - To configure the AWS Credentials.
- AWS CDK - To run the local commands and deploy the application.
- Docker - To run the local commands and deploy the application.
- nmv - to set up Node.js v18
- go-jsonnet - Grafonnet uses the
Jsonnet programming language.
NOTE: There is a significant performance issue with the C implementation of Jsonnet. You are strongly recommended to use the newer go-jsonnet Jsonnet implementation. This is also the implementation recommended by the Jsonnet developers themselves. It requires Go
- jsonnet-bundler - a package manager for Jsonnet
aws sso loginto log in to development/production AWS SSO accountnpm installinstall package.json dependenciesnpm run clean-packagesperform a npm packages clean upnpm run dashboard-gengenerate Grafana Dashboards json modelsnpm run deploy-[dev|prod]build and deploy this stack to specific environmentnpm run formatrun a code formatter for entire applicationnpm run testperform eslint and jest snapshot testing