[rrd-users] Help - probably a really stupid mistake somewhere ...
Philip Peake
philip at vogon.net
Tue Aug 17 21:11:55 CEST 2010
I found it, well, at least I found a way to make it work, and have a
theory as to why.
The problem seemed to be the "timeout" value of 5: DS:value:GAUGE:5:-1:101
This didn't seem to play well with trying to enter data exactly on 5
seconds.
I re-created the DB, changing the "timeout" value to 10, and data
started to appear in my DB.
So what I learned is "do not set the timeout to be exactly the same as
the update rate".
Now I have another question that I can't see the answer to anywhere.
In some examples, I find multiple CFs being defined. For example:
rrdtool create test.rrd --start N --step 5 \
DS:value:GAUGE:10:-1:101 \
RRA:AVERAGE:0.5:1:30 \
RRA:AVERAGE:0.5:5:6
So we are keeping two averages, averaged over different periods.
When graphing, how do I select which of these AVERAGEs to use?
------------------------
On 8/17/2010 11:23 AM, Philip Peake wrote:
> I am trying to get my first RDD database going.
> I think that I understand the doc/tutorial, so tried a really simple
> example.
>
> The database:
>
> rrdtool create test.rrd --start N --step 5 DS:value:GAUGE:5:-1:101
> RRA:AVERAGE:0.5:1:12
>
> What I think this does:
>
> * Creates a database called test.rrd (it does).
> * Has a step time of 5 seconds (don't want to wait forever to see
> data).
> * Starts from "now".
> * Has a single data source called "value", which is a GUAGE (keeps
> the value presented)
> * Data must be greater than -1 and less than 101
> * Has a single value stored, which is the AVERAGE of one "record",
> so will be equivalent to the value stored.
> * Keeps 12 x 5 = 60 seconds of data.
>
> My data producer:
>
> #!/usr/bin/perl
>
> my $random_number;
>
> while (sleep(5)) {
> $random_number = rand(100);
> print "Adding $random_number\n";
> @cmd = ("rrdtool", "update", "test.rrd", "N:$random_number");
> system(@cmd) == 0 or die "Failed: $?";
> }
>
> Once every 5 seconds call "rddtool update test.rrd N:<random number in
> range 0 to 100>"
>
> The database does change after each update.
>
> My graph:
>
> rrdtool graph mygraph.png -a PNG --start -240 --title="Test"
> --vertical-label="Random"\
> 'DEF:v1=test.rrd:value:AVERAGE' 'LINE1:v1#0400ff:Rnd Value'
>
> What it produces:
>
>
>
> Database doesn't seem to be getting the values:
>
> $ rrdtool fetch test.rrd AVERAGE -s -30
> value
>
> 1282069345: nan
> 1282069350: nan
> 1282069355: nan
> 1282069360: nan
> 1282069365: nan
> 1282069370: nan
> 1282069375: nan
>
>
> I am obviously doing something wrong ... but what???
>
> Any help appreciated.
>
> Philip
>
>
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20100817/fd4a753a/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 9412 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/rrd-users/attachments/20100817/fd4a753a/attachment.png
More information about the rrd-users
mailing list