File tree Expand file tree Collapse file tree 3 files changed +36
-18
lines changed Expand file tree Collapse file tree 3 files changed +36
-18
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
_config+:: {
3
+ // Grafana dashboard IDs are necessary for stable links for dashboards
4
+ grafanaDashboardIDs: {
5
+ 'mysql-overview.json' : '549c2bf8936f7767ea6ac47c47b00f2a' ,
6
+ 'mysql-logs.json' : 'DlHAFwE7z' ,
7
+ },
8
+
3
9
enableLokiLogs: false ,
4
10
},
5
11
}
Original file line number Diff line number Diff line change @@ -19,13 +19,40 @@ local grafana = import 'github.com/grafana/grafonnet-lib/grafonnet/grafana.libso
19
19
title: 'MySQL Logs' ,
20
20
tooltip: '' ,
21
21
type: 'link' ,
22
- url: 'd/DlHAFwE7z' ,
22
+ url: 'd/%s' % $._config.grafanaDashboardIDs[ 'mysql-logs.json' ] ,
23
23
},
24
24
],
25
+ uid: $._config.grafanaDashboardIDs['mysql-overview.json' ],
26
+ },
27
+ 'mysql-logs.json' :
28
+ (import 'mysql-logs.json' )
29
+ +
30
+ {
31
+
32
+ links+: [
33
+ {
34
+ asDropdown: false ,
35
+ icon: 'dashboard' ,
36
+ includeVars: true ,
37
+ keepTime: true ,
38
+ tags: [],
39
+ targetBlank: false ,
40
+ title: 'MySQL Overview' ,
41
+ tooltip: '' ,
42
+ type: 'link' ,
43
+ url: 'd/%s' % $._config.grafanaDashboardIDs['mysql-overview.json' ],
44
+ },
45
+ ],
46
+
47
+
48
+ uid: $._config.grafanaDashboardIDs['mysql-logs.json' ],
49
+
25
50
},
26
- 'mysql-logs.json' : (import 'mysql-logs.json' ),
27
51
}
28
52
else {
29
- 'mysql-overview.json' : (import 'mysql-overview.json' ),
53
+ 'mysql-overview.json' :
54
+ (import 'mysql-overview.json' )
55
+ +
56
+ { uid: $._config.grafanaDashboardIDs['mysql-overview.json' ] },
30
57
},
31
58
}
Original file line number Diff line number Diff line change 25
25
"graphTooltip" : 1 ,
26
26
"id" : 3 ,
27
27
"iteration" : 1647879063849 ,
28
- "links" : [
29
- {
30
- "asDropdown" : false ,
31
- "icon" : " dashboard" ,
32
- "includeVars" : true ,
33
- "keepTime" : true ,
34
- "tags" : [],
35
- "targetBlank" : false ,
36
- "title" : " MySQL Overview" ,
37
- "tooltip" : " " ,
38
- "type" : " link" ,
39
- "url" : " d/549c2bf8936f7767ea6ac47c47b00f2a"
40
- }
41
- ],
42
28
"liveNow" : false ,
43
29
"panels" : [
44
30
{
374
360
"definition" : " label_values(mysql_up, instance)" ,
375
361
"hide" : 0 ,
376
362
"includeAll" : true ,
377
- "label" : false ,
378
363
"multi" : true ,
379
364
"name" : " instance" ,
380
365
"options" : [],
You can’t perform that action at this time.
0 commit comments