[rrd-users] how to take data from a .log file to RRD database

A Darren Dunham ddunham at taos.com
Fri Nov 5 17:44:02 CET 2010

On Fri, Nov 05, 2010 at 09:01:36AM +0000, youssef eladouzi wrote:
>     I use  RRDtool for the first time, I create RRD database to supervise
> traffic of successful requests of one server. The number of successful
> requests are generated every 60 seconds, and stored in a file named
> data.log, it looks like  :
>     10/08/31-02:46:56    131
>     10/08/31-02:46:56    138
>     10/08/31-02:46:56    144
>     10/08/31-02:47:56    119
>     10/08/31-02:47:56    121
>     10/08/31-02:47:56    122

If this is all coming from one server, why do you have 3 data points
with the same timestamp?  Unless you process this data in some way,
rrdtool isn't going to let you insert them directly.  It will accept the
first data point and ignore later ones with the same timestamp.

> [snip]
>     echo "Creation of database ${FICRRD}"
>     rrdtool create    ${FICRRD}.rrd \
>         -b ${DTDEB} \
>         -s 60   #update every 1 minute so i can collect all data.
>             DS:${FICRRD}:GAUGE:120:0:U \
>           RRA:AVERAGE:0.5:5:6
>     # CDP=5 PDP(1 PDP  collected each 60s), we stored each 30 min.
> [snip]

> when i run  my script shell using the command ./essai.sh i get this:
> ERROR: you must define at least one Round Robin Archive
> ./essai.sh: 26: -b: not found

This suggests that even though you show a continuation character at the
end of the previous line (the "rrdtool create" line), the shell is not
acknowledging it.  It's thinking the -b is the start of a new line and
is trying to run it as a program.  

Perhaps you have whitespace past the end of the backslash.

Finally, your RRA is only holding 6 rows.  That's not much data to show
on a graph.  You might want to bump that up to a few hundred or so. 


More information about the rrd-users mailing list