mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 14:09:41 -08:00
Merge pull request #8332 from brancz/fix-grafana-config
mixin: Scope grafana config
This commit is contained in:
commit
83c5fa1ea5
|
@ -38,7 +38,7 @@
|
||||||
// Example: @'http://test-alertmanager\..*'
|
// Example: @'http://test-alertmanager\..*'
|
||||||
nonNotifyingAlertmanagerRegEx: @'',
|
nonNotifyingAlertmanagerRegEx: @'',
|
||||||
|
|
||||||
grafana: {
|
grafanaPrometheus: {
|
||||||
prefix: 'Prometheus / ',
|
prefix: 'Prometheus / ',
|
||||||
tags: ['prometheus-mixin'],
|
tags: ['prometheus-mixin'],
|
||||||
// The default refresh time for all dashboards, default to 60s
|
// The default refresh time for all dashboards, default to 60s
|
||||||
|
|
|
@ -11,7 +11,7 @@ local template = grafana.template;
|
||||||
grafanaDashboards+:: {
|
grafanaDashboards+:: {
|
||||||
'prometheus.json':
|
'prometheus.json':
|
||||||
g.dashboard(
|
g.dashboard(
|
||||||
'%(prefix)sOverview' % $._config.grafana
|
'%(prefix)sOverview' % $._config.grafanaPrometheus
|
||||||
)
|
)
|
||||||
.addMultiTemplate('job', 'prometheus_build_info', 'job')
|
.addMultiTemplate('job', 'prometheus_build_info', 'job')
|
||||||
.addMultiTemplate('instance', 'prometheus_build_info', 'instance')
|
.addMultiTemplate('instance', 'prometheus_build_info', 'instance')
|
||||||
|
@ -99,8 +99,8 @@ local template = grafana.template;
|
||||||
g.stack,
|
g.stack,
|
||||||
)
|
)
|
||||||
) + {
|
) + {
|
||||||
tags: $._config.grafana.tags,
|
tags: $._config.grafanaPrometheus.tags,
|
||||||
refresh: $._config.grafana.refresh,
|
refresh: $._config.grafanaPrometheus.refresh,
|
||||||
},
|
},
|
||||||
// Remote write specific dashboard.
|
// Remote write specific dashboard.
|
||||||
'prometheus-remote-write.json':
|
'prometheus-remote-write.json':
|
||||||
|
@ -293,7 +293,7 @@ local template = grafana.template;
|
||||||
));
|
));
|
||||||
|
|
||||||
dashboard.new(
|
dashboard.new(
|
||||||
title='%(prefix)sRemote Write' % $._config.grafana,
|
title='%(prefix)sRemote Write' % $._config.grafanaPrometheus,
|
||||||
editable=true
|
editable=true
|
||||||
)
|
)
|
||||||
.addTemplate(
|
.addTemplate(
|
||||||
|
@ -380,8 +380,8 @@ local template = grafana.template;
|
||||||
.addPanel(retriedSamples)
|
.addPanel(retriedSamples)
|
||||||
.addPanel(enqueueRetries)
|
.addPanel(enqueueRetries)
|
||||||
) + {
|
) + {
|
||||||
tags: $._config.grafana.tags,
|
tags: $._config.grafanaPrometheus.tags,
|
||||||
refresh: $._config.grafana.refresh,
|
refresh: $._config.grafanaPrometheus.refresh,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue