[rrd-users] Gathering number of entries being loaded into SQL DB per hour.
William R. Lorenz
wrl at express.org
Tue Nov 25 01:07:46 CET 2008
Hi Micha,
On Mon, 24 Nov 2008, Micha Drodziewicz wrote:
> William R. Lorenz, dnia 2008-11-24 17:07 napisal:
>> > I have a problem designing rrd database. The case is I want to keep
>> > track of number of entries being loaded into the database. My approach
>> > is to query for number of inventories that were loaded from one hour
>> > before till NOW and then store this number. But I have a problem with
>> > designing DS and RRA's. Any help would be greatly appreciated.
>> Why not simply have the DS/RRA expect an entry every hour, and then do
>> a 'SELECT COUNT(*) FROM table' with the appropriate WHERE clause and
>> then call-out to rrdtool as you run the query each hour? This should
>> be no different than using rrdtool to track other variables each hour
> I am creating RRD file with this command:
> rrdtool create db.rrd --step=3600
> DS:loads:GAUGE:4000:U:U RRA:AVERAGE:0.5:1:24
> I then update it every hour with data gathered within this hour. Why I
> do this instead of doing a full count? Well, this is Oracle DB which is
> 600GiB in size and I do not know if it is a good idea to query the full
> count every time (maybe there is some Oracle expert here that will tell
A full row count and an incremental hourly count are _completely_
different from an SQL standpoint. :-) I imagine an hourly count with an
hourly gauge is what you're after, rather than calculating counter
difference between hours, as you're looking for rows added per hour?
> The problem is that I get sloppy edges. When value changes from 100 to
> 200 I get 100, 110, 190 in the rrd data. So there is no sharp peak.
I don't understand what you mean by "sharp peak" here. Perhaps someone
with more rrdtool experience will chime-in with a better answer for you.
--
William R. Lorenz
More information about the rrd-users
mailing list