[rrd-users] how to load / updated data in rrd database from a file?

A Darren Dunham ddunham at taos.com
Fri Jul 17 18:11:09 CEST 2009


On Fri, Jul 17, 2009 at 09:59:58AM -0500, William Maniates wrote:
> > You can loop through the csv file, read each line and run an RRD
> > update command for each read line. This way you will effectively
> > feed the RRD database with data for each minute from your csv
> > file. I don't know an automated way to do this. You would need to
> > write a short Perl or Bash script, for example.

> I have been trying this, and perhaps it is because I am configuring my
> data layout incorrectly.  I am trying to configure my line of data like
> this:
> 
> server name  1 2 1 3 1 1 2 1 3 1 2 
> 
> 
> Where the first column is the hostname, and the rest of the columns are
> my data points at 1 minute intervals.  Is this correct, or do I need to
> configure my data in a column format like this:
> server name
> 1
> 2
[...]

I think the key bit here is the "you need to write a script", so you can
use whatever format your script will accept.  Neither of those formats
can be fed directly into update.  See the documentation for what it
requires. 

The main thing is that you have to give a timestamp with each update
value.  You can't just say "they were all one minute apart".  Your
script will need to get that from the data, or it will have to calculate
it (perhaps based on how many points there are).

-- 
Darren



More information about the rrd-users mailing list