Synology: snmp and disk temperatures

Synology: snmp and disk temperatures

Synology: snmp and disk temperatures 150 150 Roderick Derks

On synology

Check if this command works on your Synology:
smartctl -a /dev/hda -d ata | egrep "Model|Temp"

 

If not then you have an old DSM version I think and need to install extra packages. DSM 4.0: start SNMP daemon in the web frontend of your Synology device. After that add a line tou your snmpd.conf file:

vi /usr/syno/etc/snmpd.conf
extend disktemp /opt/bin/bash -c "/opt/bin/find /dev/sd[a-z] -exec /usr/syno/bin/smartctl -iA -d ata {} \\; | /opt/bin/awk ' /Serial Number:/ { printf \"%s: \", \$NF }; /Temperature_Celsius/ { print \$10 }; ' | /opt/bin/sed -e \"s/[-_]//g\""

Restart SNMPD daemon:

/usr/syno/etc/rc.d/S08snmpd.sh restart

From your monitoring server

Test it. If you get a 1 as a result it is not working, a 0 is what you want to see:

snmpwalk -v 2c -c public synnas01 ‘NET-SNMP-EXTEND-MIB::nsExtendResult’
NET-SNMP-EXTEND-MIB::nsExtendResult.”disktemp” = INTEGER: 0

Then get the data:

snmpwalk -v 2c -c public synnas01 'NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp"'
NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp".1 = STRING: WDWMAZA9838547: 38
NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp".2 = STRING: WDWMAZA9791872: 39

Now you need a script that regularrly checks the temperatures and then puts it in a graph like 360viewpoint does.

Roderick Derks

Liefhebber van fietsen, van het oplossen van IT puzzels, en van het delen van informatie om anderen te helpen.

All stories by:Roderick Derks

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Your Name (required)

Your Email (required)

Subject

Your Message

Your Name (required)

Your Email (required)

Subject

Your Message