Skip to content

Commit

Permalink
feat: mdraid monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ashish1099 authored and iminfinity committed Nov 27, 2024
1 parent ef3de66 commit 4f6bcb1
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion argocd-helm-charts/prometheus-linuxaid/rules/mdraid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ groups:
Array '{{ .Labels.device }}' needs attention and possibly a disk swap.
summary: Failed device in RAID array
expr: |
node_md_disks{state="failed"} > 0
(node_md_disks{state="failed"} > 0) * on(instance) group_left (nodename) node_uname_info{nodename=~".+"}
and on(certname) obmondo_monitoring{alert_id="monitor::raid::mdraid::failed"} > 0
labels:
severity: warning
Expand Down
28 changes: 28 additions & 0 deletions build/kube-prometheus/mixins/mdraid/mixin.libsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
_config+:: {
selector: '',
},

prometheusAlerts+:: {
groups+: [
{
name: 'mdraid-status',
rules: [
{
alert: 'HostRaidDiskFailure',
expr: '(node_md_disks{state="failed"} > 0) * on(instance) group_left (nodename) node_uname_info{nodename=~".+"}',
'for': '30m',
labels: {
severity: 'critical',
alert_id: 'HostRaidDiskFailure',
},
annotations: {
summary: 'Host RAID disk failure (instance {{ $labels.instance }})',
description: 'At least one device in RAID array on {{ $labels.instance }} failed. Array {{ $labels.md_device }} needs attention and possibly a disk swap\n VALUE = {{ $value }}\n LABELS = {{ $labels }}',
},
},
],
},
],
},
}

0 comments on commit 4f6bcb1

Please sign in to comment.