Temperature Monitoring of 3Ware Controller with smartmontools, Nagios and NagiosGrapher
Juni 30th, 2009 von
Mario Rasser
We have a 3Ware 9550SX-8LP installed in a Linuxserver running Ubuntu Server. What I am going to describe is, how we monitor the Harddisk Temperature via Nagios and graphing it via NagiosGrapher. This HowTo can easily be modified for other 3Ware Controllers.

Temperaturegraph from a 3Ware 9550SX-8LP with NagiosGrapher
Installation and configuration of needed packages
-
#aptitude install smartmontools snmpd - Copy the a wrapper script for smartmontools to /usr/local/bin/get_smart_value.sh, it will be used by SNMP later
#!/bin/bash # Extract the Temperature Value from the SMART values gained by smartclt # the value 194 contains the HDD Temperature smartctl -a -d 3ware,${1} ${2} | grep ^194 | awk '{print $10}'
… and do a chmod +x /usr/local/bin/get_smart_value.sh
- Configure SNMPd to to run extend-Commands (/etc/snmp/snmpd.conf) and add at the end of the file:
... extend 3Ware_1_Port0 '/usr/bin/sudo /usr/local/bin/get_smart_value.sh 0 /dev/twa0' extend 3Ware_1_Port1 '/usr/bin/sudo /usr/local/bin/get_smart_value.sh 1 /dev/twa0' extend 3Ware_1_Port2 '/usr/bin/sudo /usr/local/bin/get_smart_value.sh 2 /dev/twa0' extend 3Ware_1_Port3 '/usr/bin/sudo /usr/local/bin/get_smart_value.sh 3 /dev/twa0' extend 3Ware_1_Port4 '/usr/bin/sudo /usr/local/bin/get_smart_value.sh 4 /dev/twa0' extend 3Ware_1_Port5 '/usr/bin/sudo /usr/local/bin/get_smart_value.sh 5 /dev/twa0' #in our system just 6 HDDs are connected so we will return 0 for the non used extend 3Ware_1_Port6 '/bin/echo 0' extend 3Ware_1_Port7 '/bin/echo 0'
… and restart SNMPd with /etc/init.d/snmpd restart
-
# visudoand add the following line
snmp ALL = NOPASSWD: /usr/local/bin/get_smart_value.sh
… to allow snmp run the script as SuperUser, which is needed to get the S.M.A.R.T. values via smartctl
Geschrieben in Monitoring, Nagios, SNMP, Ubuntu |
1 Kommentar »
