Repository navigation
Expand file tree
/
Copy pathgrafana-dashboard-template.configmap.yaml
More file actions
52 lines (51 loc) · 1.86 KB
/
Copy pathgrafana-dashboard-template.configmap.yaml
File metadata and controls
52 lines (51 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Dashboard ConfigMap Template
# Dashboards are JSON embedded in ConfigMaps, deployed to AppSRE Grafana via app-interface.
# See docs/DASHBOARDS.md for full conventions.
apiVersion: v1
kind: ConfigMap
metadata:
# [required] Name format: grafana-dashboard-<name>.configmap
name: grafana-dashboard-<name>.configmap
labels:
# [required] Must be "true" — without this the Grafana sidecar ignores the ConfigMap
grafana_dashboard: "true"
annotations:
# [required] Grafana folder path. Must start with /grafana-dashboard-definitions/RHTAP
# [optional] Team-specific subfolders could be added (e.g. /grafana-dashboard-definitions/RHTAP/Release-Service)
grafana-folder: /grafana-dashboard-definitions/RHTAP
data:
grafana-dashboard-<name>.json: |-
{
"id": null,
"uid": "<unique-uid-max-40-chars>",
"title": "<Dashboard Title>",
"templating": {
"list": [
{
"name": "datasource",
"type": "datasource",
"query": "prometheus",
"regex": "/rhtap*/",
"refresh": 1
},
{
"name": "cluster",
"type": "query",
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"definition": "label_values(source_cluster)",
"includeAll": true,
"multi": true,
"refresh": 1
}
]
},
"panels": [],
"schemaVersion": 39,
"version": 0
}
#
# Key rules for new dashboards:
# - "id" must be null — Grafana assigns instance-specific IDs on import; baked-in IDs create noisy diffs
# - "uid" must be unique across all files in dashboards/ and ≤ 40 characters
# - Do not hardcode Grafana-internal datasource UIDs in panels — use "${datasource}" instead;
# hardcoded UIDs break when the datasource is recreated or the dashboard is imported elsewhere