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

Alex van den Bogaerdt alex at ergens.op.het.net
Thu Sep 19 00:55:30 MEST 2002


On Wed, Sep 18, 2002 at 09:11:53PM +0200, Rejo Zenger wrote:

> >50400: Updates received 50400 seconds apart result in unknowns.
> >This is "a bit" high.  What do you try to achieve?
> 
> If there's no data coming in, there is no feed. That should be reflected
> with just a simple "0¨ articles and "0" bytes.

Then you're *not* doing the right thing.  You are saying that
it is OK for updates to be 9 hours apart.  If you update
at 00:00 and the next update is at 08:00, you will be saying
that the *entire*range* between 00:00 and 08:00 has the same
rate of x/(8*3600) articles per second.

Yes, this means you will get 8 hours of 0.0000347222 articles
per second in this example.

You will be filling up to 9 * 60 PDPs at once with just 1 update.

Just "checkpoint" the database.  If there's no data available,
say so by updating with either "U" for unknown or "0" for
known-to-be-zero.

>                                                I want to use the unknown
> part to show abnormal long time no feed only. I do not recall how I got
> to that number, but 10080 would be usefull (7 days no feed: there must
> be a problem somewhere).

Seconds, not intervals.  50400 seconds, not 50400 minutes.

> >>                         "RRA:AVERAGE:0.5:1:600",
> >
> >600 CPDs of 1 PDP per CDP  --> 600 minutes.
> 
> I find these abreviations confusing. But even without the abreviations I
> find it hard to understand the meaning of each of the fields. The first
> one is obvious. The second also, but ony if it is AVERAGE. What exactly
> the MAX, MIN and LOW function do is unclear to me (or at least, not
> *that* clear, and the manpage doesn't really help there).

In this case, there will be no difference between average, min and max.
But if you're going to use 5 Primary Data Points into one Consolidated
Data Point using Consosidation Function "x", it matters.

CF        5 PDPs      CDP    because

MIN:      1,4,3,5,2   1      min(1,4,3,5,2)==1
AVERAGE   1,4,3,5,2   3      avg(1,4,3,5,2)==3
MAX       1,4,3,5,2   5      max(1,4,3,5,2)==5
LAST      1,4,3,5,2   2      last(1,4,3,5,2)==2

If you want to show the average on your yearly graph (the one
consolidating 1440 minutes into one database row --> 1440 PDPs
into 1 CDP) you need to use the AVERAGE consolidation function.
This can be used to view the real rate of messages per day.

If you want to show the maximum on your yearly graph, you need
to use CF MAX.  This can be used to view the maximum use on each
day (is your network connection fast enough or is it hitting the
ceiling every day).

....minimum.....   ....minimum....  Has the power dropped below
200 Volt on a certain day.

....last.... ....last....  What was the last known stock value
on a certain day.

> If I understand this correct, the fourth field says how many data is
> used for every point in the graph. The fifth field tells you how many of
> those points are used for the entire graph. Right?

Wrong.  The 4th field tells you how many PDPs are needed to create one
CDP.  The 5th field is the amount of CDPs in that database part.

It is perfectly possible to create an image that displays one CDP
using more than one pixel.  It is also possible to display more than
one CDP in one pixel (in which case consolidation will happen at
graph time).

Example:  "--width 600 --end now --start end-1200days" will display
2 days per pixel.

> So, if you use 5 datapoints for a total of 600 graph points, this would
> be perfectly for a graph with a timespan with a timespan of 3000 minutes
> (if step was set to 60 seconds). Right?

3000 minutes and 600 pixels means 5 minutes per pixel.  *If* there is
an RRA that has CDPs which carry 5 minutes of information, this RRA
will be used.  In your case there is.  It is the RRA that has 5 PDPs
per CDP.

BUT: If you ask for "--end now --start end-3000minutes" and "now"
happens to be "HH:MM" where "MM" is not exactly a multiple of 5
(so: Not 10:55, 11:00, 11:05, 11:10 and so on) it may be possible
that RRDtool selects another RRA as the best match.
Perhaps it determines that the 1-minute RRA is a better match. This
depends on what you specify and on what's available.

> Then function of this third field, I'm complete gone.

I'm 100.7% sure I explained this *very* recently on this list or on
the MRTG list.  Recent as in: This week.  Google for "50%" and my
name or so.

> Well. I want to create graphs of 600 pixels wide. I want to have an
> hourly, daily, weekly, monthly and a yearly graph. Thus, for the daily I
> would need 1440 graphpoints of each 1 datapoints (resulting in a total
> of 1440 minutes of data, which equals 24 hours). Is this way of thinking
> correct?

For a graph displaying 86400 seconds of data in 600 pixels, you need
to display 144 seconds per pixel.  You don't have such an RRA. This
means RRDtool will have to use another RRA that it considers to be
the "best match" to your question.

> I understand and this would give me the perfect average for an AREA.
> But, on top of that I would like to have a two more lines. So, in the
> yearly graph there should be an average of postings per day, one line
> with an average computed as the average of postings when looking at a
> timewindow of 30 days and an average computed as the average of postings
> when looking at a timewindow of 90 days.

I don't think RRDtool will do this.  Maybe you can use the work of
Jake Brutlag (to be found in the developers release).  I don't know.
What I do know is that you probably shouldn't try the hard stuff until
you fully understand the easy stuff.  You're not.

Each CDP is (when using an AVERAGE CF) an average of exactly the
amount of PDPs that you specified.  It does *not* look at 30 days
or 60 days.  It only looks at (for example) 5 minutes at a time.

> >That's mili.  One article in a minute results in 1/60 articles per
> >second which will be displayed as 16.667 mili-articles per second.
> 
> Ok. So, so if I want to have it displayed as articles per second I have
> to add the line "CDEF:art_avg_2=art_avg,60,*" to the graph? If, at a

no.  You *are* seeing articles per second already.

> certain point, there were 2 postings in one minute, this would show as a
> line at "2.0". It looks to be good now, I just want to be certain... :)

No.  2 postings in one minute will show up as 0.033 postings per second.
Without doing anything special, this will be represented to you as
33 mili-postings per second.

> >Try using "CDEF:perminute=persecond,60,*" and display that.
> 
> Hehehe. Note to self: first read entire message, than comment. :)

This will be PER MINUTE.  Big difference.  It is OK to display
messages per minute but be sure to say so on the graph.  Also
understand that the database will have messages per second.  It
is a rate, not a count.

> Thank you! I have probably some more days to go before the results are
> the way I want them, bit this is looking promissing...

Please do share an URL for us to view.  Maybe even accompanied by
some scripts and INN config.  This will help others to do the job.

cheers,
Alex

--
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