Skip to content

Commit 7f25376

Browse files
mgr/dashboard: Add 'Browse Dashboards' button in Grafana dashboards
Fixes: https://tracker.ceph.com/issues/69727 Signed-off-by: Piyush Agarwal <[email protected]>
1 parent c3721f7 commit 7f25376

22 files changed

+392
-16
lines changed

monitoring/ceph-mixin/dashboards/ceph-cluster.libsonnet

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,20 @@ local g = import 'grafonnet/grafana.libsonnet';
5959
],
6060
auto=true,
6161
)
62-
).addPanels(
62+
).addLinks([
63+
$.addLinkSchema(
64+
asDropdown=true,
65+
icon='external link',
66+
includeVars=true,
67+
keepTime=true,
68+
tags=[],
69+
targetBlank=false,
70+
title='Browse Dashboards',
71+
tooltip='',
72+
type='dashboards',
73+
url=''
74+
),
75+
]).addPanels(
6376
[
6477
$.addRowSchema(collapse=false, showTitle=true, title='CLUSTER STATE') + { gridPos: { x: 0, y: 0, w: 24, h: 1 } },
6578
$.addStatPanel(

monitoring/ceph-mixin/dashboards/cephfs.libsonnet

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,20 @@ local g = import 'grafonnet/grafana.libsonnet';
4545
'MDS Server',
4646
'')
4747
)
48+
.addLinks([
49+
$.addLinkSchema(
50+
asDropdown=true,
51+
icon='external link',
52+
includeVars=true,
53+
keepTime=true,
54+
tags=[],
55+
targetBlank=false,
56+
title='Browse Dashboards',
57+
tooltip='',
58+
type='dashboards',
59+
url=''
60+
),
61+
])
4862
.addPanels([
4963
$.addRowSchema(false, true, 'MDS Performance') + { gridPos: { x: 0, y: 0, w: 24, h: 1 } },
5064
$.simpleGraphPanel(

monitoring/ceph-mixin/dashboards/host.libsonnet

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,20 @@ local g = import 'grafonnet/grafana.libsonnet';
3232
'dashboard'
3333
)
3434
)
35+
.addLinks([
36+
$.addLinkSchema(
37+
asDropdown=true,
38+
icon='external link',
39+
includeVars=true,
40+
keepTime=true,
41+
tags=[],
42+
targetBlank=false,
43+
title='Browse Dashboards',
44+
tooltip='',
45+
type='dashboards',
46+
url=''
47+
),
48+
])
3549
.addTemplate(
3650
g.template.datasource('datasource',
3751
'prometheus',
@@ -303,6 +317,20 @@ local g = import 'grafonnet/grafana.libsonnet';
303317
1, '-- Grafana --', true, true, 'rgba(0, 211, 255, 1)', 'Annotations & Alerts', 'dashboard'
304318
)
305319
)
320+
.addLinks([
321+
$.addLinkSchema(
322+
asDropdown=true,
323+
icon='external link',
324+
includeVars=true,
325+
keepTime=true,
326+
tags=[],
327+
targetBlank=false,
328+
title='Browse Dashboards',
329+
tooltip='',
330+
type='dashboards',
331+
url=''
332+
),
333+
])
306334
.addTemplate(
307335
g.template.datasource('datasource', 'prometheus', 'default', label='Data Source')
308336
)

monitoring/ceph-mixin/dashboards/osd.libsonnet

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,20 @@ local g = import 'grafonnet/grafana.libsonnet';
2424
'dashboard'
2525
)
2626
)
27+
.addLinks([
28+
$.addLinkSchema(
29+
asDropdown=true,
30+
icon='external link',
31+
includeVars=true,
32+
keepTime=true,
33+
tags=[],
34+
targetBlank=false,
35+
title='Browse Dashboards',
36+
tooltip='',
37+
type='dashboards',
38+
url=''
39+
),
40+
])
2741
.addRequired(
2842
type='grafana', id='grafana', name='Grafana', version='5.0.0'
2943
)
@@ -536,6 +550,20 @@ local g = import 'grafonnet/grafana.libsonnet';
536550
'dashboard'
537551
)
538552
)
553+
.addLinks([
554+
$.addLinkSchema(
555+
asDropdown=true,
556+
icon='external link',
557+
includeVars=true,
558+
keepTime=true,
559+
tags=[],
560+
targetBlank=false,
561+
title='Browse Dashboards',
562+
tooltip='',
563+
type='dashboards',
564+
url=''
565+
),
566+
])
539567
.addRequired(
540568
type='grafana', id='grafana', name='Grafana', version='5.3.2'
541569
)

monitoring/ceph-mixin/dashboards/pool.libsonnet

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,20 @@ local g = import 'grafonnet/grafana.libsonnet';
2323
'dashboard'
2424
)
2525
)
26+
.addLinks([
27+
$.addLinkSchema(
28+
asDropdown=true,
29+
icon='external link',
30+
includeVars=true,
31+
keepTime=true,
32+
tags=[],
33+
targetBlank=false,
34+
title='Browse Dashboards',
35+
tooltip='',
36+
type='dashboards',
37+
url=''
38+
),
39+
])
2640
.addTemplate(
2741
g.template.datasource('datasource', 'prometheus', 'default', label='Data Source')
2842
)
@@ -613,6 +627,20 @@ local g = import 'grafonnet/grafana.libsonnet';
613627
'dashboard'
614628
)
615629
)
630+
.addLinks([
631+
$.addLinkSchema(
632+
asDropdown=true,
633+
icon='external link',
634+
includeVars=true,
635+
keepTime=true,
636+
tags=[],
637+
targetBlank=false,
638+
title='Browse Dashboards',
639+
tooltip='',
640+
type='dashboards',
641+
url=''
642+
),
643+
])
616644
.addTemplate(
617645
g.template.datasource('datasource', 'prometheus', 'default', label='Data Source')
618646
)

