From bd648827fe430b2c61c19cff792cdc1e5abbaba5 Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Fri, 11 May 2018 14:40:20 +0100 Subject: [PATCH] Remove k8s from dashboard title, make gauges use datasource variable. Signed-off-by: Tom Wilkie --- node-mixin/dashboards/use.libsonnet | 4 ++-- node-mixin/lib/promgrafonnet/gauge.libsonnet | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/node-mixin/dashboards/use.libsonnet b/node-mixin/dashboards/use.libsonnet index 9231a746..eeb72093 100644 --- a/node-mixin/dashboards/use.libsonnet +++ b/node-mixin/dashboards/use.libsonnet @@ -84,8 +84,8 @@ local g = import 'grafana-builder/grafana.libsonnet'; ), ), - 'k8s-node-rsrc-use.json': - g.dashboard('K8s / USE Method / Node') + 'node-rsrc-use.json': + g.dashboard('USE Method / Node') .addTemplate('instance', 'up{%(nodeExporterSelector)s}' % $._config, 'instance') .addRow( g.row('CPU') diff --git a/node-mixin/lib/promgrafonnet/gauge.libsonnet b/node-mixin/lib/promgrafonnet/gauge.libsonnet index f69a5cdc..43640b6d 100644 --- a/node-mixin/lib/promgrafonnet/gauge.libsonnet +++ b/node-mixin/lib/promgrafonnet/gauge.libsonnet @@ -6,7 +6,7 @@ local prometheus = grafana.prometheus; new(title, query):: singlestat.new( title, - datasource='prometheus', + datasource='$datasource', span=3, format='percentunit', valueName='current',