<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I found it, well, at least I found a way to make it work, and have a
theory as to why.<br>
<br>
The problem seemed to be the "timeout" value of 5: <tt>DS:value:GAUGE:5:-1:101</tt><br>
<br>
This didn't seem to play well with trying to enter data exactly on 5
seconds.<br>
I re-created the DB, changing the "timeout" value to 10, and data
started to appear in my DB.<br>
<br>
So what I learned is "do not set the timeout to be exactly the same
as the update rate".<br>
<br>
Now I have another question that I can't see the answer to anywhere.<br>
<br>
In some examples, I find multiple CFs being defined. For example:<br>
<blockquote><tt>rrdtool create test.rrd --start N --step 5 \<br>
DS:value:GAUGE:10:-1:101 \<br>
RRA:AVERAGE:0.5:1:30 \<br>
RRA:AVERAGE:0.5:5:6</tt><br>
</blockquote>
So we are keeping two averages, averaged over different periods.<br>
<br>
When graphing, how do I select which of these AVERAGEs to use?<br>
<br>
------------------------<br>
<br>
On 8/17/2010 11:23 AM, Philip Peake wrote:
<blockquote cite="mid:4C6AD389.9000109@vogon.net" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
I am trying to get my first RDD database going.<br>
I think that I understand the doc/tutorial, so tried a really
simple example.<br>
<br>
The database:<br>
<blockquote><tt>rrdtool create test.rrd --start N --step 5
DS:value:GAUGE:5:-1:101 RRA:AVERAGE:0.5:1:12</tt><br>
</blockquote>
What I think this does:<br>
<ul>
<li>Creates a database called test.rrd (it does).</li>
<li>Has a step time of 5 seconds (don't want to wait forever to
see data).</li>
<li>Starts from "now".</li>
<li>Has a single data source called "value", which is a GUAGE
(keeps the value presented)</li>
<li>Data must be greater than -1 and less than 101<br>
</li>
<li>Has a single value stored, which is the AVERAGE of one
"record", so will be equivalent to the value stored.</li>
<li>Keeps 12 x 5 = 60 seconds of data.</li>
</ul>
My data producer:<br>
<blockquote><tt>#!/usr/bin/perl<br>
<br>
my $random_number;<br>
<br>
while (sleep(5)) {<br>
$random_number = rand(100);<br>
print "Adding $random_number\n";<br>
@cmd = ("rrdtool", "update", "test.rrd",
"N:$random_number");<br>
system(@cmd) == 0 or die "Failed: $?";<br>
}</tt><br>
</blockquote>
Once every 5 seconds call "rddtool update test.rrd N:<random
number in range 0 to 100>"<br>
<br>
The database does change after each update.<br>
<br>
My graph:<br>
<blockquote><tt>rrdtool graph mygraph.png -a PNG --start -240
--title="Test" --vertical-label="Random"\<br>
'DEF:v1=test.rrd:value:AVERAGE' 'LINE1:v1#0400ff:Rnd Value'</tt><br>
</blockquote>
What it produces:<br>
<br>
<img src="cid:part1.00060603.00010009@vogon.net" alt=""><br>
<br>
Database doesn't seem to be getting the values:<br>
<blockquote><tt>$ rrdtool fetch test.rrd AVERAGE -s -30 <br>
value<br>
<br>
1282069345: nan<br>
1282069350: nan<br>
1282069355: nan<br>
1282069360: nan<br>
1282069365: nan<br>
1282069370: nan<br>
1282069375: nan</tt><br>
</blockquote>
<br>
I am obviously doing something wrong ... but what???<br>
<br>
Any help appreciated.<br>
<br>
Philip<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rrd-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</a>
<a class="moz-txt-link-freetext" href="https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users">https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users</a>
</pre>
</blockquote>
<br>
</body>
</html>