[rrd-users] can't sanity-check rrdtool with sample data ... please help

Gore Jarold gore_jarold at yahoo.com
Tue Jun 26 23:34:19 CEST 2007


New user of rrdtool.

I plan on graphing the number of hits I get each day on my webserver.

I have logs going back over a year, so my RRD will be backdated many months back and I will populate it with a script that parses my weblogs.  Sounds very easy, but beause I am new I decided to just test it out and get a sense of how it worked.

So I create an RRD:

rrdtool create hits.rrd --start 1141200000 --step 86400 DS:hits:GAUGE:172800:0:U RRA:MAX:0.5:1:3650

starting about 13 months ago, step size is one whole day ... I thought that ABSOLUTE was a better choice for a discrete number every day, but every example I saw of web hits people were using GAUGE, so I guess I will too.

Not sure if MAX is right, but the point is I do not want to do ANY averaging or summing or ANYTHING.  I just want to plug in one number per day and graph that SINGLE number each day.  The end.  I assume MIN/MAX/LAST would provide the same results, right ?

Ok, so the RRD creates without errors.  Now I populate the first six days of data with make-believe values:

rrdtool update hits.rrd 1141286400:1 1141372800:10 1141459200:10 1141545600:12 1141632000:12 1141718400:12

Easy.  Start time is 1141200000, so my first value will be +86400, and adding +86400 each value after that.  Again, this completes without errors.

So, all is well - I'll just check the data with fetch to make sure it comes back just as I expect it to:

# rrdtool fetch hits.rrd MAX --start 1141200000 --end 1141718400
                           hits

1141257600: 1.0000000000e+00
1141344000: 7.0000000000e+00
1141430400: 1.0000000000e+01
1141516800: 1.1333333333e+01
1141603200: 1.2000000000e+01
1141689600: 1.2000000000e+01
1141776000: nan


And here are the problems.  As you can see, the above output is completely wrong.

The first, obvious, and mind-blowing behavior is that the time values in the output DO NOT MATCH my data points.  My first data point was at time:

1141286400

and fetch returns that data point at:

1141257600

And then, the obvious problem that the data values are not correct - the values I entered into the RRD are clearly:

1,10,10,12,12,12

and fetch is giving me back:

1,7,1,11.3,12,12

(the 11.3 is particularly humurous)

So, I give up.  Is there a secret command line switch to "turn off the internal RNG that is applied to all dates and values" ?

My question is simple:  How do I plug in 6 test values with 6 specific dates and successfully fetch them back out again _exactly as I entered them_ ?

Thanks.

       
---------------------------------
Choose the right car based on your needs.  Check out Yahoo! Autos new Car Finder tool.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20070626/4c569307/attachment-0001.html 


More information about the rrd-users mailing list