[rrd-users] rrdcached communication via socket.

Aramis aramis at pop-pr.rnp.br
Mon Jul 2 21:58:08 CEST 2012


Hi,

I'm trying to use perl modules to communicate with rrdcached. My 
intention is to update some rrd files.


The daemon is running fine, I can talk to iteratively by a socket:

# socat - /var/run/rrdcached.sock
STATS
9 Statistics follow
QueueLength: 0
UpdatesReceived: 17
FlushesReceived: 0
UpdatesWritten: 0
DataSetsWritten: 0
TreeNodesNumber: 2
TreeDepth: 2
JournalBytes: 539
JournalRotate: 1
HELP
10 Command overview
UPDATE <filename> <values> [<values> ...]
FLUSH <filename>
FLUSHALL
PENDING <filename>
FORGET <filename>
QUEUE
STATS
HELP [<command>]
BATCH
QUIT
QUIT
#


I'm writing a program that updates rrd files automatically, and I want 
this program to be able to communicate with the daemon.


So far, I've tried RRDs and RRD::Simple modules but none of them seem to 
be able to update files *via daemon*.

I tried to do this:


RRDs::update ("$file", "--daemon unix:/var/run/rrdcached.sock", 
"--template", "in:out", "N:$in:$out");

     my $err = RRDs::error;
     syslog('debug', "Update error: $err") if $err;



And in log file I get this error:

Jul  2 16:14:12 host nfsen[4663]: Update error: unknown option '--daemon 
unix:/var/run/rrdcached.sock'



So, it does not behaves like the following commandline:

$ rrdtool update test.rrd --daemon unix:/var/run/rrdcached.sock N:12:13


As the `perldoc RRDs` page says :(

(commandline works fine)


Any ideas?
Thanks in advance,

Aramis.



More information about the rrd-users mailing list