Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dashboards/dashboards.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
(import 'scheduler.libsonnet') +
(import 'proxy.libsonnet') +
(import 'kubelet.libsonnet') +
(import 'defaults.libsonnet')
(import 'defaults.libsonnet') +
(import 'windows.libsonnet')
15 changes: 7 additions & 8 deletions dashboards/windows.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ local var = g.dashboard.variable;
)
+ var.query.generalOptions.withLabel('instance')
+ var.query.refresh.onTime()
+ var.query.generalOptions.showOnDashboard.withLabelAndValue()
+ var.query.selectionOptions.withMulti(true),
+ var.query.generalOptions.showOnDashboard.withLabelAndValue(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would seem to resolve the linked issue - thank you!


namespace:
var.query.new('namespace')
Expand Down Expand Up @@ -124,7 +123,7 @@ local var = g.dashboard.variable;
statPanel(
'CPU Utilisation',
'none',
'1 - avg(rate(windows_cpu_time_total{%(clusterLabel)s="$cluster", %(windowsExporterSelector)s, mode="idle"}[1m]))' % $._config
'1 - avg(rate(windows_cpu_time_total{%(clusterLabel)s="$cluster", %(windowsExporterSelector)s, mode="idle"}[%(grafanaIntervalVar)s]))' % $._config
)
+ stat.gridPos.withW(4)
+ stat.gridPos.withH(3),
Expand Down Expand Up @@ -830,13 +829,13 @@ local var = g.dashboard.variable;
+ tsPanel.queryOptions.withTargets([
prometheus.new(
'${datasource}',
'sort_desc(sum by (container) (rate(windows_container_network_received_bytes_total{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod"}[1m])))' % $._config
'sort_desc(sum by (container) (rate(windows_container_network_received_bytes_total{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod"}[%(grafanaIntervalVar)s])))' % $._config
)
+ prometheus.withLegendFormat('Received : {{ container }}'),

prometheus.new(
'${datasource}',
'sort_desc(sum by (container) (rate(windows_container_network_transmitted_bytes_total{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod"}[1m])))' % $._config
'sort_desc(sum by (container) (rate(windows_container_network_transmitted_bytes_total{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod"}[%(grafanaIntervalVar)s])))' % $._config
)
+ prometheus.withLegendFormat('Transmitted : {{ container }}'),
]),
Expand Down Expand Up @@ -1025,19 +1024,19 @@ local var = g.dashboard.variable;
+ tsPanel.queryOptions.withTargets([
prometheus.new(
'${datasource}',
'max(rate(windows_logical_disk_read_bytes_total{%(clusterLabel)s="$cluster", %(windowsExporterSelector)s, instance="$instance"}[2m]))' % $._config
'max(rate(windows_logical_disk_read_bytes_total{%(clusterLabel)s="$cluster", %(windowsExporterSelector)s, instance="$instance"}[%(grafanaIntervalVar)s]))' % $._config
)
+ prometheus.withLegendFormat('read'),

prometheus.new(
'${datasource}',
'max(rate(windows_logical_disk_write_bytes_total{%(clusterLabel)s="$cluster", %(windowsExporterSelector)s, instance="$instance"}[2m]))' % $._config
'max(rate(windows_logical_disk_write_bytes_total{%(clusterLabel)s="$cluster", %(windowsExporterSelector)s, instance="$instance"}[%(grafanaIntervalVar)s]))' % $._config
)
+ prometheus.withLegendFormat('written'),

prometheus.new(
'${datasource}',
'max(rate(windows_logical_disk_read_seconds_total{%(clusterLabel)s="$cluster", %(windowsExporterSelector)s, instance="$instance"}[2m]) + rate(windows_logical_disk_write_seconds_total{%(clusterLabel)s="$cluster", %(windowsExporterSelector)s, instance="$instance"}[2m]))' % $._config
'max(rate(windows_logical_disk_read_seconds_total{%(clusterLabel)s="$cluster", %(windowsExporterSelector)s, instance="$instance"}[%(grafanaIntervalVar)s]) + rate(windows_logical_disk_write_seconds_total{%(clusterLabel)s="$cluster", %(windowsExporterSelector)s, instance="$instance"}[%(grafanaIntervalVar)s]))' % $._config
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for these additional changes 👍

)
+ prometheus.withLegendFormat('io time'),
])
Expand Down
3 changes: 2 additions & 1 deletion rules/rules.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
(import 'apps.libsonnet') +
(import 'kube_scheduler.libsonnet') +
(import 'node.libsonnet') +
(import 'kubelet.libsonnet')
(import 'kubelet.libsonnet') +
(import 'windows.libsonnet')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@povilasv this would add windows rules and dashboards into the default build - are you ok with that? Personally, I see no harm in including them but wanted to check with you.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will merge Monday @povilasv unless I hear otherwise 😄 can always revert this part in future