Thanks to everyone for your feedback!
Figured I'd give this a shot, but I can't seem to diagnose what's going on. There's no apparent change in our xymon install. We're running 4.3.7.
I've verified that both pl scripts are in the $xymonhome/server/ext/ directory on the server and $xymonhome/client/ext/ perl is installed, and the scripts are chown $xymonuser and chmod u+x.
I've edited the scripts to use our company name instead of stanwell. (do you have an errant graph?)
I'm assuming this would create an additional column on the overview page, or maybe an additional graph under trends.... See comments interspersed below, to document the process I went through for any other parties. (I'm using CentOS 6.5, all updates applied
-Ben
On 01/29/2014 05:36 PM, Ford, Alan wrote:
Hi Ben, I have written a client program to capture the iostat details so that a backend process can display it. I do it this way as I have custom client scripts for RHEL and solaris 9 and the use the same backend :-)
My client perl script works for RHEL 4, 5 and 6.
Add this section to clientlaunch.cfg on your client.
[fsio] ENVFILE $XYMONCLIENTHOME/etc/xymonclient.cfg CMD $XYMONCLIENTHOME/ext/xy-fsio_rhel.pl LOGFILE $XYMONCLIENTHOME/logs/xymonclient.log INTERVAL 5m
Also, a) cat xy-fsio_rhel.pl | sed -e s/stanwell.com/mycompany.com/g > $XYMONCLIENTHOME/client/ext/xy-fsio_rhel.pl b) dos2unix $XYMONCLIENTHOME/client/ext/xy-fsio_rhel.pl c) chown xymonclient.xymonclient $XYMONCLIENTHOME/client/ext/* d) chmod u+x $XYMONCLIENTHOME/client/ext/* e) /etc/sudoers:
xymonclient ALL=NOPASSWD:/usr/sbin/lvdisplay xymonclient ALL=NOPASSWD:/sbin/partx
f) edit xy-fsio_rhel.pl set these variable definitions:
$LVDISPLAY = "$SUDO /usr/sbin/lvdisplay -m 2>/dev/null"; $PARTX = "$SUDO /sbin/partx";
On you Xymon server: Add this section to tasks.cfg
"rrddata" updates RRD files with information that arrives as "data" messages.
[rrddata] ENVFILE /home/xymon/xymon/server/etc/xymonserver.cfg NEEDS xymond CMD xymond_channel --channel=data --log=$XYMONSERVERLOGS/rrd-data.log xymond_rrd --rrddir=$XYMONVAR/rrd
--extra-script=/home/xymon/server/ext/process_fsio.pl
--extra-tests=fsio
Note that there is already a section called "rrddata". Basically, add
two lines to that section (don't forget the backslash at the end of the
CMD line!) :
--extra-script=/home/xymon/server/ext/process_fsio.pl
--extra-tests=fsio
Also, install the script: a) cat process_fsio.pl | sed -e s/stanwell.com/mycompany.com/g > $XYMONHOME/server/ext/process_fsio.pl b) dos2unix $XYMONHOME/client/ext/process_fsio.pl c) chown xymonclient.xymonclient $XYMONHOME/server/ext/* d) chmod u+x $XYMONHOME/server/ext/*
Add this to graphs.cfg
[fsio] FNPATTERN ^fsio,(.*).rrd TITLE Disk Read/Write YAXIS Stats DEF:pb at RRDIDX@=@RRDFN@:pbusy:AVERAGE DEF:kr at RRDIDX@=@RRDFN@:kread_sec:AVERAGE DEF:kw at RRDIDX@=@RRDFN@:kwrite_sec:AVERAGE CDEF:pbn at RRDIDX@=pb at RRDIDX@,5,GT,pb at RRDIDX@,UNKN,IF COMMENT:DISK IO\: @RRDPARAM@ \: GPRINT:pbn at RRDIDX@:LAST:busy = %3.0lf%%\n AREA:kr at RRDIDX@#@COLOR@: GPRINT:kr at RRDIDX@:LAST:kB Read/sec \: %5.0lf (cur) GPRINT:kr at RRDIDX@:MAX:\: %5.0lf (max) GPRINT:kr at RRDIDX@:MIN:\: %5.0lf (min) GPRINT:kr at RRDIDX@:AVERAGE:\: %5.0lf (avg)\n AREA:kw at RRDIDX@#@COLOR@: GPRINT:kw at RRDIDX@:LAST:kB Write/sec\: %5.0lf (cur) GPRINT:kw at RRDIDX@:MAX:\: %5.0lf (max) GPRINT:kw at RRDIDX@:MIN:\: %5.0lf (min) GPRINT:kw at RRDIDX@:AVERAGE:\: %5.0lf (avg)\n
[fsio2] FNPATTERN ^fsio,(.*).rrd TITLE I/O Utilization YAXIS Stats DEF:p at RRDIDX@B=@RRDFN@:pbusy:AVERAGE DEF:p at RRDIDX@A=@RRDFN@:asvc_t:AVERAGE DEF:p at RRDIDX@W=@RRDFN@:wsvc_t:AVERAGE CDEF:p at RRDIDX@t=p at RRDIDX@B,5,GT,p at RRDIDX@B,UNKN,IF COMMENT:DISK IO\: @RRDPARAM@ \: GPRINT:p at RRDIDX@t:LAST:busy = %3.0lf%%\n AREA:p at RRDIDX@A#@COLOR@: GPRINT:p at RRDIDX@A:LAST:asvc_t \: %5.1lf (cur) GPRINT:p at RRDIDX@A:MAX: \: %5.1lf (max) GPRINT:p at RRDIDX@A:MIN: \: %5.1lf (min) GPRINT:p at RRDIDX@A:AVERAGE: \: %5.1lf (avg)\n LINE1:p at RRDIDX@W#@COLOR@: GPRINT:p at RRDIDX@W:LAST:wsvc_t \: %5.1lf (cur) GPRINT:p at RRDIDX@W:MAX: \: %5.1lf (max) GPRINT:p at RRDIDX@W:MIN: \: %5.1lf (min) GPRINT:p at RRDIDX@W:AVERAGE: \: %5.1lf (avg)\n
No changes so far...
Add these in your xymonserver.cfg
TEST2RRD="fsio,fsio2" GRAPHS="fsio::1,fsio::2"
And away you go :-)
*Almost*! I get a graph under "trends" but for some reason the graph comes up with numbers all being blank or "nan". I'm setting this up on a nonproduction server, so I've tried generating some disk activity to make sure it's not a divide by zero error or something.
I wish my perl foo was a bit more up to snuff.
participants (1)
-
lists@benjamindsmith.com