monitoring/ceph-mixin/dashboards/rbd.libsonnet

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,20 @@ local info_rbd_stats = std.join(
5454
'dashboard'
5555
)
5656
)
57+
.addLinks([
58+
$.addLinkSchema(
59+
asDropdown=true,
60+
icon='external link',
61+
includeVars=true,
62+
keepTime=true,
63+
tags=[],
64+
targetBlank=false,
65+
title='Browse Dashboards',
66+
tooltip='',
67+
type='dashboards',
68+
url=''
69+
),
70+
])
5771
.addRequired(
5872
type='grafana', id='grafana', name='Grafana', version='5.3.3'
5973
)
@@ -183,6 +197,20 @@ local info_rbd_stats = std.join(
183197
'dashboard'
184198
)
185199
)
200+
.addLinks([
201+
$.addLinkSchema(
202+
asDropdown=true,
203+
icon='external link',
204+
includeVars=true,
205+
keepTime=true,
206+
tags=[],
207+
targetBlank=false,
208+
title='Browse Dashboards',
209+
tooltip='',
210+
type='dashboards',
211+
url=''
212+
),
213+
])
186214
.addRequired(
187215
type='grafana', id='grafana', name='Grafana', version='5.4.2'
188216
)

monitoring/ceph-mixin/dashboards/rgw-s3-analytics.libsonnet

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,20 @@ local g = import 'grafonnet/grafana.libsonnet';
2323
'dashboard'
2424
)
2525
)
26-
26+
.addLinks([
27+
$.addLinkSchema(
28+
asDropdown=true,
29+
icon='external link',
30+
includeVars=true,
31+
keepTime=true,
32+
tags=[],
33+
targetBlank=false,
34+
title='Browse Dashboards',
35+
tooltip='',
36+
type='dashboards',
37+
url=''
38+
),
39+
])
2740
.addTemplate(
2841
g.template.datasource('datasource', 'prometheus', 'default', label='Data Source')
2942
)

monitoring/ceph-mixin/dashboards/rgw.libsonnet

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,20 @@ local g = import 'grafonnet/grafana.libsonnet';
4646
'dashboard'
4747
)
4848
)
49+
.addLinks([
50+
$.addLinkSchema(
51+
asDropdown=true,
52+
icon='external link',
53+
includeVars=true,
54+
keepTime=true,
55+
tags=[],
56+
targetBlank=false,
57+
title='Browse Dashboards',
58+
tooltip='',
59+
type='dashboards',
60+
url=''
61+
),
62+
])
4963
.addRequired(
5064
type='grafana', id='grafana', name='Grafana', version='5.0.0'
5165
)
@@ -217,6 +231,20 @@ local g = import 'grafonnet/grafana.libsonnet';
217231
'dashboard'
218232
)
219233
)
234+
.addLinks([
235+
$.addLinkSchema(
236+
asDropdown=true,
237+
icon='external link',
238+
includeVars=true,
239+
keepTime=true,
240+
tags=[],
241+
targetBlank=false,
242+
title='Browse Dashboards',
243+
tooltip='',
244+
type='dashboards',
245+
url=''
246+
),
247+
])
220248
.addRequired(
221249
type='grafana', id='grafana', name='Grafana', version='5.0.0'
222250
)
@@ -725,6 +753,20 @@ local g = import 'grafonnet/grafana.libsonnet';
725753
'dashboard'
726754
)
727755
)
756+
.addLinks([
757+
$.addLinkSchema(
758+
asDropdown=true,
759+
icon='external link',
760+
includeVars=true,
761+
keepTime=true,
762+
tags=[],
763+
targetBlank=false,
764+
title='Browse Dashboards',
765+
tooltip='',
766+
type='dashboards',
767+
url=''
768+
),
769+
])
728770
.addRequired(
729771
type='grafana', id='grafana', name='Grafana', version='5.0.0'
730772
)

monitoring/ceph-mixin/dashboards_out/ceph-cluster-advanced.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,20 @@
4747
"graphTooltip": 0,
4848
"hideControls": false,
4949
"id": null,
50-
"links": [ ],
50+
"links": [
51+
{
52+
"asDropdown": true,
53+
"icon": "external link",
54+
"includeVars": true,
55+
"keepTime": true,
56+
"tags": [ ],
57+
"targetBlank": false,
58+
"title": "Browse Dashboards",
59+
"tooltip": "",
60+
"type": "dashboards",
61+
"url": ""
62+
}
63+
],
5164
"panels": [
5265
{
5366
"collapse": false,

monitoring/ceph-mixin/dashboards_out/cephfs-overview.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,20 @@
3535
"graphTooltip": 0,
3636
"hideControls": false,
3737
"id": null,
38-
"links": [ ],
38+
"links": [
39+
{
40+
"asDropdown": true,
41+
"icon": "external link",
42+
"includeVars": true,
43+
"keepTime": true,
44+
"tags": [ ],
45+
"targetBlank": false,
46+
"title": "Browse Dashboards",
47+
"tooltip": "",
48+
"type": "dashboards",
49+
"url": ""
50+
}
51+
],
3952
"panels": [
4053
{
4154
"collapse": false,

0 commit comments

Comments
 (0)