Grafana is an open source dashboard. The Four Keys project is using it to display the four key metrics.
You can see the configuration of the Grafana image in the Dockerfile
.
Auth is currently disabled by default. Learn more about Grafana User Authentication. To require a login, delete or comment out these lines:
ENV GF_AUTH_DISABLE_LOGIN_FORM "true"
ENV GF_AUTH_ANONYMOUS_ENABLED "true"
ENV GF_AUTH_ANONYMOUS_ORG_ROLE "Admin"
Then update grafana.ini
with the auth configuration of your choice.
The datasource and dashboard are configured in datasource.yaml
and dashboards.yaml
. Learn more about provisioning here.
The dashboard is running in a transient container. It does not store data. Therefore, if you want to update the dashboard, you must update the fourkeys_dashboard.json
. The easiest way to update the JSON is to make changes in the UI and export the JSON. Any changes in the UI will be temporary and must be saved in the container image.
- Update the dashboard in the UI
- Export the JSON
- Save the JSON in fourkeys_dashboard.json
- Re-build the image and re-deploy the container
To rebuild and deploy the container, you can run gcloud builds submit
in this directory.
If using Terraform, please see the setup to create the resources.
Once the resource is created or if you are not using Terraform, feel free to build and deploy outside of Terraform by running gcloud builds submit
in this directory.