From: Piyush Agarwal Date: Thu, 30 Jan 2025 09:12:37 +0000 (+0530) Subject: mgr/dashboard: Add 'Browse Dashboards' button in Grafana dashboards X-Git-Tag: testing/wip-pdonnell-testing-20250205.170831-debug~19^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=7f25376e933c0302926a865b93b0abb1cd3ba0a5;p=ceph-ci.git mgr/dashboard: Add 'Browse Dashboards' button in Grafana dashboards Fixes: https://tracker.ceph.com/issues/69727 Signed-off-by: Piyush Agarwal --- diff --git a/monitoring/ceph-mixin/dashboards/ceph-cluster.libsonnet b/monitoring/ceph-mixin/dashboards/ceph-cluster.libsonnet index a6991f54cde..6b5baff3f56 100644 --- a/monitoring/ceph-mixin/dashboards/ceph-cluster.libsonnet +++ b/monitoring/ceph-mixin/dashboards/ceph-cluster.libsonnet @@ -59,7 +59,20 @@ local g = import 'grafonnet/grafana.libsonnet'; ], auto=true, ) - ).addPanels( + ).addLinks([ + $.addLinkSchema( + asDropdown=true, + icon='external link', + includeVars=true, + keepTime=true, + tags=[], + targetBlank=false, + title='Browse Dashboards', + tooltip='', + type='dashboards', + url='' + ), + ]).addPanels( [ $.addRowSchema(collapse=false, showTitle=true, title='CLUSTER STATE') + { gridPos: { x: 0, y: 0, w: 24, h: 1 } }, $.addStatPanel( diff --git a/monitoring/ceph-mixin/dashboards/cephfs.libsonnet b/monitoring/ceph-mixin/dashboards/cephfs.libsonnet index 11548ef2a9d..508ab185fcf 100644 --- a/monitoring/ceph-mixin/dashboards/cephfs.libsonnet +++ b/monitoring/ceph-mixin/dashboards/cephfs.libsonnet @@ -45,6 +45,20 @@ local g = import 'grafonnet/grafana.libsonnet'; 'MDS Server', '') ) + .addLinks([ + $.addLinkSchema( + asDropdown=true, + icon='external link', + includeVars=true, + keepTime=true, + tags=[], + targetBlank=false, + title='Browse Dashboards', + tooltip='', + type='dashboards', + url='' + ), + ]) .addPanels([ $.addRowSchema(false, true, 'MDS Performance') + { gridPos: { x: 0, y: 0, w: 24, h: 1 } }, $.simpleGraphPanel( diff --git a/monitoring/ceph-mixin/dashboards/host.libsonnet b/monitoring/ceph-mixin/dashboards/host.libsonnet index cf7e045695a..9c8016ceffc 100644 --- a/monitoring/ceph-mixin/dashboards/host.libsonnet +++ b/monitoring/ceph-mixin/dashboards/host.libsonnet @@ -32,6 +32,20 @@ local g = import 'grafonnet/grafana.libsonnet'; 'dashboard' ) ) + .addLinks([ + $.addLinkSchema( + asDropdown=true, + icon='external link', + includeVars=true, + keepTime=true, + tags=[], + targetBlank=false, + title='Browse Dashboards', + tooltip='', + type='dashboards', + url='' + ), + ]) .addTemplate( g.template.datasource('datasource', 'prometheus', @@ -303,6 +317,20 @@ local g = import 'grafonnet/grafana.libsonnet'; 1, '-- Grafana --', true, true, 'rgba(0, 211, 255, 1)', 'Annotations & Alerts', 'dashboard' ) ) + .addLinks([ + $.addLinkSchema( + asDropdown=true, + icon='external link', + includeVars=true, + keepTime=true, + tags=[], + targetBlank=false, + title='Browse Dashboards', + tooltip='', + type='dashboards', + url='' + ), + ]) .addTemplate( g.template.datasource('datasource', 'prometheus', 'default', label='Data Source') ) diff --git a/monitoring/ceph-mixin/dashboards/osd.libsonnet b/monitoring/ceph-mixin/dashboards/osd.libsonnet index 2b066ea5ff0..db6b75d9ada 100644 --- a/monitoring/ceph-mixin/dashboards/osd.libsonnet +++ b/monitoring/ceph-mixin/dashboards/osd.libsonnet @@ -24,6 +24,20 @@ local g = import 'grafonnet/grafana.libsonnet'; 'dashboard' ) ) + .addLinks([ + $.addLinkSchema( + asDropdown=true, + icon='external link', + includeVars=true, + keepTime=true, + tags=[], + targetBlank=false, + title='Browse Dashboards', + tooltip='', + type='dashboards', + url='' + ), + ]) .addRequired( type='grafana', id='grafana', name='Grafana', version='5.0.0' ) @@ -536,6 +550,20 @@ local g = import 'grafonnet/grafana.libsonnet'; 'dashboard' ) ) + .addLinks([ + $.addLinkSchema( + asDropdown=true, + icon='external link', + includeVars=true, + keepTime=true, + tags=[], + targetBlank=false, + title='Browse Dashboards', + tooltip='', + type='dashboards', + url='' + ), + ]) .addRequired( type='grafana', id='grafana', name='Grafana', version='5.3.2' ) diff --git a/monitoring/ceph-mixin/dashboards/pool.libsonnet b/monitoring/ceph-mixin/dashboards/pool.libsonnet index 06832114046..48f4bb58d21 100644 --- a/monitoring/ceph-mixin/dashboards/pool.libsonnet +++ b/monitoring/ceph-mixin/dashboards/pool.libsonnet @@ -23,6 +23,20 @@ local g = import 'grafonnet/grafana.libsonnet'; 'dashboard' ) ) + .addLinks([ + $.addLinkSchema( + asDropdown=true, + icon='external link', + includeVars=true, + keepTime=true, + tags=[], + targetBlank=false, + title='Browse Dashboards', + tooltip='', + type='dashboards', + url='' + ), + ]) .addTemplate( g.template.datasource('datasource', 'prometheus', 'default', label='Data Source') ) @@ -613,6 +627,20 @@ local g = import 'grafonnet/grafana.libsonnet'; 'dashboard' ) ) + .addLinks([ + $.addLinkSchema( + asDropdown=true, + icon='external link', + includeVars=true, + keepTime=true, + tags=[], + targetBlank=false, + title='Browse Dashboards', + tooltip='', + type='dashboards', + url='' + ), + ]) .addTemplate( g.template.datasource('datasource', 'prometheus', 'default', label='Data Source') ) diff --git a/monitoring/ceph-mixin/dashboards/rbd.libsonnet b/monitoring/ceph-mixin/dashboards/rbd.libsonnet index bcb8a28cfe5..635d71ad03f 100644 --- a/monitoring/ceph-mixin/dashboards/rbd.libsonnet +++ b/monitoring/ceph-mixin/dashboards/rbd.libsonnet @@ -54,6 +54,20 @@ local info_rbd_stats = std.join( 'dashboard' ) ) + .addLinks([ + $.addLinkSchema( + asDropdown=true, + icon='external link', + includeVars=true, + keepTime=true, + tags=[], + targetBlank=false, + title='Browse Dashboards', + tooltip='', + type='dashboards', + url='' + ), + ]) .addRequired( type='grafana', id='grafana', name='Grafana', version='5.3.3' ) @@ -183,6 +197,20 @@ local info_rbd_stats = std.join( 'dashboard' ) ) + .addLinks([ + $.addLinkSchema( + asDropdown=true, + icon='external link', + includeVars=true, + keepTime=true, + tags=[], + targetBlank=false, + title='Browse Dashboards', + tooltip='', + type='dashboards', + url='' + ), + ]) .addRequired( type='grafana', id='grafana', name='Grafana', version='5.4.2' ) diff --git a/monitoring/ceph-mixin/dashboards/rgw-s3-analytics.libsonnet b/monitoring/ceph-mixin/dashboards/rgw-s3-analytics.libsonnet index 720ffcb60a1..e67b26710db 100644 --- a/monitoring/ceph-mixin/dashboards/rgw-s3-analytics.libsonnet +++ b/monitoring/ceph-mixin/dashboards/rgw-s3-analytics.libsonnet @@ -23,7 +23,20 @@ local g = import 'grafonnet/grafana.libsonnet'; 'dashboard' ) ) - + .addLinks([ + $.addLinkSchema( + asDropdown=true, + icon='external link', + includeVars=true, + keepTime=true, + tags=[], + targetBlank=false, + title='Browse Dashboards', + tooltip='', + type='dashboards', + url='' + ), + ]) .addTemplate( g.template.datasource('datasource', 'prometheus', 'default', label='Data Source') ) diff --git a/monitoring/ceph-mixin/dashboards/rgw.libsonnet b/monitoring/ceph-mixin/dashboards/rgw.libsonnet index c0c548b79c8..25b3a7a4529 100644 --- a/monitoring/ceph-mixin/dashboards/rgw.libsonnet +++ b/monitoring/ceph-mixin/dashboards/rgw.libsonnet @@ -46,6 +46,20 @@ local g = import 'grafonnet/grafana.libsonnet'; 'dashboard' ) ) + .addLinks([ + $.addLinkSchema( + asDropdown=true, + icon='external link', + includeVars=true, + keepTime=true, + tags=[], + targetBlank=false, + title='Browse Dashboards', + tooltip='', + type='dashboards', + url='' + ), + ]) .addRequired( type='grafana', id='grafana', name='Grafana', version='5.0.0' ) @@ -217,6 +231,20 @@ local g = import 'grafonnet/grafana.libsonnet'; 'dashboard' ) ) + .addLinks([ + $.addLinkSchema( + asDropdown=true, + icon='external link', + includeVars=true, + keepTime=true, + tags=[], + targetBlank=false, + title='Browse Dashboards', + tooltip='', + type='dashboards', + url='' + ), + ]) .addRequired( type='grafana', id='grafana', name='Grafana', version='5.0.0' ) @@ -725,6 +753,20 @@ local g = import 'grafonnet/grafana.libsonnet'; 'dashboard' ) ) + .addLinks([ + $.addLinkSchema( + asDropdown=true, + icon='external link', + includeVars=true, + keepTime=true, + tags=[], + targetBlank=false, + title='Browse Dashboards', + tooltip='', + type='dashboards', + url='' + ), + ]) .addRequired( type='grafana', id='grafana', name='Grafana', version='5.0.0' ) diff --git a/monitoring/ceph-mixin/dashboards_out/ceph-cluster-advanced.json b/monitoring/ceph-mixin/dashboards_out/ceph-cluster-advanced.json index ff31ebf23ba..da2f676b202 100644 --- a/monitoring/ceph-mixin/dashboards_out/ceph-cluster-advanced.json +++ b/monitoring/ceph-mixin/dashboards_out/ceph-cluster-advanced.json @@ -47,7 +47,20 @@ "graphTooltip": 0, "hideControls": false, "id": null, - "links": [ ], + "links": [ + { + "asDropdown": true, + "icon": "external link", + "includeVars": true, + "keepTime": true, + "tags": [ ], + "targetBlank": false, + "title": "Browse Dashboards", + "tooltip": "", + "type": "dashboards", + "url": "" + } + ], "panels": [ { "collapse": false, diff --git a/monitoring/ceph-mixin/dashboards_out/cephfs-overview.json b/monitoring/ceph-mixin/dashboards_out/cephfs-overview.json index f65ce4da613..a076dd7c3c3 100644 --- a/monitoring/ceph-mixin/dashboards_out/cephfs-overview.json +++ b/monitoring/ceph-mixin/dashboards_out/cephfs-overview.json @@ -35,7 +35,20 @@ "graphTooltip": 0, "hideControls": false, "id": null, - "links": [ ], + "links": [ + { + "asDropdown": true, + "icon": "external link", + "includeVars": true, + "keepTime": true, + "tags": [ ], + "targetBlank": false, + "title": "Browse Dashboards", + "tooltip": "", + "type": "dashboards", + "url": "" + } + ], "panels": [ { "collapse": false, diff --git a/monitoring/ceph-mixin/dashboards_out/host-details.json b/monitoring/ceph-mixin/dashboards_out/host-details.json index ef357d34b64..291b0edd6b8 100644 --- a/monitoring/ceph-mixin/dashboards_out/host-details.json +++ b/monitoring/ceph-mixin/dashboards_out/host-details.json @@ -41,7 +41,20 @@ "graphTooltip": 0, "hideControls": false, "id": null, - "links": [ ], + "links": [ + { + "asDropdown": true, + "icon": "external link", + "includeVars": true, + "keepTime": true, + "tags": [ ], + "targetBlank": false, + "title": "Browse Dashboards", + "tooltip": "", + "type": "dashboards", + "url": "" + } + ], "panels": [ { "collapse": false, diff --git a/monitoring/ceph-mixin/dashboards_out/hosts-overview.json b/monitoring/ceph-mixin/dashboards_out/hosts-overview.json index adbf676f5e9..eba9069590d 100644 --- a/monitoring/ceph-mixin/dashboards_out/hosts-overview.json +++ b/monitoring/ceph-mixin/dashboards_out/hosts-overview.json @@ -41,7 +41,20 @@ "graphTooltip": 0, "hideControls": false, "id": null, - "links": [ ], + "links": [ + { + "asDropdown": true, + "icon": "external link", + "includeVars": true, + "keepTime": true, + "tags": [ ], + "targetBlank": false, + "title": "Browse Dashboards", + "tooltip": "", + "type": "dashboards", + "url": "" + } + ], "panels": [ { "cacheTimeout": null, diff --git a/monitoring/ceph-mixin/dashboards_out/osd-device-details.json b/monitoring/ceph-mixin/dashboards_out/osd-device-details.json index 60f1ecc5ad0..603bc2796c9 100644 --- a/monitoring/ceph-mixin/dashboards_out/osd-device-details.json +++ b/monitoring/ceph-mixin/dashboards_out/osd-device-details.json @@ -35,7 +35,20 @@ "graphTooltip": 0, "hideControls": false, "id": null, - "links": [ ], + "links": [ + { + "asDropdown": true, + "icon": "external link", + "includeVars": true, + "keepTime": true, + "tags": [ ], + "targetBlank": false, + "title": "Browse Dashboards", + "tooltip": "", + "type": "dashboards", + "url": "" + } + ], "panels": [ { "collapse": false, diff --git a/monitoring/ceph-mixin/dashboards_out/osds-overview.json b/monitoring/ceph-mixin/dashboards_out/osds-overview.json index 948f0d721b6..e6e8e707ac7 100644 --- a/monitoring/ceph-mixin/dashboards_out/osds-overview.json +++ b/monitoring/ceph-mixin/dashboards_out/osds-overview.json @@ -47,7 +47,20 @@ "graphTooltip": 0, "hideControls": false, "id": null, - "links": [ ], + "links": [ + { + "asDropdown": true, + "icon": "external link", + "includeVars": true, + "keepTime": true, + "tags": [ ], + "targetBlank": false, + "title": "Browse Dashboards", + "tooltip": "", + "type": "dashboards", + "url": "" + } + ], "panels": [ { "aliasColors": { diff --git a/monitoring/ceph-mixin/dashboards_out/pool-detail.json b/monitoring/ceph-mixin/dashboards_out/pool-detail.json index 5e5bf6e9b8b..327f59ec846 100644 --- a/monitoring/ceph-mixin/dashboards_out/pool-detail.json +++ b/monitoring/ceph-mixin/dashboards_out/pool-detail.json @@ -41,7 +41,20 @@ "graphTooltip": 0, "hideControls": false, "id": null, - "links": [ ], + "links": [ + { + "asDropdown": true, + "icon": "external link", + "includeVars": true, + "keepTime": true, + "tags": [ ], + "targetBlank": false, + "title": "Browse Dashboards", + "tooltip": "", + "type": "dashboards", + "url": "" + } + ], "panels": [ { "cacheTimeout": null, diff --git a/monitoring/ceph-mixin/dashboards_out/pool-overview.json b/monitoring/ceph-mixin/dashboards_out/pool-overview.json index fa32b3368cf..5213b287a01 100644 --- a/monitoring/ceph-mixin/dashboards_out/pool-overview.json +++ b/monitoring/ceph-mixin/dashboards_out/pool-overview.json @@ -22,7 +22,20 @@ "graphTooltip": 0, "hideControls": false, "id": null, - "links": [ ], + "links": [ + { + "asDropdown": true, + "icon": "external link", + "includeVars": true, + "keepTime": true, + "tags": [ ], + "targetBlank": false, + "title": "Browse Dashboards", + "tooltip": "", + "type": "dashboards", + "url": "" + } + ], "panels": [ { "cacheTimeout": null, diff --git a/monitoring/ceph-mixin/dashboards_out/radosgw-detail.json b/monitoring/ceph-mixin/dashboards_out/radosgw-detail.json index 35de6b09b75..e2af1ebde82 100644 --- a/monitoring/ceph-mixin/dashboards_out/radosgw-detail.json +++ b/monitoring/ceph-mixin/dashboards_out/radosgw-detail.json @@ -41,7 +41,20 @@ "graphTooltip": 0, "hideControls": false, "id": null, - "links": [ ], + "links": [ + { + "asDropdown": true, + "icon": "external link", + "includeVars": true, + "keepTime": true, + "tags": [ ], + "targetBlank": false, + "title": "Browse Dashboards", + "tooltip": "", + "type": "dashboards", + "url": "" + } + ], "panels": [ { "collapse": false, diff --git a/monitoring/ceph-mixin/dashboards_out/radosgw-overview.json b/monitoring/ceph-mixin/dashboards_out/radosgw-overview.json index 5bf8279c27c..8f357d7f4f8 100644 --- a/monitoring/ceph-mixin/dashboards_out/radosgw-overview.json +++ b/monitoring/ceph-mixin/dashboards_out/radosgw-overview.json @@ -35,7 +35,20 @@ "graphTooltip": 0, "hideControls": false, "id": null, - "links": [ ], + "links": [ + { + "asDropdown": true, + "icon": "external link", + "includeVars": true, + "keepTime": true, + "tags": [ ], + "targetBlank": false, + "title": "Browse Dashboards", + "tooltip": "", + "type": "dashboards", + "url": "" + } + ], "panels": [ { "collapse": false, diff --git a/monitoring/ceph-mixin/dashboards_out/radosgw-sync-overview.json b/monitoring/ceph-mixin/dashboards_out/radosgw-sync-overview.json index a7550d27c9e..cb6e87ecbef 100644 --- a/monitoring/ceph-mixin/dashboards_out/radosgw-sync-overview.json +++ b/monitoring/ceph-mixin/dashboards_out/radosgw-sync-overview.json @@ -35,7 +35,20 @@ "graphTooltip": 0, "hideControls": false, "id": null, - "links": [ ], + "links": [ + { + "asDropdown": true, + "icon": "external link", + "includeVars": true, + "keepTime": true, + "tags": [ ], + "targetBlank": false, + "title": "Browse Dashboards", + "tooltip": "", + "type": "dashboards", + "url": "" + } + ], "panels": [ { "aliasColors": { }, diff --git a/monitoring/ceph-mixin/dashboards_out/rbd-details.json b/monitoring/ceph-mixin/dashboards_out/rbd-details.json index 500c51f4ba9..ee414694a53 100644 --- a/monitoring/ceph-mixin/dashboards_out/rbd-details.json +++ b/monitoring/ceph-mixin/dashboards_out/rbd-details.json @@ -35,7 +35,20 @@ "graphTooltip": 0, "hideControls": false, "id": null, - "links": [ ], + "links": [ + { + "asDropdown": true, + "icon": "external link", + "includeVars": true, + "keepTime": true, + "tags": [ ], + "targetBlank": false, + "title": "Browse Dashboards", + "tooltip": "", + "type": "dashboards", + "url": "" + } + ], "panels": [ { "aliasColors": { }, diff --git a/monitoring/ceph-mixin/dashboards_out/rbd-overview.json b/monitoring/ceph-mixin/dashboards_out/rbd-overview.json index 34666c67b29..1d50716f58a 100644 --- a/monitoring/ceph-mixin/dashboards_out/rbd-overview.json +++ b/monitoring/ceph-mixin/dashboards_out/rbd-overview.json @@ -47,7 +47,20 @@ "graphTooltip": 0, "hideControls": false, "id": null, - "links": [ ], + "links": [ + { + "asDropdown": true, + "icon": "external link", + "includeVars": true, + "keepTime": true, + "tags": [ ], + "targetBlank": false, + "title": "Browse Dashboards", + "tooltip": "", + "type": "dashboards", + "url": "" + } + ], "panels": [ { "aliasColors": { }, diff --git a/monitoring/ceph-mixin/dashboards_out/rgw-s3-analytics.json b/monitoring/ceph-mixin/dashboards_out/rgw-s3-analytics.json index 397279f5455..92820558309 100644 --- a/monitoring/ceph-mixin/dashboards_out/rgw-s3-analytics.json +++ b/monitoring/ceph-mixin/dashboards_out/rgw-s3-analytics.json @@ -22,7 +22,20 @@ "graphTooltip": 0, "hideControls": false, "id": null, - "links": [ ], + "links": [ + { + "asDropdown": true, + "icon": "external link", + "includeVars": true, + "keepTime": true, + "tags": [ ], + "targetBlank": false, + "title": "Browse Dashboards", + "tooltip": "", + "type": "dashboards", + "url": "" + } + ], "panels": [ { "collapse": false,