[rrd-users] Gathering number of entries being loaded into SQL DB per hour.
Michał Droździewicz
michal at drozdziewicz.pl
Mon Nov 24 21:42:05 CET 2008
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 with the
> appropriate RRA archive times to meet your data retention requirements.
>
> Is there a specific problem you have when trying to implement this?
The problem is that I definitely do something wrong ;)
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
me if this will kill my DB ;) )
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.
--
MD
More information about the rrd-users
mailing list