Xymon Mailing List Archive search

Folders RRD info

6 messages in this thread

list Harold J. Ballinger · Mon, 31 Aug 2009 13:42:05 -0400 ·
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?

Thanks in advance!


• Harold Ballinger
IT Manager
Heritage Healthcare, Inc.
 (XXX) XXX-XXXX  | helpdesk
 (XXX) XXX-XXXX  | office
 (XXX) XXX-XXXX  | fax

[cid:image001.jpg at 01CA2A40.D4045E10]

Visit our website: www.heritage-healthcare.com<http://www.heritage-healthcare.com/>;
list Stef Coene · Mon, 31 Aug 2009 20:45:50 +0200 ·
quoted from Harold J. Ballinger
On Monday 31 August 2009, Harold J. Ballinger wrote:
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?
If you have the latest xymon version, you can send an extra trends message.  
An example:

bb <xymon server> "data <server name>.trends
[test.rrd]
DS:test:GAUGE:600:0:U 10"

This will create a test.rrd file in the rrd directory on the hobbit server 
with the numer 10 in the data source named test.
In your case, I think it's best to name your rrd's like the rrds used to store 
the filesystem information.

And of course you need some extra stuff in hobbitgraph.cfg.
If you send the folder message, you can include the needed links to the graphs 
so the graphs are displayed on the folter check page.


Stef
list W.J.M. Nelis · Tue, 01 Sep 2009 12:31:38 +0200 ·
quoted from Stef Coene
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 "&#58;" and each "=" by "&#61;". 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.
*******************************************************************************************************
list Harold J. Ballinger · Tue, 1 Sep 2009 09:04:24 -0400 ·
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.
quoted from W.J.M. Nelis

-----Original Message-----
From: W.J.M. Nelis [mailto:user-f4ccfde53c0d@xymon.invalid] Sent: Tuesday, September 01, 2009 6:32 AM
To: user-ae9b8668bcde@xymon.invalid
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 "&#58;" and each "=" by "&#61;". 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.
*******************************************************************************************************
list Greg Hubbard · Tue, 1 Sep 2009 08:18:05 -0500 ·
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
quoted from Harold J. Ballinger


On 9/1/09, Harold J. Ballinger <user-fc4f93976dc8@xymon.invalid> 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:user-f4ccfde53c0d@xymon.invalid]
Sent: Tuesday, September 01, 2009 6:32 AM
To: user-ae9b8668bcde@xymon.invalid
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 "&#58;" and each "=" by "&#61;". 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.

*******************************************************************************************************

-- 

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.
list Stef Coene · Tue, 1 Sep 2009 16:36:37 +0200 ·
quoted from Greg Hubbard
On Tuesday 01 September 2009, Greg Hubbard wrote:
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".
There is 3: you can send a trends message, see my previous answer.  This is 
much more flexible then NVC and you don't have to write an external parser.
So the script send the normal message and an other trends message.


Stef