Create generic metrics dashboard for each stage group
This adds a generic way to generate a dashboard for a stage-group in the runbooks. Based on the work done in #663 (closed)
We should be able to generate a basic dashboard for stage group using as script that uses the mapping file as a source.
If a dashboard for a stage group does not exist, it should generate one using this template:
local stageGroupDashboards = import './stage-group-dashboards.libsonnet';
stageGroupDashboards.dashboard(<group-key>)
.stageGroupDashboardTrailer()
The dasbhoard gets added to dashboads/stage-groups/
directory with the name <group-key>.jsonnet
.
If a file for a stage group already existed, it should not be overwritten.
Dashboards that exist in the directory for a stage-group that does not have an entry in the mapping file should be removed. This means that if a stage group gets renamed, we'd notice and we can update the name of their dashboard manually if needed.
The script should get run as part of the monthly stage-group check, so a diff would make the job in the runbooks fail and a human can take a look at it.