Hello!
I recently helped out a fellow Zabbix user in the #zabbix IRC channel with this script and decided to post it here.
This script needs two parameters : $1 - 3Ware controller port and $2 - SMART attribute to read.
It is very very simple, please feel free to improve, add argument check count, etc (dont really have much time for that... lol).
Note:
If your disk on a port has a problem or is not connected, smartctl may hang so don't poll unused ports.
smartctl --attributes -d 3ware,"$1" /dev/twa0 | grep "$2" | cut -c 5- | tr -s [:space:] | cut -d ' ' -f 9
Cheers,
Ivo Pereira
IT Consultant
Portugal
I recently helped out a fellow Zabbix user in the #zabbix IRC channel with this script and decided to post it here.
This script needs two parameters : $1 - 3Ware controller port and $2 - SMART attribute to read.
It is very very simple, please feel free to improve, add argument check count, etc (dont really have much time for that... lol).
Note:
If your disk on a port has a problem or is not connected, smartctl may hang so don't poll unused ports.
smartctl --attributes -d 3ware,"$1" /dev/twa0 | grep "$2" | cut -c 5- | tr -s [:space:] | cut -d ' ' -f 9
Cheers,
Ivo Pereira
IT Consultant
Portugal