RRDCacheD: Add the "FETCH" command. ff/rrdc_fetch
authorFlorian Forster <octo@noris.net>
Wed, 24 Feb 2010 16:34:41 +0000 (17:34 +0100)
committerFlorian Forster <octo@noris.net>
Wed, 24 Feb 2010 16:35:51 +0000 (17:35 +0100)
commit5098867bebb81ae400406fe750c2c7a536538ac7
tree441b8bf187fb07f0965214e325a6aab42269b303
parent596355adbe6bbedc736543e7735c2adfeccd7b7e
RRDCacheD: Add the "FETCH" command.

Add a "FETCH" command to RRDCacheD which behaves like a (simplified
version of) rrdfetch(1).

This has advantages over calling "FLUSH" from within the "client",
especially if the daemon is accessed using a network socket. For one, it
makes it easy to separate collecting and storing of data on one side and
creating graphs on another, possibly more public server. Without this
command this is only possible using networked file systems and similar
techniques.

When talking to an instance of RRDCacheD via a network socket, only
relative pathnames are allowed. If the RRD file is to be accessed
afterwards (why else would one call "FLUSH"?), the client has to be in a
specific directory so the *same* relative path can be used. If the file
is on a share mounted via the network, the required CWD may differ from
the CWD of the server, making developing and deploying solutions using
separated storing and graphing unnecessarily hard.

The data can be accessed using "rrdc_fetch" which should be a drop-in
replacement for "rrd_fetch_r". This makes it easy for programs using the
RRDtool C API to use this new functionality.
doc/rrdcached.pod
src/rrd_client.c
src/rrd_client.h
src/rrd_daemon.c