diff --git a/documentation/prometheus-mixin/config.libsonnet b/documentation/prometheus-mixin/config.libsonnet index 6b0c2f9f1..85a2048e0 100644 --- a/documentation/prometheus-mixin/config.libsonnet +++ b/documentation/prometheus-mixin/config.libsonnet @@ -37,5 +37,12 @@ // expression is matched against the `alertmanager` label. // Example: @'http://test-alertmanager\..*' nonNotifyingAlertmanagerRegEx: @'', + + grafana: { + prefix: 'Prometheus / ', + tags: ['prometheus-mixin'], + // The default refresh time for all dashboards, default to 60s + refresh: '60s', + }, }, } diff --git a/documentation/prometheus-mixin/dashboards.libsonnet b/documentation/prometheus-mixin/dashboards.libsonnet index 0e08acee5..e5f7cc5c0 100644 --- a/documentation/prometheus-mixin/dashboards.libsonnet +++ b/documentation/prometheus-mixin/dashboards.libsonnet @@ -10,7 +10,9 @@ local template = grafana.template; { grafanaDashboards+:: { 'prometheus.json': - g.dashboard('Prometheus Overview') + g.dashboard( + '%(prefix)sOverview' % $._config.grafana + ) .addMultiTemplate('job', 'prometheus_build_info', 'job') .addMultiTemplate('instance', 'prometheus_build_info', 'instance') .addRow( @@ -96,7 +98,10 @@ local template = grafana.template; { yaxes: g.yaxes('ms') } + g.stack, ) - ), + ) + { + tags: $._config.grafana.tags, + refresh: $._config.grafana.refresh, + }, // Remote write specific dashboard. 'prometheus-remote-write.json': local timestampComparison = @@ -287,8 +292,10 @@ local template = grafana.template; legendFormat='{{cluster}}:{{instance}} {{remote_name}}:{{url}}' )); - dashboard.new('Prometheus Remote Write', - editable=true) + dashboard.new( + title='%(prefix)sRemote Write' % $._config.grafana, + editable=true + ) .addTemplate( { hide: 0, @@ -372,6 +379,9 @@ local template = grafana.template; .addPanel(failedSamples) .addPanel(retriedSamples) .addPanel(enqueueRetries) - ), + ) + { + tags: $._config.grafana.tags, + refresh: $._config.grafana.refresh, + }, }, }