From 7fb2aab913c18b47716726bc32c1802a2a40f302 Mon Sep 17 00:00:00 2001 From: Denis Shipkov Date: Thu, 21 Nov 2024 20:38:32 +0300 Subject: [PATCH] test Signed-off-by: Denis Shipkov --- ...replicated-pv-with-incorrect-settings.yaml | 172 +++++++++--------- 1 file changed, 86 insertions(+), 86 deletions(-) diff --git a/monitoring/prometheus-rules/replicated-pv-with-incorrect-settings.yaml b/monitoring/prometheus-rules/replicated-pv-with-incorrect-settings.yaml index 52595fc6..bccf60ed 100644 --- a/monitoring/prometheus-rules/replicated-pv-with-incorrect-settings.yaml +++ b/monitoring/prometheus-rules/replicated-pv-with-incorrect-settings.yaml @@ -38,94 +38,94 @@ Persistent volumes in the cluster has incorrect quorum-minimum-redundancy setting. Please, contact tech support for assistance. -# - alert: ReplicatedPVIncorrectReplicasCountFatalS3 -# expr: count(kube_persistentvolume_labels{label_storage_deckhouse_io_pv_not_enough_replicas="fatal"}) > 0 -# for: 15m -# labels: -# severity_level: "3" -# tier: cluster -# annotations: -# plk_markup_format: "markdown" -# plk_protocol_version: "1" -# plk_create_group_if_not_exists__d8_drbd_device_health: "ReplicatedPVSettingsCheck,tier=~tier,prometheus=deckhouse,kubernetes=~kubernetes" -# plk_grouped_by__d8_drbd_device_health: "ReplicatedPVSettingsCheck,tier=~tier,prometheus=deckhouse,kubernetes=~kubernetes" -# summary: Replicated PVs has not enough replicas -# description: | -# Persistent volumes in the cluster has less then 2 replicas (set of UpToDate resources) -## -## You can get minimal limit for StorageClass with command `kubectl get sc -o yaml | grep -E "(\sname|placementCount)"` -## And view all Resource States with `linstor r l` -# - alert: ReplicatedPVIncorrectReplicasCountErrorS3 -# expr: count(kube_persistentvolume_labels{label_storage_deckhouse_io_pv_not_enough_replicas="error", label_storage_deckhouse_io_pv_not_enough_replicas="fatal"}) > 0 -# for: 30m -# labels: -# severity_level: "3" -# tier: cluster -# annotations: -# plk_markup_format: "markdown" -# plk_protocol_version: "1" -# plk_create_group_if_not_exists__d8_drbd_device_health: "ReplicatedPVSettingsCheck,tier=~tier,prometheus=deckhouse,kubernetes=~kubernetes" -# plk_grouped_by__d8_drbd_device_health: "ReplicatedPVSettingsCheck,tier=~tier,prometheus=deckhouse,kubernetes=~kubernetes" -# summary: Replicated PVs has not enough replicas -# description: | -# Persistent volumes in the cluster has not enough replicas for quorum for 30min (set of UpToDate resources) -## -## You can get minimal limit for StorageClass with command `kubectl get sc -o yaml | grep -E "(\sname|placementCount)"` -## And view all Resource States with `linstor r l` -# - alert: ReplicatedPVIncorrectReplicasCountWarningS3 -# expr: count(kube_persistentvolume_labels{label_storage_deckhouse_io_pv_not_enough_replicas="warning", label_storage_deckhouse_io_pv_not_enough_replicas="error", label_storage_deckhouse_io_pv_not_enough_replicas="fatal"}) > 0 -# for: 24h -# labels: -# severity_level: "3" -# tier: cluster -# annotations: -# plk_markup_format: "markdown" -# plk_protocol_version: "1" -# plk_create_group_if_not_exists__d8_drbd_device_health: "ReplicatedPVSettingsCheck,tier=~tier,prometheus=deckhouse,kubernetes=~kubernetes" -# plk_grouped_by__d8_drbd_device_health: "ReplicatedPVSettingsCheck,tier=~tier,prometheus=deckhouse,kubernetes=~kubernetes" -# summary: Replicated PVs has not enough replicas -# description: | -# Persistent volumes in the cluster has not enough replicas for long time (set of UpToDate resources less than minimal count) -## -## You can get minimal limit for StorageClass with command `kubectl get sc -o yaml | grep -E "(\sname|placementCount)"` -## And view all Resource States with `linstor r l` -# - alert: ReplicatedPVIncorrectReplicasCountErrorS4 -# expr: count(kube_persistentvolume_labels{label_storage_deckhouse_io_pv_not_enough_replicas="error", label_storage_deckhouse_io_pv_not_enough_replicas="fatal"}) > 0 -# for: 15m -# labels: -# severity_level: "4" -# tier: cluster -# annotations: -# plk_markup_format: "markdown" -# plk_protocol_version: "1" -# plk_create_group_if_not_exists__d8_drbd_device_health: "ReplicatedPVSettingsCheck,tier=~tier,prometheus=deckhouse,kubernetes=~kubernetes" -# plk_grouped_by__d8_drbd_device_health: "ReplicatedPVSettingsCheck,tier=~tier,prometheus=deckhouse,kubernetes=~kubernetes" -# summary: Replicated PVs has not enough replicas -# description: | -# Persistent volumes in the cluster has not enough replicas for quorum for 15min (set of UpToDate resources) -## -## You can get minimal limit for StorageClass with command `kubectl get sc -o yaml | grep -E "(\sname|placementCount)"` -## And view all Resource States with `linstor r l` -# - alert: ReplicatedPVIncorrectReplicasCountWarningS4 -# expr: count(kube_persistentvolume_labels{label_storage_deckhouse_io_pv_not_enough_replicas="warning", label_storage_deckhouse_io_pv_not_enough_replicas="error", label_storage_deckhouse_io_pv_not_enough_replicas="fatal"}) > 0 -# for: 30m -# labels: -# severity_level: "4" -# tier: cluster -# annotations: -# plk_markup_format: "markdown" -# plk_protocol_version: "1" -# plk_create_group_if_not_exists__d8_drbd_device_health: "ReplicatedPVSettingsCheck,tier=~tier,prometheus=deckhouse,kubernetes=~kubernetes" -# plk_grouped_by__d8_drbd_device_health: "ReplicatedPVSettingsCheck,tier=~tier,prometheus=deckhouse,kubernetes=~kubernetes" -# summary: Replicated PVs has not enough replicas -# description: | -# Persistent volumes in the cluster has not enough replicas for 30min (set of UpToDate resources less than minimal count) -## -## You can get minimal limit for StorageClass with command `kubectl get sc -o yaml | grep -E "(\sname|placementCount)"` -## And view all Resource States with `linstor r l` + - alert: ReplicatedPVIncorrectReplicasCountFatalS3 + expr: count(kube_persistentvolume_labels{label_storage_deckhouse_io_pv_not_enough_replicas="fatal"}) > 0 + for: 15m + labels: + severity_level: "3" + tier: cluster + annotations: + plk_markup_format: "markdown" + plk_protocol_version: "1" + plk_create_group_if_not_exists__d8_drbd_device_health: "ReplicatedPVSettingsCheck,tier=~tier,prometheus=deckhouse,kubernetes=~kubernetes" + plk_grouped_by__d8_drbd_device_health: "ReplicatedPVSettingsCheck,tier=~tier,prometheus=deckhouse,kubernetes=~kubernetes" + summary: Replicated PVs has not enough replicas + description: | + Persistent volumes in the cluster has less then 2 replicas (set of UpToDate resources) + + You can get minimal limit for StorageClass with command `kubectl get sc -o yaml | grep -E "(\sname|placementCount)"` + And view all Resource States with `linstor r l` + - alert: ReplicatedPVIncorrectReplicasCountErrorS3 + expr: count(kube_persistentvolume_labels{label_storage_deckhouse_io_pv_not_enough_replicas="error|fatal"}) > 0 + for: 30m + labels: + severity_level: "3" + tier: cluster + annotations: + plk_markup_format: "markdown" + plk_protocol_version: "1" + plk_create_group_if_not_exists__d8_drbd_device_health: "ReplicatedPVSettingsCheck,tier=~tier,prometheus=deckhouse,kubernetes=~kubernetes" + plk_grouped_by__d8_drbd_device_health: "ReplicatedPVSettingsCheck,tier=~tier,prometheus=deckhouse,kubernetes=~kubernetes" + summary: Replicated PVs has not enough replicas + description: | + Persistent volumes in the cluster has not enough replicas for quorum for 30min (set of UpToDate resources) + + You can get minimal limit for StorageClass with command `kubectl get sc -o yaml | grep -E "(\sname|placementCount)"` + And view all Resource States with `linstor r l` + - alert: ReplicatedPVIncorrectReplicasCountWarningS3 + expr: count(kube_persistentvolume_labels{label_storage_deckhouse_io_pv_not_enough_replicas="warning|error|fatal"}) > 0 + for: 24h + labels: + severity_level: "3" + tier: cluster + annotations: + plk_markup_format: "markdown" + plk_protocol_version: "1" + plk_create_group_if_not_exists__d8_drbd_device_health: "ReplicatedPVSettingsCheck,tier=~tier,prometheus=deckhouse,kubernetes=~kubernetes" + plk_grouped_by__d8_drbd_device_health: "ReplicatedPVSettingsCheck,tier=~tier,prometheus=deckhouse,kubernetes=~kubernetes" + summary: Replicated PVs has not enough replicas + description: | + Persistent volumes in the cluster has not enough replicas for long time (set of UpToDate resources less than minimal count) + + You can get minimal limit for StorageClass with command `kubectl get sc -o yaml | grep -E "(\sname|placementCount)"` + And view all Resource States with `linstor r l` + - alert: ReplicatedPVIncorrectReplicasCountErrorS4 + expr: count(kube_persistentvolume_labels{label_storage_deckhouse_io_pv_not_enough_replicas="error|fatal"}) > 0 + for: 15m + labels: + severity_level: "4" + tier: cluster + annotations: + plk_markup_format: "markdown" + plk_protocol_version: "1" + plk_create_group_if_not_exists__d8_drbd_device_health: "ReplicatedPVSettingsCheck,tier=~tier,prometheus=deckhouse,kubernetes=~kubernetes" + plk_grouped_by__d8_drbd_device_health: "ReplicatedPVSettingsCheck,tier=~tier,prometheus=deckhouse,kubernetes=~kubernetes" + summary: Replicated PVs has not enough replicas + description: | + Persistent volumes in the cluster has not enough replicas for quorum for 15min (set of UpToDate resources) + + You can get minimal limit for StorageClass with command `kubectl get sc -o yaml | grep -E "(\sname|placementCount)"` + And view all Resource States with `linstor r l` + - alert: ReplicatedPVIncorrectReplicasCountWarningS4 + expr: count(kube_persistentvolume_labels{label_storage_deckhouse_io_pv_not_enough_replicas="warning|error|fatal"}) > 0 + for: 30m + labels: + severity_level: "4" + tier: cluster + annotations: + plk_markup_format: "markdown" + plk_protocol_version: "1" + plk_create_group_if_not_exists__d8_drbd_device_health: "ReplicatedPVSettingsCheck,tier=~tier,prometheus=deckhouse,kubernetes=~kubernetes" + plk_grouped_by__d8_drbd_device_health: "ReplicatedPVSettingsCheck,tier=~tier,prometheus=deckhouse,kubernetes=~kubernetes" + summary: Replicated PVs has not enough replicas + description: | + Persistent volumes in the cluster has not enough replicas for 30min (set of UpToDate resources less than minimal count) + + You can get minimal limit for StorageClass with command `kubectl get sc -o yaml | grep -E "(\sname|placementCount)"` + And view all Resource States with `linstor r l` - alert: ReplicatedPVIncorrectReplicasCountWarningS5 expr: count(kube_persistentvolume_labels{label_storage_deckhouse_io_pv_not_enough_replicas=~"warning|error|fatal"}) > 0 - for: 5m + for: 15m labels: severity_level: "5" tier: cluster