On 04/16/2012 01:19 PM, Daniel Hilst wrote:
When I do an update on some rrd file the rrdtool -- or something --
spread my input value by time.

Here is how I reproduce:

1) Create my rrd with this command
rrdtool create --step 10 test.rrd DS:v:GAUGE:600:U:U RRA:AVERAGE:0.5:1:50

2) The feed it with:
rrdtool update test.rrd 1334578211:10
rrdtool update test.rrd 1334578221:0


I get
1334578210 9.000000
1334578220 1.000000


The RRDtool have spread my values, so 9 + 1 = 10, Its cool, but some
times I want 10, then 0.. Is there a way to turn this feature off for
specific rrd file?

If update rrd on 10 multiples then it works as I expect, so If I did:
rrdtool update test.rrd 1334578210:10
rrdtool update test.rrd 1334578220:0

I would get
1334578210 10.000000
1334578220 0.000000

I'm using collectd so I cant round up epoch..


Thanks in advance!

Cheers!

My solution was create a patch to collectd to round up the epoch before submit..

[]'s

Here is if is of any interest :)

--
Follow the white rabbit!
diff --git a/src/rrdtool.c b/src/rrdtool.c
index 56a82d0..ab66441 100644
--- a/src/rrdtool.c
+++ b/src/rrdtool.c
@@ -134,11 +134,14 @@ static int srrd_update (char *filename, char *template,
                int argc, const char **argv)
 {
        int status;
-
+        char *chp;
        optind = 0; /* bug in librrd? */
        rrd_clear_error ();
 
-       status = rrd_update_r (filename, template, argc, (void *) argv);
+        chp = strchr(argv[0], ':');
+        *--chp = '0';
+        
+        status = rrd_update_r (filename, template, argc, (void *) argv);
 
        if (status != 0)
        {
_______________________________________________
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

Reply via email to