[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rrd-users
Subject:    Re: [rrd-users] RRA of unaltered data
From:       Simon Hobson <simon () thehobsons ! co ! uk>
Date:       2015-11-25 10:36:01
Message-ID: FCB55AE0-D483-415B-A17F-638B77142B80 () thehobsons ! co ! uk
[Download RAW message or body]

Thomas Nilsson <thomas.nilsson@ltu.se> wrote:

> 1. Is there a way to get the values I add to show up unaltered in the RRA?
> Tried with LAST, AVERAGE, MIN and MAX in the RRA declaration.
> 
> 2. How are the values in my RRA calculated?

These together must be one of the most frequently asked questions, to which there is \
a simple answer : http://rrdtool.vandenbogaerdt.nl

In particular, "Rates, normalizing and consolidating" \
http://rrdtool.vandenbogaerdt.nl/process.php

The latter will answer question 2. Once you understand that, then you'll understand \
the answer to question 1 which is: ensure that the normalisation process is a "null \
operation". That means you must supply data on *exactly* step boundaries, for every \
step, only once per step, and missing no steps out.

So in your example, you must ensure that the timestamp of every update is on \
*exactly* a multiple of 5 seconds since unix epoch - not "now", not "a 5 second sleep \
plus the execution time of a few statements after the previous one", but on exactly a \
multiple of 5 seconds. Thus (in bash) you can do :
s=5
t=date +%s
t=$( ( $t / $s ) * $s )
rrdtool update ... $t:$v

This will ensure that the values stored will be exactly what you put in - but only \
until there is some consolidation.

But in general, if you want to store exact values, and especially if they are \
produced at irregular times, then RRD is probably not the right tool.

_______________________________________________
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic