[Xymon] Xymon Graphs

Jeremy Laidman jlaidman at rebel-it.com.au
Tue Aug 28 05:26:02 CEST 2012


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.

To have xymond_rrd generate separate RRD files, you need to use SPLITNCV in
xymonserver.cfg instead of NCV, like:

SPLITNCV_temp="*:gauge"

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:

[temp]
        TITLE HDD Temperature
        YAXIS Degrees
        FNPATTERN temp,(.*).rrd
        DEF:disk at RRDIDX@=@RRDFN@:lambda:AVERAGE
        LINE2:disk at RRDIDX@#@COLOR@:@RRDPARAM@
        COMMENT:\n
        GPRINT:disk at RRDIDX@:LAST: \: %5.1lf%s (cur)
        GPRINT:disk at RRDIDX@:MAX: \: %5.1lf%s (max)
        GPRINT:disk at RRDIDX@:MIN: \: %5.1lf%s (min)
        GPRINT:disk at RRDIDX@:AVERAGE: \: %5.1lf%s (avg)\n

J


On 28 August 2012 08:47, Adam Goryachev <adam at websitemanagers.com.au> wrote:

>  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" <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
>
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20120828/c20371dc/attachment.html>


More information about the Xymon mailing list