Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-v0.20] Alert VMStorageClassWarning only for Windows VMs #1286

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
6 changes: 3 additions & 3 deletions pkg/monitoring/rules/alerts/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ func operatorAlerts() []promv1.Rule {
},
{
Alert: "VMStorageClassWarning",
Expr: intstr.FromString("(count(kubevirt_ssp_vm_rbd_block_volume_without_rxbounce > 0) or vector(0)) > 0"),
Expr: intstr.FromString("(count(kubevirt_ssp_vm_rbd_block_volume_without_rxbounce * on(name, namespace) (kubevirt_vmi_info{guest_os_name=\"Microsoft Windows\"} > 0 or kubevirt_vmi_info{os=~\"windows.*\"} > 0) > 0) or vector(0)) > 0"),
Annotations: map[string]string{
"summary": "{{ $value }} Virtual Machines may cause reports of bad crc/signature errors due to certain I/O patterns.",
"description": "When running VMs using ODF storage with 'rbd' mounter or 'rbd.csi.ceph.com provisioner', VMs may cause reports of bad crc/signature errors due to certain I/O patterns. Cluster performance can be severely degraded if the number of re-transmissions due to crc errors causes network saturation.",
"summary": "{{ $value }} Windows Virtual Machines may cause reports of bad crc/signature errors due to certain I/O patterns.",
"description": "When running Windows VMs using ODF storage with 'rbd' mounter or 'rbd.csi.ceph.com provisioner', VMs may cause reports of bad crc/signature errors due to certain I/O patterns. Cluster performance can be severely degraded if the number of re-transmissions due to crc errors causes network saturation.",
},
Labels: map[string]string{
severityAlertLabelKey: "warning",
Expand Down
58 changes: 52 additions & 6 deletions pkg/monitoring/rules/rules-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,20 +170,28 @@ tests:
# VMStorageClassWarning alert tests
- interval: "1m"
input_series:
- series: 'kubevirt_ssp_vm_rbd_block_volume_without_rxbounce'
values: '0 0 1 0'
- series: 'kubevirt_vmi_info{name="vm1", namespace="ns1", os="windows2k22", guest_os_name="Microsoft Windows"}'
values: '1 1 1 0 _'
- series: 'kubevirt_vmi_info{name="vm1", namespace="ns1", os="<none>", guest_os_name="Microsoft Windows"}'
values: '_ _ _ _ 1 0 _'
- series: 'kubevirt_vmi_info{name="vm1", namespace="ns1", os="windows2k22", guest_os_name="<none>"}'
values: '_ _ _ _ _ _ 1 0 _'
- series: 'kubevirt_vmi_info{name="vm1", namespace="ns1", os="<none>", guest_os_name="<none>"}'
values: '_ _ _ _ _ _ _ _ 1 0 _'
- series: 'kubevirt_ssp_vm_rbd_block_volume_without_rxbounce{name="vm1", namespace="ns1"}'
values: '0 0 1 1 1 1 1 1 1 1 1'

alert_rule_test:
- eval_time: "1m"
- eval_time: "1m" # VM RDB Block Volume has rxbounce
alertname: "VMStorageClassWarning"
exp_alerts: []

- eval_time: "2m"
- eval_time: "2m" # Both OS and Guest OS are set to Windows
alertname: "VMStorageClassWarning"
exp_alerts:
- exp_annotations:
summary: "1 Virtual Machines may cause reports of bad crc/signature errors due to certain I/O patterns."
description: "When running VMs using ODF storage with 'rbd' mounter or 'rbd.csi.ceph.com provisioner', VMs may cause reports of bad crc/signature errors due to certain I/O patterns. Cluster performance can be severely degraded if the number of re-transmissions due to crc errors causes network saturation."
summary: "1 Windows Virtual Machines may cause reports of bad crc/signature errors due to certain I/O patterns."
description: "When running Windows VMs using ODF storage with 'rbd' mounter or 'rbd.csi.ceph.com provisioner', VMs may cause reports of bad crc/signature errors due to certain I/O patterns. Cluster performance can be severely degraded if the number of re-transmissions due to crc errors causes network saturation."
runbook_url: "https://kubevirt.io/monitoring/runbooks/VMStorageClassWarning"
exp_labels:
severity: "warning"
Expand All @@ -194,3 +202,41 @@ tests:
- eval_time: "3m"
alertname: "VMStorageClassWarning"
exp_alerts: []

- eval_time: "4m" # Guest OS is set to Windows
alertname: "VMStorageClassWarning"
exp_alerts:
- exp_annotations:
summary: "1 Windows Virtual Machines may cause reports of bad crc/signature errors due to certain I/O patterns."
description: "When running Windows VMs using ODF storage with 'rbd' mounter or 'rbd.csi.ceph.com provisioner', VMs may cause reports of bad crc/signature errors due to certain I/O patterns. Cluster performance can be severely degraded if the number of re-transmissions due to crc errors causes network saturation."
runbook_url: "https://kubevirt.io/monitoring/runbooks/VMStorageClassWarning"
exp_labels:
severity: "warning"
operator_health_impact: "none"
kubernetes_operator_part_of: "kubevirt"
kubernetes_operator_component: "ssp-operator"

- eval_time: "5m"
alertname: "VMStorageClassWarning"
exp_alerts: []

- eval_time: "6m" # OS is set to Windows
alertname: "VMStorageClassWarning"
exp_alerts:
- exp_annotations:
summary: "1 Windows Virtual Machines may cause reports of bad crc/signature errors due to certain I/O patterns."
description: "When running Windows VMs using ODF storage with 'rbd' mounter or 'rbd.csi.ceph.com provisioner', VMs may cause reports of bad crc/signature errors due to certain I/O patterns. Cluster performance can be severely degraded if the number of re-transmissions due to crc errors causes network saturation."
runbook_url: "https://kubevirt.io/monitoring/runbooks/VMStorageClassWarning"
exp_labels:
severity: "warning"
operator_health_impact: "none"
kubernetes_operator_part_of: "kubevirt"
kubernetes_operator_component: "ssp-operator"

- eval_time: "7m"
alertname: "VMStorageClassWarning"
exp_alerts: []

- eval_time: "8m" # Neither OS nor Guest OS is set to Windows
alertname: "VMStorageClassWarning"
exp_alerts: [ ]
Loading