Iniziando servizio per il monitoring dello spazio su disco, raid, etc.

This commit is contained in:
2022-07-05 19:57:54 +02:00
parent abf86ae549
commit d4b9dee6d9
2 changed files with 57 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/bin/bash
DEVICE="/dev/md0"
TOTAL_DEVICES=$(mdadm -D "$DEVICE" | grep 'Total Devices' | cut -d':' -f 2 | tr -d ' ')
mdadm -D "$DEVICE" | tail -n "$TOTAL_DEVICES" | tr -s ' ' | cut -d' ' -f 6
# Example Output:
#
# active
# active
# active
# active
# active
#
# TODO: Non ho realmente trovato nella documentazione le altre parole, penso siano "missing" e "failing" però boh