Hello,
I'm using multiple RRD (one per disk) and serial number as disk reference. The graph uses FNPATTERN to graph 'all files for a host'.
See my notes here http://www.tumfatig.net/20120426/monitor-synology-disk-temperature-from-snmp/
The graph definition is:
[snmp_disktemp]
FNPATTERN ^snmp_disktemp.(.+).rrd
TITLE Disk Temperature
YAXIS Celcius
-l 0
-E
DEF:temp at RRDIDX@=@RRDFN@:temp:AVERAGE
LINE:temp at RRDIDX@#@COLOR@:@RRDPARAM@
GPRINT:temp at RRDIDX@:LAST:%3.0lfC (cur)
GPRINT:temp at RRDIDX@:MIN:%3.0lfC (min)
GPRINT:temp at RRDIDX@:AVERAGE:%3.0lfC (avg)
GPRINT:temp at RRDIDX@:MAX:%3.0lfC (max)\l
Regards,
Jo
Le 28 août 2012 à 00:47, Adam Goryachev a écrit :
Hi, I've written a quick addon to collect the temperature of each HDD in my system, and report the data back to Xymon like this:
Fri Aug 24 02:33:11 EST 2012 Temp GOOD (27 degrees)
sda : 27
sdb : 27
Also, hobbit is putting this data in to an RRD file called temp.rrd:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rrd SYSTEM
"http://oss.oetiker.ch/rrdtool/rrdtool.dtd"
<!-- Round Robin Database Dump -->
<rrd>
<version>0003</version>
<step>300</step> <!-- Seconds -->
<lastupdate>1345738019</lastupdate> <!-- 2012-08-24 02:06:59 EST -->
<ds>
<name> sda </name>
<type> GAUGE </type>
<minimal_heartbeat>600</minimal_heartbeat>
<min>NaN</min>
<max>NaN</max>
<!-- PDP Status -->
<last_ds>37</last_ds>
<value>4.4030000000e+03</value>
<unknown_sec> 0 </unknown_sec>
</ds>
<ds>
<name> sdb </name>
<type> GAUGE </type>
<minimal_heartbeat>600</minimal_heartbeat>
<min>NaN</min>
<max>NaN</max>
<!-- PDP Status -->
<last_ds>39</last_ds>
<value>4.6410000000e+03</value>
<unknown_sec> 0 </unknown_sec>
</ds>
So it looks (to me) as though all that is working.
I'm now trying to get the pretty graph to show up, here is my current definition which doesn't work:
[temp]
TITLE HDD Temperature
YAXIS Degrees
DEF:hda=temp.rrd:hda:AVERAGE
DEF:hdb=temp.rrd:hdb:AVERAGE
DEF:hdc=temp.rrd:hdc:AVERAGE
DEF:hdd=temp.rrd:hdd:AVERAGE
DEF:hde=temp.rrd:hde:AVERAGE
DEF:sda=temp.rrd:sda:AVERAGE
DEF:sdb=temp.rrd:sdb:AVERAGE
DEF:sdc=temp.rrd:sdc:AVERAGE
DEF:sdd=temp.rrd:sdd:AVERAGE
DEF:sde=temp.rrd:sde:AVERAGE
LINE2:hda#FF0000:hda
LINE2:hdb#0000FF:hdb
LINE2:hdc#00FF00:hdc
LINE2:hdd#FFFF00:hdd
LINE2:hde#FF00FF:hde
COMMENT:\n
GPRINT:hda:LAST:hda \: %5.1lf%s (cur)
GPRINT:hda:MAX: \: %5.1lf%s (max)
GPRINT:hda:MIN: \: %5.1lf%s (min)
GPRINT:hda:AVERAGE: \: %5.1lf%s (avg)\n
GPRINT:hdb:LAST:hdb \: %5.1lf%s (cur)
GPRINT:hdb:MAX: \: %5.1lf%s (max)
GPRINT:hdb:MIN: \: %5.1lf%s (min)
GPRINT:hdb:AVERAGE: \: %5.1lf%s (avg)\n
GPRINT:hdc:LAST:hdc \: %5.1lf%s (cur)
GPRINT:hdc:MAX: \: %5.1lf%s (max)
GPRINT:hdc:MIN: \: %5.1lf%s (min)
GPRINT:hdc:AVERAGE: \: %5.1lf%s (avg)\n
GPRINT:hdd:LAST:hdd \: %5.1lf%s (cur)
GPRINT:hdd:MAX: \: %5.1lf%s (max)
GPRINT:hdd:MIN: \: %5.1lf%s (min)
GPRINT:hdd:AVERAGE: \: %5.1lf%s (avg)\n
GPRINT:hde:LAST:hde \: %5.1lf%s (cur)
GPRINT:hde:MAX: \: %5.1lf%s (max)
GPRINT:hde:MIN: \: %5.1lf%s (min)
GPRINT:hde:AVERAGE: \: %5.1lf%s (avg)\n
I think the problem is that not every machine will have the same number of disks, nor will they have the same type of disk. Can anyone suggest how to re-write this so that it will work?
Thanks,
Adam