Am Freitag 25 Dezember 2009 03:07:34 schrieb Harald Welte:
Hi Clemens,
On Fri, Dec 25, 2009 at 01:41:06AM +0100, Clemens Hopfer wrote:
At the moment it only supports one data source
for a single rrd file, but
I'll add commandline options for the file and counter name.
I think this is the easiest solution, adding a new counter is just
creating a new rrd file and adding a cronjob.
well, it's also easy to generate a list of the counters from the sql
database by using something like "select unique(name) from counters" and
then iterate over that list...
hmm, I'm not very familiar with rrdtool, but
afaics there is no direct option
in rrdtool to add a data source after creating a rrd file.
However the Perl RRD bindings actually got a function to do that and there are
several suggestions to dump the rrd file to xml, change that file and recreate
the rrd file but I'm not sure if this is a really good idea...
That's one reason (apart from simplicity) why i only used one data source for
now.
It would be also possible to use a dedicated directory and create RRDs of new
counters on-the-fly.
I'll have a look at the Perl api, although I don't like Perl that much... ;-)
It would be
great if someone could post some sample data to do some
tests.
I cannot send you the full hlr.sqlite3 of my test machine, sorry. but I've
attached the output of 'sqlite3 -csv hlr.sqlite3 "select * from
counters;"'. The counter values are very low as I've been playing around
with few phones and few events, but it should give you a feeling for it.
thanks,
that's everything I wanted :-)
btw: Will you be at 26C3?
yep, I'll arrive at Saturday afternoon.