Browse Source

Merge pull request #8332 from brancz/fix-grafana-config

mixin: Scope grafana config
pull/8334/head
Frederic Branczyk 4 years ago committed by GitHub
parent
commit
83c5fa1ea5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      documentation/prometheus-mixin/config.libsonnet
  2. 12
      documentation/prometheus-mixin/dashboards.libsonnet

2
documentation/prometheus-mixin/config.libsonnet

@ -38,7 +38,7 @@
// Example: @'http://test-alertmanager\..*'
nonNotifyingAlertmanagerRegEx: @'',
grafana: {
grafanaPrometheus: {
prefix: 'Prometheus / ',
tags: ['prometheus-mixin'],
// The default refresh time for all dashboards, default to 60s

12
documentation/prometheus-mixin/dashboards.libsonnet

@ -11,7 +11,7 @@ local template = grafana.template;
grafanaDashboards+:: {
'prometheus.json':
g.dashboard(
'%(prefix)sOverview' % $._config.grafana
'%(prefix)sOverview' % $._config.grafanaPrometheus
)
.addMultiTemplate('job', 'prometheus_build_info', 'job')
.addMultiTemplate('instance', 'prometheus_build_info', 'instance')
@ -99,8 +99,8 @@ local template = grafana.template;
g.stack,
)
) + {
tags: $._config.grafana.tags,
refresh: $._config.grafana.refresh,
tags: $._config.grafanaPrometheus.tags,
refresh: $._config.grafanaPrometheus.refresh,
},
// Remote write specific dashboard.
'prometheus-remote-write.json':
@ -293,7 +293,7 @@ local template = grafana.template;
));
dashboard.new(
title='%(prefix)sRemote Write' % $._config.grafana,
title='%(prefix)sRemote Write' % $._config.grafanaPrometheus,
editable=true
)
.addTemplate(
@ -380,8 +380,8 @@ local template = grafana.template;
.addPanel(retriedSamples)
.addPanel(enqueueRetries)
) + {
tags: $._config.grafana.tags,
refresh: $._config.grafana.refresh,
tags: $._config.grafanaPrometheus.tags,
refresh: $._config.grafanaPrometheus.refresh,
},
},
}

Loading…
Cancel
Save