[rrd-users] Re: Adding "0" instead of nothing when there's no data

Rejo Zenger subs-rrd-users at sisterray.xs4all.nl
Wed Sep 18 17:35:21 MEST 2002


++ 17/09/02 19:30 +0200 - Rejo Zenger:
>I'm a complete newbie when it comes to RRDtool, so bear with me. :)
[...]

Therefor, I'll try to explain what I want and how to achieve it,
comments would be very very welcome...

My goal: graph the feed in the nl.* hierarchy on Usenet. Every group
should have it's own set of graphs for hourly, daily, weekly, monthly
and yearly statistics. Preferably, the long term graphs show trends
(like two averages with a different timespan) [1].

I have therefor setup an extra channel on my newsserver creating a batch
with an entry like "nl.foto,nl.markt.elektronica 1660" for every posted
article (number is bytes of article). This batchfile is flushed every
minute by a script run from cron. This script counts all the entries
for every group and summarizes the bytes. In the end the script updates
the rrd files for every group.

The files have been created with:

     RRDs::create ("$rrd_data",
                        "--step=60",
                        "--start=$time_start",
                        "DS:articles:ABSOLUTE:50400:U:U",
                        "DS:bytes:ABSOLUTE:50400:U:U",
                        "RRA:AVERAGE:0.5:1:600",
                        "RRA:AVERAGE:0.5:5:600",
                        "RRA:AVERAGE:0.5:30:700",
                        "RRA:AVERAGE:0.5:120:775",
                        "RRA:AVERAGE:0.5:1440:797",
                        );
      my $ERR=RRDs::error;
      warn "ERROR while updating $rrd_data: $ERR\n" if $ERR;

I'm not sure if those RRA's fit my goals.

The rrd files get update with this bit (where $p_art is number of
articles for that minute and $p_bytes the number of bytes of those
articles):

      RRDs::update ("$rrd_data",
                         "--template=articles:bytes",
                         "$time_now:$p_art:$p_bytes",
                         );
      my $ERR=RRDs::error;
      warn "ERROR while updating $rrd_data: $ERR\n" if $ERR;

Things I have not yet figures out (help is welcome):

- How to get these two average lines, I don't know how to compute them
  and how to place them.

- On the preliminary graphs I have created already, the numbers to the
  left say "<number> m". It's not clear to me where this "m" is coming
  from. I have read the "Grpahics with some maths" section in the
  tutorial, but still don't get it in the relation to my numbers.

- The averages RRDtool computes seem to be a bit to high - probably
  connected to the previous problem.

Anyone comments? Is this the way to go, or am I completely out of bounds
already?

Thanks in advance. Thanks for RRDtool...


[1] Compare with a load graph. The one-minute average is an AREA, the
    five and fifteen-minute averages are lines on top of the AREA.
-- 
# Rejo Zenger
# rejo at sisterray.xs4all.nl, pgp: see headers, http://www.xs4all.nl/~sister

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list