Observability Dashboards
You can provide custom Grafana dashboards by adding dashboard ConfigMaps to your application configuration.
Each ConfigMap must include the following label so that Grafana automatically detects and imports it:
labels:
grafana_dashboard: "1"
Optionally, you can specify a folder in Grafana where the dashboard should appear by adding the following annotation:
annotations:
grafana_folder: "mySpecialFolder"
Example
labels:
grafana_dashboard: "1"
annotations:
grafana_folder: "mySpecialFolder"
This setup allows your application to contribute individual dashboards that are automatically organized within Grafana.
Controlling who can see a folder
By default, a folder created this way is restricted: only the platform team and teams that explicitly opt in can see it. A folder's visibility is not set on the dashboard ConfigMap itself. Instead, the platform team declares it once per folder name in team-onboarding's sharedFolderVisibility values:
sharedFolderVisibility:
mySpecialFolder: global
Setting the value to restricted, or leaving the folder name out of sharedFolderVisibility entirely, keeps the default, restricted behavior. Because visibility is keyed by folder name rather than declared by each dashboard, a folder that several applications contribute dashboards to still has exactly one visibility setting.
Granting a team access to a restricted folder
To give a team access to a restricted folder, add the folder name to that team's grafanaFolders list in team-onboarding's values:
teams:
- name: my-team
viewers:
- alice
grafanaFolders:
- mySpecialFolder
Members of my-team then see mySpecialFolder in Grafana, in addition to any folders marked global. Every folder referenced under grafanaFolders should already exist as a dashboard folder (i.e. some dashboard ConfigMap must use that exact grafana_folder value). Referencing a folder that doesn't exist yet has no effect until the folder appears.