Skip to content

Commit

Permalink
fix all ids
Browse files Browse the repository at this point in the history
  • Loading branch information
vishiy committed Aug 25, 2022
1 parent d7e8ee2 commit c6649a9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion mixins/kubernetes/dashboards/defaults.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
// of the file name and set the timezone to be 'default'.
grafanaDashboards:: {
[filename]: grafanaDashboards[filename] {
uid: std.md5(filename),
[if filename == 'kubelet.json' then 'uid']: ($._config.grafanaDashboardIDs['kubelet.json']),
[if filename != 'kubelet.json' then 'uid']: std.md5(filename),
timezone: kubernetesMixin._config.grafanaK8s.grafanaTimezone,
refresh: kubernetesMixin._config.grafanaK8s.refresh,
tags: kubernetesMixin._config.grafanaK8s.dashboardTags,
Expand Down
3 changes: 1 addition & 2 deletions mixins/kubernetes/dashboards/kubelet.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,11 @@ local statPanel = grafana.statPanel;
)
.addTarget(prometheus.target('go_goroutines{%(clusterLabel)s="$cluster",%(kubeletSelector)s,instance=~"$instance"}' % $._config, legendFormat='{{instance}}'));

local uid = ($._config.grafanaDashboardIDs['kubelet.json']);

dashboard.new(
'%(dashboardNamePrefix)sKubelet' % $._config.grafanaK8s,
time_from='now-1h',
uid=uid,
uid=($._config.grafanaDashboardIDs['kubelet.json']),
tags=($._config.grafanaK8s.dashboardTags),
).addTemplate(
{
Expand Down
4 changes: 2 additions & 2 deletions mixins/node/lib/prom-mixin.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ local table = grafana70.panel.table;
dashboard.new(
'%sNodes' % config.dashboardNamePrefix,
time_from='now-1h',
uid=($._config.grafanaDashboardIDs['nodes.json']),
uid=(config.grafanaDashboardIDs['nodes.json']),
tags=(config.dashboardTags),
timezone='utc',
refresh='30s',
Expand All @@ -493,7 +493,7 @@ local table = grafana70.panel.table;
dashboard.new(
'%sMacOS' % config.dashboardNamePrefix,
time_from='now-1h',
uid=($._config.grafanaDashboardIDs['nodes.json']),
uid=(config.grafanaDashboardIDs['nodes.json']),
tags=(config.dashboardTags),
timezone='utc',
refresh='30s',
Expand Down

0 comments on commit c6649a9

Please sign in to comment.