Skip to content

Commit

Permalink
Merge pull request kubernetes-monitoring#871 from azun/default-dataso…
Browse files Browse the repository at this point in the history
…urce-name

Selected datasource support for all dashboards
  • Loading branch information
povilasv authored Sep 25, 2023
2 parents baffdc1 + 4a78534 commit 31169fd
Show file tree
Hide file tree
Showing 19 changed files with 31 additions and 12 deletions.
3 changes: 2 additions & 1 deletion dashboards/apiserver.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ local singlestat = grafana.singlestat;
).addTemplate(
{
current: {
text: 'default',
selected: true,
text: $._config.datasourceName,
value: $._config.datasourceName,
},
hide: 0,
Expand Down
3 changes: 2 additions & 1 deletion dashboards/controller-manager.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ local singlestat = grafana.singlestat;
).addTemplate(
{
current: {
text: 'default',
selected: true,
text: $._config.datasourceName,
value: $._config.datasourceName,
},
hide: 0,
Expand Down
3 changes: 2 additions & 1 deletion dashboards/kubelet.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ local statPanel = grafana.statPanel;
).addTemplate(
{
current: {
text: 'default',
selected: true,
text: $._config.datasourceName,
value: $._config.datasourceName,
},
hide: 0,
Expand Down
3 changes: 2 additions & 1 deletion dashboards/network-usage/cluster-total.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,8 @@ local annotation = grafana.annotation;
.addTemplate(
{
current: {
text: 'default',
selected: true,
text: $._config.datasourceName,
value: $._config.datasourceName,
},
hide: 0,
Expand Down
3 changes: 2 additions & 1 deletion dashboards/network-usage/namespace-by-pod.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,8 @@ local singlestat = grafana.singlestat;
.addTemplate(
{
current: {
text: 'default',
selected: true,
text: $._config.datasourceName,
value: $._config.datasourceName,
},
hide: 0,
Expand Down
3 changes: 2 additions & 1 deletion dashboards/network-usage/namespace-by-workload.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,8 @@ local annotation = grafana.annotation;
.addTemplate(
{
current: {
text: 'default',
selected: true,
text: $._config.datasourceName,
value: $._config.datasourceName,
},
hide: 0,
Expand Down
3 changes: 2 additions & 1 deletion dashboards/network-usage/pod-total.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ local singlestat = grafana.singlestat;
.addTemplate(
{
current: {
text: 'default',
selected: true,
text: $._config.datasourceName,
value: $._config.datasourceName,
},
hide: 0,
Expand Down
3 changes: 2 additions & 1 deletion dashboards/network-usage/workload-total.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ local annotation = grafana.annotation;
.addTemplate(
{
current: {
text: 'default',
selected: true,
text: $._config.datasourceName,
value: $._config.datasourceName,
},
hide: 0,
Expand Down
3 changes: 2 additions & 1 deletion dashboards/persistentvolumesusage.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ local gauge = promgrafonnet.gauge;
).addTemplate(
{
current: {
text: 'default',
selected: true,
text: $._config.datasourceName,
value: $._config.datasourceName,
},
hide: 0,
Expand Down
3 changes: 2 additions & 1 deletion dashboards/proxy.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ local singlestat = grafana.singlestat;
).addTemplate(
{
current: {
text: 'default',
selected: true,
text: $._config.datasourceName,
value: $._config.datasourceName,
},
hide: 0,
Expand Down
1 change: 1 addition & 0 deletions dashboards/resources/cluster.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ local template = grafana.template;
'%(dashboardNamePrefix)sCompute Resources / Cluster' % $._config.grafanaK8s,
uid=($._config.grafanaDashboardIDs['k8s-resources-cluster.json']),
datasource_regex=$._config.datasourceFilterRegex,
datasource=$._config.datasourceName,
)
.addRow(
(g.row('Headlines') +
Expand Down
1 change: 1 addition & 0 deletions dashboards/resources/multi-cluster.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ local g = import 'github.com/grafana/jsonnet-libs/grafana-builder/grafana.libson
'%(dashboardNamePrefix)sCompute Resources / Multi-Cluster' % $._config.grafanaK8s,
uid=($._config.grafanaDashboardIDs['k8s-resources-multicluster.json']),
datasource_regex=$._config.datasourceFilterRegex,
datasource=$._config.datasourceName,
).addRow(
(g.row('Headlines') +
{
Expand Down
1 change: 1 addition & 0 deletions dashboards/resources/namespace.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ local template = grafana.template;
'%(dashboardNamePrefix)sCompute Resources / Namespace (Pods)' % $._config.grafanaK8s,
uid=($._config.grafanaDashboardIDs['k8s-resources-namespace.json']),
datasource_regex=$._config.datasourceFilterRegex,
datasource=$._config.datasourceName,
)
.addRow(
(g.row('Headlines') +
Expand Down
1 change: 1 addition & 0 deletions dashboards/resources/node.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ local template = grafana.template;
'%(dashboardNamePrefix)sCompute Resources / Node (Pods)' % $._config.grafanaK8s,
uid=($._config.grafanaDashboardIDs['k8s-resources-node.json']),
datasource_regex=$._config.datasourceFilterRegex,
datasource=$._config.datasourceName,
)
.addRow(
g.row('CPU Usage')
Expand Down
1 change: 1 addition & 0 deletions dashboards/resources/pod.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ local template = grafana.template;
'%(dashboardNamePrefix)sCompute Resources / Pod' % $._config.grafanaK8s,
uid=($._config.grafanaDashboardIDs['k8s-resources-pod.json']),
datasource_regex=$._config.datasourceFilterRegex,
datasource=$._config.datasourceName,
)
.addRow(
g.row('CPU Usage')
Expand Down
1 change: 1 addition & 0 deletions dashboards/resources/workload-namespace.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ local template = grafana.template;
'%(dashboardNamePrefix)sCompute Resources / Namespace (Workloads)' % $._config.grafanaK8s,
uid=($._config.grafanaDashboardIDs['k8s-resources-workloads-namespace.json']),
datasource_regex=$._config.datasourceFilterRegex,
datasource=$._config.datasourceName,
)
.addRow(
g.row('CPU Usage')
Expand Down
1 change: 1 addition & 0 deletions dashboards/resources/workload.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ local template = grafana.template;
'%(dashboardNamePrefix)sCompute Resources / Workload' % $._config.grafanaK8s,
uid=($._config.grafanaDashboardIDs['k8s-resources-workload.json']),
datasource_regex=$._config.datasourceFilterRegex,
datasource=$._config.datasourceName,
)
.addRow(
g.row('CPU Usage')
Expand Down
3 changes: 2 additions & 1 deletion dashboards/scheduler.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ local singlestat = grafana.singlestat;
).addTemplate(
{
current: {
text: 'default',
selected: true,
text: $._config.datasourceName,
value: $._config.datasourceName,
},
hide: 0,
Expand Down
3 changes: 2 additions & 1 deletion dashboards/windows.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ local g = import 'github.com/grafana/jsonnet-libs/grafana-builder/grafana.libson
).addTemplate(
{
current: {
text: 'default',
selected: true,
text: $._config.datasourceName,
value: $._config.datasourceName,
},
hide: 0,
Expand Down

0 comments on commit 31169fd

Please sign in to comment.