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 11{
22 _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+
39 enableLokiLogs: false ,
410 },
511}
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
1919 title: 'MySQL Logs' ,
2020 tooltip: '' ,
2121 type: 'link' ,
22- url: 'd/DlHAFwE7z' ,
22+ url: 'd/%s' % $._config.grafanaDashboardIDs[ 'mysql-logs.json' ] ,
2323 },
2424 ],
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+
2550 },
26- 'mysql-logs.json' : (import 'mysql-logs.json' ),
2751 }
2852 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' ] },
3057 },
3158}
Original file line number Diff line number Diff line change 2525 "graphTooltip" : 1 ,
2626 "id" : 3 ,
2727 "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- ],
4228 "liveNow" : false ,
4329 "panels" : [
4430 {
374360 "definition" : " label_values(mysql_up, instance)" ,
375361 "hide" : 0 ,
376362 "includeAll" : true ,
377- "label" : false ,
378363 "multi" : true ,
379364 "name" : " instance" ,
380365 "options" : [],
You can’t perform that action at this time.
0 commit comments