mirror of
https://github.com/prometheus/node_exporter
synced 2025-02-09 22:07:02 +00:00
Add enableUseDashboards flag
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
This commit is contained in:
parent
5d7ba58c15
commit
028e679d28
@ -100,6 +100,8 @@
|
||||
dashboardTimezone: 'default',
|
||||
dashboardRefresh: '1m',
|
||||
|
||||
// Opt-in for USE method dashboards
|
||||
enableUseDashboards: true,
|
||||
// Opt-in for multi-cluster support (USE method).
|
||||
showMultiCluster: true,
|
||||
//used in USE dashboards only. For others, add cluster label to groupLabels var.
|
||||
|
@ -104,63 +104,71 @@ local logslib = import 'github.com/grafana/jsonnet-libs/logs-lib/logs/main.libso
|
||||
)
|
||||
)
|
||||
+ root.applyCommon(vars.singleInstance, uid + '-disk', tags, links, annotations, timezone, refresh, period),
|
||||
|
||||
'node-rsrc-use.json':
|
||||
g.dashboard.new(prefix + 'USE method / node')
|
||||
+ g.dashboard.withPanels(
|
||||
g.util.panel.resolveCollapsedFlagOnRows(
|
||||
g.util.grid.wrapPanels(
|
||||
[
|
||||
rows.use.cpuUseMethod,
|
||||
rows.use.memoryUseMethod,
|
||||
rows.use.networkUseMethod,
|
||||
rows.use.diskUseMethod,
|
||||
rows.use.filesystemUseMethod,
|
||||
], 12, 7
|
||||
)
|
||||
)
|
||||
)
|
||||
+ root.applyCommon(this.grafana.variables.use.singleInstance, std.md5(uid + '-cluster-rsrc-use.json'), tags, links, annotations, timezone, refresh, period),
|
||||
|
||||
'node-cluster-rsrc-use.json':
|
||||
g.dashboard.new(prefix + 'USE method / cluster')
|
||||
+ g.dashboard.withPanels(
|
||||
g.util.panel.resolveCollapsedFlagOnRows(
|
||||
g.util.grid.wrapPanels(
|
||||
[
|
||||
rows.use.cpuUseClusterMethod,
|
||||
rows.use.memoryUseClusterMethod,
|
||||
rows.use.networkUseClusterMethod,
|
||||
rows.use.diskUseClusterMethod,
|
||||
rows.use.filesystemUseClusterMethod,
|
||||
], 12, 7
|
||||
)
|
||||
)
|
||||
)
|
||||
+ root.applyCommon(this.grafana.variables.useCluster.singleInstance, std.md5(uid + '-cluster-rsrc-use.json'), tags, links, annotations, timezone, refresh, period),
|
||||
}
|
||||
+
|
||||
(
|
||||
if this.config.showMultiCluster
|
||||
if this.config.enableUseDashboards
|
||||
then
|
||||
|
||||
{
|
||||
'node-multicluster-rsrc-use.json':
|
||||
g.dashboard.new(prefix + 'USE method / Multi-cluster')
|
||||
'node-rsrc-use.json':
|
||||
g.dashboard.new(prefix + 'USE method / node')
|
||||
+ g.dashboard.withPanels(
|
||||
g.util.panel.resolveCollapsedFlagOnRows(
|
||||
g.util.grid.wrapPanels(
|
||||
[
|
||||
rows.use.cpuUseClusterMethodMulti,
|
||||
rows.use.memoryUseClusterMethodMulti,
|
||||
rows.use.networkUseClusterMethodMulti,
|
||||
rows.use.diskUseClusterMethodMulti,
|
||||
rows.use.filesystemUseClusterMethodMulti,
|
||||
rows.use.cpuUseMethod,
|
||||
rows.use.memoryUseMethod,
|
||||
rows.use.networkUseMethod,
|
||||
rows.use.diskUseMethod,
|
||||
rows.use.filesystemUseMethod,
|
||||
], 12, 7
|
||||
)
|
||||
)
|
||||
)
|
||||
+ root.applyCommon(this.grafana.variables.useCluster.multiInstance, std.md5(uid + '-multicluster-rsrc-use.json'), tags, links, annotations, timezone, refresh, period),
|
||||
+ root.applyCommon(this.grafana.variables.use.singleInstance, std.md5(uid + '-cluster-rsrc-use.json'), tags, links, annotations, timezone, refresh, period),
|
||||
|
||||
'node-cluster-rsrc-use.json':
|
||||
g.dashboard.new(prefix + 'USE method / cluster')
|
||||
+ g.dashboard.withPanels(
|
||||
g.util.panel.resolveCollapsedFlagOnRows(
|
||||
g.util.grid.wrapPanels(
|
||||
[
|
||||
rows.use.cpuUseClusterMethod,
|
||||
rows.use.memoryUseClusterMethod,
|
||||
rows.use.networkUseClusterMethod,
|
||||
rows.use.diskUseClusterMethod,
|
||||
rows.use.filesystemUseClusterMethod,
|
||||
], 12, 7
|
||||
)
|
||||
)
|
||||
)
|
||||
+ root.applyCommon(this.grafana.variables.useCluster.singleInstance, std.md5(uid + '-cluster-rsrc-use.json'), tags, links, annotations, timezone, refresh, period),
|
||||
}
|
||||
+
|
||||
(
|
||||
if this.config.showMultiCluster
|
||||
then
|
||||
{
|
||||
'node-multicluster-rsrc-use.json':
|
||||
g.dashboard.new(prefix + 'USE method / multi-cluster')
|
||||
+ g.dashboard.withPanels(
|
||||
g.util.panel.resolveCollapsedFlagOnRows(
|
||||
g.util.grid.wrapPanels(
|
||||
[
|
||||
rows.use.cpuUseClusterMethodMulti,
|
||||
rows.use.memoryUseClusterMethodMulti,
|
||||
rows.use.networkUseClusterMethodMulti,
|
||||
rows.use.diskUseClusterMethodMulti,
|
||||
rows.use.filesystemUseClusterMethodMulti,
|
||||
], 12, 7
|
||||
)
|
||||
)
|
||||
)
|
||||
+ root.applyCommon(this.grafana.variables.useCluster.multiInstance, std.md5(uid + '-multicluster-rsrc-use.json'), tags, links, annotations, timezone, refresh, period),
|
||||
}
|
||||
else {}
|
||||
)
|
||||
else {}
|
||||
)
|
||||
+
|
||||
|
Loading…
Reference in New Issue
Block a user