To handle variable numbers of disks with varying disk names, you need to end up with multiple RRD files, named (eg) temp,hda.rrd, temp,hdb.rrd, and so on.<div><br></div><div>To have xymond_rrd generate separate RRD files, you need to use SPLITNCV in xymonserver.cfg instead of NCV, like:</div>
<div><br></div><div>SPLITNCV_temp="*:gauge"</div><div><br></div><div>You'll need to restart Xymon, or at least kill off all of the xymond_rrd processes, and you should start getting multiple RRD files. Then you can use something like this in graphs.cfg:</div>
<div><br></div><div><div>[temp]</div><div> TITLE HDD Temperature</div><div> YAXIS Degrees</div><div> FNPATTERN temp,(.*).rrd</div><div> DEF:disk@RRDIDX@=@RRDFN@:lambda:AVERAGE</div><div> LINE2:disk@RRDIDX@#@COLOR@:@RRDPARAM@</div>
<div> COMMENT:\n</div><div> GPRINT:disk@RRDIDX@:LAST: \: %5.1lf%s (cur)</div><div> GPRINT:disk@RRDIDX@:MAX: \: %5.1lf%s (max)</div><div> GPRINT:disk@RRDIDX@:MIN: \: %5.1lf%s (min)</div><div> GPRINT:disk@RRDIDX@:AVERAGE: \: %5.1lf%s (avg)\n</div>
<div><br></div><div>J</div><div><br></div><div><br></div><div class="gmail_quote">On 28 August 2012 08:47, Adam Goryachev <span dir="ltr"><<a href="mailto:adam@websitemanagers.com.au" target="_blank">adam@websitemanagers.com.au</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
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:<br>
<br>
<h3> Fri Aug 24 02:33:11 EST 2012 Temp GOOD (27 degrees)</h3>
<pre>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 <a href="http://oss.oetiker.ch/rrdtool/rrdtool.dtd" target="_blank">"http://oss.oetiker.ch/rrdtool/rrdtool.dtd"</a>>
<!-- 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
</pre>
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?<br>
<br>
Thanks,<br>
Adam<br>
</div>
<br>_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
<br></blockquote></div><br></div>