From 7f9208af58e5143a02541be9e6b9ce5fa504156c Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 16 Oct 2021 12:35:32 +0200 Subject: prometues: add some more smartmon alerts --- .../prometheus/server/defaults/main/rules_node.yml | 47 +++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) (limited to 'roles/monitoring') diff --git a/roles/monitoring/prometheus/server/defaults/main/rules_node.yml b/roles/monitoring/prometheus/server/defaults/main/rules_node.yml index ffe616b7..af47e7f7 100644 --- a/roles/monitoring/prometheus/server/defaults/main/rules_node.yml +++ b/roles/monitoring/prometheus/server/defaults/main/rules_node.yml @@ -309,10 +309,55 @@ prometheus_server_rules_node: description: "S.M.A.R.T. reports errors for disk {{ '{{' }} $labels.device {{ '}}' }} on host {{ '{{' }} $labels.instance {{ '}}' }}.\n VALUE = {{ '{{' }} $value {{ '}}' }}\n LABELS = {{ '{{' }} $labels {{ '}}' }}" - alert: SmartmonAttributeBelowThreshold - expr: smartmon_attr_value < smartmon_attr_threshold + expr: smartmon_attr_value <= smartmon_attr_threshold for: 0m labels: severity: critical annotations: summary: Host disk S.M.A.R.T. attribute is below it's threshold (instance {{ '{{' }} $labels.instance {{ '}}' }}) description: "S.M.A.R.T. attribute {{ '{{' }} $labels.name {{ '}}' }} for disk {{ '{{' }} $labels.device {{ '}}' }} on host {{ '{{' }} $labels.instance {{ '}}' }} has fallen below it's threshold.\n VALUE = {{ '{{' }} $value {{ '}}' }}\n LABELS = {{ '{{' }} $labels {{ '}}' }}" + + - alert: SmartmonReallocatedSectorsCount + expr: smartmon_attr_raw_value{name="reallocated_sector_ct"} > 0 + for: 0m + labels: + severity: warning + annotations: + summary: Host disk S.M.A.R.T. reports reallocated sectors (instance {{ '{{' }} $labels.instance {{ '}}' }}) + description: "S.M.A.R.T. reports reallocated sectors for disk {{ '{{' }} $labels.device {{ '}}' }} on host {{ '{{' }} $labels.instance {{ '}}' }}, the drive might be failing.\n VALUE = {{ '{{' }} $value {{ '}}' }}\n LABELS = {{ '{{' }} $labels {{ '}}' }}" + + - alert: SmartmonReallocationEventCount + expr: smartmon_attr_raw_value{name="reallocated_event_count"} > 0 + for: 0m + labels: + severity: warning + annotations: + summary: Host disk S.M.A.R.T. reports reallocation events (instance {{ '{{' }} $labels.instance {{ '}}' }}) + description: "S.M.A.R.T. reports reallocation events for disk {{ '{{' }} $labels.device {{ '}}' }} on host {{ '{{' }} $labels.instance {{ '}}' }}, the drive might be failing.\n VALUE = {{ '{{' }} $value {{ '}}' }}\n LABELS = {{ '{{' }} $labels {{ '}}' }}" + + - alert: SmartmonCurrentPendingSectors + expr: smartmon_attr_raw_value{name="current_pending_sector"} > 0 + for: 0m + labels: + severity: warning + annotations: + summary: Host disk S.M.A.R.T. reports current pending sectors (instance {{ '{{' }} $labels.instance {{ '}}' }}) + description: "S.M.A.R.T. reports current pending sectors for disk {{ '{{' }} $labels.device {{ '}}' }} on host {{ '{{' }} $labels.instance {{ '}}' }}, the drive might be failing.\n VALUE = {{ '{{' }} $value {{ '}}' }}\n LABELS = {{ '{{' }} $labels {{ '}}' }}" + + - alert: SmartmonOfflineUncorrectable + expr: smartmon_attr_raw_value{name="offline_uncorrectable"} > 0 + for: 0m + labels: + severity: warning + annotations: + summary: Host disk S.M.A.R.T. reports offline uncorrectable errors (instance {{ '{{' }} $labels.instance {{ '}}' }}) + description: "S.M.A.R.T. reports offline uncorrectable errors for disk {{ '{{' }} $labels.device {{ '}}' }} on host {{ '{{' }} $labels.instance {{ '}}' }}, the drive might be failing.\n VALUE = {{ '{{' }} $value {{ '}}' }}\n LABELS = {{ '{{' }} $labels {{ '}}' }}" + + - alert: SmartmonSpinRetryCount + expr: smartmon_attr_raw_value{name="spin_retry_count"} > 0 + for: 0m + labels: + severity: warning + annotations: + summary: Host disk S.M.A.R.T. reports spin-up retries (instance {{ '{{' }} $labels.instance {{ '}}' }}) + description: "S.M.A.R.T. reports spin-up retries for disk {{ '{{' }} $labels.device {{ '}}' }} on host {{ '{{' }} $labels.instance {{ '}}' }}, the drive might be failing.\n VALUE = {{ '{{' }} $value {{ '}}' }}\n LABELS = {{ '{{' }} $labels {{ '}}' }}" -- cgit v1.2.3