[hobbit] Folders RRD info

Greg Hubbard glh.forums at gmail.com
Tue Sep 1 15:18:05 CEST 2009


You will probably want to approach this the same way that Xymon handles disk
sizes, with each disk getting stored in a separate RRD, and with a naming
convention that is compatible with hobbitgraph.  It will take some fiddling.

There are two ways to "catch" this data on the Hobbit server and both are
documented.  One is NCV, and the other is to write your own "data parser" as
an external script.  I prefer the external data parser because it is more
flexible than NCV, but NCV is "compiled in" so therefore "supported".

The thing to look out for is this: the number of directories that you want
to track may be more than Hobbitgraph can handle.  Depending on where you
are going with this you might need to look into using other RRD tools for
graphing so you can avoid the limits in Hobbitgraph (although it is pretty
good).

Are you going to update this every 5 minutes?  If not, you will have some
other challenges to overcome if you try to leverage the Hobbit data
collection/graphing system.

GLH


On 9/1/09, Harold J. Ballinger <hballinger at heritage-healthcare.com> wrote:
>
> This is an example of the output that I am working from to build my script:
> -------------------Output Pasted Below------------------------------
> Searching for directories that have exceeded 3000 megabytes
>    Size (mb)  Files  Directory
>      2265.08   7567  SUB-TOTAL: E:\USERS\aeads
>       164.12   6264  SUB-TOTAL: E:\USERS\atimberlake
>        26.75   2236  SUB-TOTAL: E:\USERS\bdunlap
>      1092.05   3783  SUB-TOTAL: E:\USERS\ccampbell
>       989.58   3143  SUB-TOTAL: E:\USERS\ccampbell.old
>       982.81   3124  SUB-TOTAL: E:\USERS\ccampbell.oldest
>        89.50   2660  SUB-TOTAL: E:\USERS\ccannady
>         0.00      0  SUB-TOTAL: E:\USERS\cdavis
> !     3459.78  10628  SUB-TOTAL: E:\USERS\dbailey
>         0.52      6  SUB-TOTAL: E:\USERS\dbarker
>      1193.83    840  SUB-TOTAL: E:\USERS\ddavis
>       230.26   2887  SUB-TOTAL: E:\USERS\dlowry
>      2312.57   3822  SUB-TOTAL: E:\USERS\dpalacio
>         4.91    230  SUB-TOTAL: E:\USERS\epaschalis
>         0.00      0  SUB-TOTAL: E:\USERS\ginnmon
>      1479.80   3302  SUB-TOTAL: E:\USERS\hballinger
>         9.92    642  SUB-TOTAL: E:\USERS\jcollier
>        37.52   1155  SUB-TOTAL: E:\USERS\jhaddad
>         0.00      0  SUB-TOTAL: E:\USERS\jscott
>      1269.20   3697  SUB-TOTAL: E:\USERS\jtrew
>         0.00      0  SUB-TOTAL: E:\USERS\kbowser
>         0.00      0  SUB-TOTAL: E:\USERS\kbradley
>       552.58    987  SUB-TOTAL: E:\USERS\kdarr
>       107.06   3177  SUB-TOTAL: E:\USERS\kmast
>       112.47   1636  SUB-TOTAL: E:\USERS\kmerritt
>         3.30    164  SUB-TOTAL: E:\USERS\leads
> !     3580.77  11199  SUB-TOTAL: E:\USERS\lfrick
>       537.32   1762  SUB-TOTAL: E:\USERS\lfrick.old
> !     9255.93  16732  SUB-TOTAL: E:\USERS\lfrick.oldest
>      1207.79   6822  SUB-TOTAL: E:\USERS\lhayes
>       417.43   3142  SUB-TOTAL: E:\USERS\lheiser
>        83.59   1328  SUB-TOTAL: E:\USERS\lzipsir
>      2101.66   3466  SUB-TOTAL: E:\USERS\mzatcoff
>       256.97   2249  SUB-TOTAL: E:\USERS\ncrawford
> !     3163.03   5488  SUB-TOTAL: E:\USERS\pshaw
>        46.40    628  SUB-TOTAL: E:\USERS\seads
>         0.00      0  SUB-TOTAL: E:\USERS\shawes
>       905.58   4948  SUB-TOTAL: E:\USERS\swoodard
>         2.48    189  SUB-TOTAL: E:\USERS\test1
>         0.03     33  SUB-TOTAL: E:\USERS\_ICONS
>     37942.57  119936  TOTAL
> -------------------End Copy/Paste--------------------------
> If one of the directories is over the limit that has been defined, the line
> is  indicated with a "!" at the first character position. I will prepend the
> output with "&green %date% %time%" or "&red %date% %time%" depending on
> whether or not any "!" are found in the file to indicate the status of the
> test. I will then replace the "!" with "&red" before storing the file into
> %BBHOME%\logs\folders. I am considering having the "SUB-TOTAL: " stripped
> from each line and having the header and footer/total lines stripped as well
> before sending. This just covers how I will send the test to Xymon.
>
> It sounds like you have some sample scripts that could help me in taking it
> to the next level and by getting this reporting as data into RRD for
> graphing. I am very interested in seeing these scripts so that I can work on
> getting this working 100%.
>
> Thanks so much.
>
> -----Original Message-----
> From: W.J.M. Nelis [mailto:nelis at nlr.nl]
> Sent: Tuesday, September 01, 2009 6:32 AM
> To: hobbit at hswn.dk
> Subject: Re: [hobbit] Folders RRD info
>
>
> > I am writing a new ext called "folders" that will provide a check to
> > see that folders do not exceed a certain size. For example, it will
> > check the folders that contain each user's personal network drive,
> > list them all with their sizes, and indicate any that are over the
> > limit. I have this much worked out and think that I have the red,
> > green, yellow parts of the script working properly.
> >
> >
> >
> > However, it would be even better if I could store the sizes of these
> > folders within Hobbit/Xymon as data in RRD and have  them graphed.
> >
> >
> >
> > How do I send the data to Hobbit in a format that it will understand
> > as being RRD data and that will be tied to the "folders" test for this
> > host?
> >
> >
> This sounds like a variable number of measurements (one per folder) with
> a fixed number of parameters per measurement (one (size) or two
> (size,max)). In that case you should use  the '--extra-test' option (see
> http://www.hswn.dk/hobbit/help/manpages/man8/hobbitd_rrd.8.html). You
> probably also need a script to build the header of each graph. If you
> like, I can send you sample scripts.
>
> Within the body of the status message, you'll include the measured
> values in NCV format, which might be embedded in HTML comment. Note that
> you might need to change other lines in the status message in order to
> avoid them to be interpreted as NCV. One way of doing so is to replace
> each ":" by ":" and each "=" by "=". The script named in
> "--extra-test" writes those values to RRDs. O, include a line in the
> status message, before the measurements, stating the number of
> measurements, that is include a line with "<!-- linecount=N -->" with a
> suitable value for N.
>
> Kind regards,
> Wim Nelis.
>
>
>
>
> *******************************************************************************************************
> The NLR disclaimer (http://www.nlr.nl/emaildisclaimer) is valid for NLR
> e-mail messages.
>
> *******************************************************************************************************
>
>
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
>
>
>
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
>
>
>


-- 
Disclaimer:  1) all opinions are my own, 2) I may be completely wrong, 3) my
advice is worth at least as much as what you are paying for it, or your
money cheerfully refunded.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20090901/b6d3d75c/attachment.html>


More information about the Xymon mailing list