Skip to content

Commit

Permalink
feat: bump windows rules and dashboards
Browse files Browse the repository at this point in the history
Signed-off-by: Till Adam <[email protected]>
  • Loading branch information
TheKangaroo committed Sep 22, 2023
1 parent 9c8e405 commit 6406dd3
Show file tree
Hide file tree
Showing 10 changed files with 302 additions and 14 deletions.
2 changes: 1 addition & 1 deletion charts/kube-prometheus-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ name: kube-prometheus-stack
sources:
- https://github.com/prometheus-community/helm-charts
- https://github.com/prometheus-operator/kube-prometheus
version: 51.1.1
version: 51.2.0
appVersion: v0.68.0
kubeVersion: ">=1.19.0-0"
home: https://github.com/prometheus-operator/kube-prometheus
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Do not change in-place! In order to change this file first read following link:
https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack
*/ -}}
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled .Values.nodeExporter.enabled .Values.nodeExporter.operatingSystems.darwin.enabled }}
{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled .Values.nodeExporter.operatingSystems.darwin.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Do not change in-place! In order to change this file first read following link:
https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack
*/ -}}
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled .Values.nodeExporter.enabled .Values.nodeExporter.operatingSystems.linux.enabled }}
{{- if and (or .Values.grafana.enabled .Values.grafana.forceDeployDashboards) (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled .Values.nodeExporter.operatingSystems.linux.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,84 +29,273 @@ spec:
windows_system_system_up_time{job="windows-exporter"}
)
record: node:windows_node:sum
{{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
labels:
{{- with .Values.defaultRules.additionalRuleLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
- expr: |-
count by (instance) (sum by (instance, core) (
windows_cpu_time_total{job="windows-exporter"}
))
record: node:windows_node_num_cpu:sum
{{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
labels:
{{- with .Values.defaultRules.additionalRuleLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
- expr: 1 - avg(rate(windows_cpu_time_total{job="windows-exporter",mode="idle"}[1m]))
record: :windows_node_cpu_utilisation:avg1m
{{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
labels:
{{- with .Values.defaultRules.additionalRuleLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
- expr: |-
1 - avg by (instance) (
rate(windows_cpu_time_total{job="windows-exporter",mode="idle"}[1m])
)
record: node:windows_node_cpu_utilisation:avg1m
{{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
labels:
{{- with .Values.defaultRules.additionalRuleLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
- expr: |-
1 -
sum(windows_memory_available_bytes{job="windows-exporter"})
/
sum(windows_os_visible_memory_bytes{job="windows-exporter"})
record: ':windows_node_memory_utilisation:'
{{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
labels:
{{- with .Values.defaultRules.additionalRuleLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
- expr: sum(windows_memory_available_bytes{job="windows-exporter"} + windows_memory_cache_bytes{job="windows-exporter"})
record: :windows_node_memory_MemFreeCached_bytes:sum
{{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
labels:
{{- with .Values.defaultRules.additionalRuleLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
- expr: (windows_memory_cache_bytes{job="windows-exporter"} + windows_memory_modified_page_list_bytes{job="windows-exporter"} + windows_memory_standby_cache_core_bytes{job="windows-exporter"} + windows_memory_standby_cache_normal_priority_bytes{job="windows-exporter"} + windows_memory_standby_cache_reserve_bytes{job="windows-exporter"})
record: node:windows_node_memory_totalCached_bytes:sum
{{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
labels:
{{- with .Values.defaultRules.additionalRuleLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
- expr: sum(windows_os_visible_memory_bytes{job="windows-exporter"})
record: :windows_node_memory_MemTotal_bytes:sum
{{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
labels:
{{- with .Values.defaultRules.additionalRuleLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
- expr: |-
sum by (instance) (
(windows_memory_available_bytes{job="windows-exporter"})
)
record: node:windows_node_memory_bytes_available:sum
{{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
labels:
{{- with .Values.defaultRules.additionalRuleLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
- expr: |-
sum by (instance) (
windows_os_visible_memory_bytes{job="windows-exporter"}
)
record: node:windows_node_memory_bytes_total:sum
{{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
labels:
{{- with .Values.defaultRules.additionalRuleLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
- expr: |-
(node:windows_node_memory_bytes_total:sum - node:windows_node_memory_bytes_available:sum)
/
scalar(sum(node:windows_node_memory_bytes_total:sum))
record: node:windows_node_memory_utilisation:ratio
{{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
labels:
{{- with .Values.defaultRules.additionalRuleLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
- expr: 1 - (node:windows_node_memory_bytes_available:sum / node:windows_node_memory_bytes_total:sum)
record: 'node:windows_node_memory_utilisation:'
{{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
labels:
{{- with .Values.defaultRules.additionalRuleLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
- expr: irate(windows_memory_swap_page_operations_total{job="windows-exporter"}[5m])
record: node:windows_node_memory_swap_io_pages:irate
{{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
labels:
{{- with .Values.defaultRules.additionalRuleLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
- expr: |-
avg(irate(windows_logical_disk_read_seconds_total{job="windows-exporter"}[1m]) +
irate(windows_logical_disk_write_seconds_total{job="windows-exporter"}[1m])
)
record: :windows_node_disk_utilisation:avg_irate
{{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
labels:
{{- with .Values.defaultRules.additionalRuleLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
- expr: |-
avg by (instance) (
(irate(windows_logical_disk_read_seconds_total{job="windows-exporter"}[1m]) +
irate(windows_logical_disk_write_seconds_total{job="windows-exporter"}[1m]))
)
record: node:windows_node_disk_utilisation:avg_irate
{{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
labels:
{{- with .Values.defaultRules.additionalRuleLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
- expr: |-
max by (instance,volume)(
(windows_logical_disk_size_bytes{job="windows-exporter"}
- windows_logical_disk_free_bytes{job="windows-exporter"})
/ windows_logical_disk_size_bytes{job="windows-exporter"}
)
record: 'node:windows_node_filesystem_usage:'
{{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
labels:
{{- with .Values.defaultRules.additionalRuleLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
- expr: max by (instance, volume) (windows_logical_disk_free_bytes{job="windows-exporter"} / windows_logical_disk_size_bytes{job="windows-exporter"})
record: 'node:windows_node_filesystem_avail:'
{{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
labels:
{{- with .Values.defaultRules.additionalRuleLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
- expr: sum(irate(windows_net_bytes_total{job="windows-exporter"}[1m]))
record: :windows_node_net_utilisation:sum_irate
{{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
labels:
{{- with .Values.defaultRules.additionalRuleLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
- expr: |-
sum by (instance) (
(irate(windows_net_bytes_total{job="windows-exporter"}[1m]))
)
record: node:windows_node_net_utilisation:sum_irate
{{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
labels:
{{- with .Values.defaultRules.additionalRuleLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
- expr: |-
sum(irate(windows_net_packets_received_discarded_total{job="windows-exporter"}[1m])) +
sum(irate(windows_net_packets_outbound_discarded_total{job="windows-exporter"}[1m]))
record: :windows_node_net_saturation:sum_irate
{{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
labels:
{{- with .Values.defaultRules.additionalRuleLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
- expr: |-
sum by (instance) (
(irate(windows_net_packets_received_discarded_total{job="windows-exporter"}[1m]) +
irate(windows_net_packets_outbound_discarded_total{job="windows-exporter"}[1m]))
)
record: node:windows_node_net_saturation:sum_irate
{{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
labels:
{{- with .Values.defaultRules.additionalRuleLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
Loading

0 comments on commit 6406dd3

Please sign in to comment.