diff --git a/monitoring-as-code/src/dashboards/dashboard-standard-elements.libsonnet b/monitoring-as-code/src/dashboards/dashboard-standard-elements.libsonnet index e51b4c01..57ba6d02 100644 --- a/monitoring-as-code/src/dashboards/dashboard-standard-elements.libsonnet +++ b/monitoring-as-code/src/dashboards/dashboard-standard-elements.libsonnet @@ -27,11 +27,11 @@ local createDocsTextPanel(dashboardName) = // Creates a common set of Grafana dashboard tags for dashboard discovery. // @param config The global config for the product having its standard tags created. // @returns string of comma seperated dashboard tags. -local createDashboardTags(config) = - "product:%(product)s,owner:%(owner)s,mac-version:%(macVersion)s" % { - product: config.product, - owner: config.owner, - macVersion: config.macVersion, +local createDashboardTags(config) = + 'product:%(product)s,owner:%(owner)s,mac-version:%(macVersion)s' % { + product: config.product, + owner: config.owner, + macVersion: config.macVersion, }; // Creates the description for an SLI diff --git a/monitoring-as-code/src/dashboards/detail-dashboard.libsonnet b/monitoring-as-code/src/dashboards/detail-dashboard.libsonnet index 9b52512a..708b84be 100644 --- a/monitoring-as-code/src/dashboards/detail-dashboard.libsonnet +++ b/monitoring-as-code/src/dashboards/detail-dashboard.libsonnet @@ -2,8 +2,8 @@ // what the service is doing // MaC imports -local stringFormattingFunctions = import '../util/string-formatting-functions.libsonnet'; local macConfig = import '../mac-config.libsonnet'; +local stringFormattingFunctions = import '../util/string-formatting-functions.libsonnet'; local dashboardFunctions = import './dashboard-standard-elements.libsonnet'; // Grafana imports @@ -301,7 +301,7 @@ local createDetailDashboard(journeyKey, config, links, sliSpecList) = dashboard.new( title=stringFormattingFunctions.capitaliseFirstLetters(std.join(' / ', [macConfig.macDashboardPrefix.title, config.product, journeyKey, 'detail'])), uid=std.join('-', [macConfig.macDashboardPrefix.uid, config.product, journeyKey, 'detail']), - tags=std.split(dashboardFunctions.createDashboardTags(config), ",") + ['journey:'+journeyKey, 'view:detail'], + tags=std.split(dashboardFunctions.createDashboardTags(config), ',') + ['journey:' + journeyKey, 'view:detail'], schemaVersion=18, editable=true, time_from='now-3h', diff --git a/monitoring-as-code/src/dashboards/journey-dashboard.libsonnet b/monitoring-as-code/src/dashboards/journey-dashboard.libsonnet index 88704853..acbcb284 100644 --- a/monitoring-as-code/src/dashboards/journey-dashboard.libsonnet +++ b/monitoring-as-code/src/dashboards/journey-dashboard.libsonnet @@ -63,7 +63,7 @@ local createJourneyDashboards(config, sliList, links) = dashboard.new( title=stringFormattingFunctions.capitaliseFirstLetters(std.join(' / ', [macConfig.macDashboardPrefix.title, config.product, journeyKey])), uid=std.join('-', [macConfig.macDashboardPrefix.uid, config.product, journeyKey]), - tags=std.split(dashboardFunctions.createDashboardTags(config), ",") + ['journey:'+journeyKey, 'view:journey'], + tags=std.split(dashboardFunctions.createDashboardTags(config), ',') + ['journey:' + journeyKey, 'view:journey'], schemaVersion=18, editable=true, time_from='now-3h', diff --git a/monitoring-as-code/src/dashboards/product-dashboard.libsonnet b/monitoring-as-code/src/dashboards/product-dashboard.libsonnet index 365a57eb..4953b8b8 100644 --- a/monitoring-as-code/src/dashboards/product-dashboard.libsonnet +++ b/monitoring-as-code/src/dashboards/product-dashboard.libsonnet @@ -179,7 +179,7 @@ local createProductDashboard(config, sliList, links) = dashboard.new( title=stringFormattingFunctions.capitaliseFirstLetters(std.join(' / ', [macConfig.macDashboardPrefix.title, config.product])), uid=std.join('-', [macConfig.macDashboardPrefix.uid, config.product]), - tags=std.split(dashboardFunctions.createDashboardTags(config), ",") + ['view:product'], + tags=std.split(dashboardFunctions.createDashboardTags(config), ',') + ['view:product'], schemaVersion=18, editable=true, time_from='now-3h',