Skip to content

Commit

Permalink
16871 FIX smart: Monitor SATA disks connected via HBA
Browse files Browse the repository at this point in the history
Previously, SATA disks connected via HBA weren't monitored by the smart
agent plugin. Now, they are monitored the same way as other ATA disks.

SUP-19619

Change-Id: Ie70d52b0028b336b4766172c3abb28d446a59220
  • Loading branch information
scolakovic committed Sep 17, 2024
1 parent f5d04fa commit 604c278
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
11 changes: 11 additions & 0 deletions .werks/16871
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Title: smart: Monitor SATA disks connected via HBA
Class: fix
Compatible: compat
Component: checks
Date: 1726577620
Edition: cre
Level: 1
Version: 2.1.0p48

Previously, SATA disks connected via HBA weren't monitored by the smart
agent plugin. Now, they are monitored the same way as other ATA disks.
6 changes: 3 additions & 3 deletions agents/plugins/smart
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@ if inpath smartctl >/dev/null 2>&1; then
DNAME="${VEND}_${MODEL}_${SN}"
fi
else
CMD="smartctl -d ata -v 9,raw48 -A $D"
CMD="smartctl -d ata -v 9,raw48 -A $D; smartctl -d sat -v 9,raw48 -A $D"
fi
if [ $VEND == "NVME" ]; then
echo "$DNAME $VEND $MODEL"
[ -n "$CMD" ] && $CMD | sed -e '1,5d; /^$/d'
[ -n "$CMD" ] && eval "$CMD" | sed -e '1,5d; /^$/d'
else
[ -n "$CMD" ] && $CMD | grep Always | grep -v -E '^190(.*)Temperature(.*)' | sed "s|^|$DNAME $VEND $MODEL |"
[ -n "$CMD" ] && eval "$CMD" | grep Always | grep -v -E '^190(.*)Temperature(.*)' | sed "s|^|$DNAME $VEND $MODEL |"
fi
done 2>/dev/null
Expand Down

0 comments on commit 604c278

Please sign in to comment.