[hobbit] Hobbit Average Data

Henrik Stoerner henrik at hswn.dk
Tue Nov 27 00:05:06 CET 2007


On Mon, Nov 26, 2007 at 10:22:01PM +0100, Henrik Stoerner wrote:
> The simplest solution is probably to setup a pipe to a child process,
> and then write a line with the RRD filename, the template and the data
> to that pipe - the child process can then take care of splitting the
> data into individual records, and store them in the database.

There's an implementation of this in the current snapshot, including
a new hobbitd_rrd manpage that describes how to run it, and what the
input to your custom script looks like:

 --processor=COMMAND
     Feed the raw RRD data into COMMAND via standard  input.  COMMAND
     must  be a simple command with no options; if necessary, COMMAND
     can be a script that runs the real command  with  the  necessary
     options.  The  data sent to COMMAND consists of lines of text of
     the form
        dsname1[:dsname2] time:value1[:value2] rrdtype [key1] [key2]
     First the dataset names, corresponding to the DS definitions  in
     the  RRD  files.   Next the timestamp of the update, followed by
     the values in the same order as the dsname-list. Third  item  is
     the  type of RRD file. After that there may be between 0-2 addi-
     tional keys: For "disk" this is the filesystem  mountpoint,  for
     "tcp" tests it is the service name, for "tcp" "http" tests there
     is also the URL checked. Note that  filesystem  names  and  URLs
     have  forwardslash substituted by comma. See the hobbitd/rrd/*.c
     sourcecode for details, look for the "setupfn"  function  calls.
     An example:

     la 1196115478:7 la
     la 1196115478:169 procs
     la 1196115478:1 users
     la 1196115478:244 clock
     pct:used 1196115478:63:62338144 disk ,root
     realmempct 1196115478:76 memory real
     realmempct 1196115478:0 memory swap
     realmempct 1196115478:20 memory actual
     sec 1196115478:0.03 tcp conn
     sec 1196115478:1.38 tcp http osiris.hswn.dk,


Regards,
Henrik




More information about the Xymon mailing list