[rrd-users] integrating rrdcached with MRTG
Stuart Kendrick
skendric at fhcrc.org
Thu Dec 17 17:06:45 CET 2009
Hi folks,
I'm also taking a stab at integrating rrdcached (rrdtool-1.4.2) with MRTG
(v2.16.2) running under perl-5.10.1
At line 855 of mrtg, I made the following change:
if ( $RRDs::VERSION >= 1.2 ){
#$rrddata=RRDs::updatev($dotrrd, "$time:$inlast:$outlast");
$rrddata=RRDs::updatev($dotrrd, "--daemon unix:/tmp/rrdcached.sock",
"$time:$inlast:$outlast");
rrdcached is running as follows:
gnat$ ps | grep rrdcached
netops 21067 1 0 07:07 ? 00:00:00 /usr/local/bin/rrdcached -w 300
-z 300 -p /usr/local/var/run/rrdcached.pid -l /usr/local/var/run/rrdcached.sock
gnat$
When I load the new MRTG, I see the following in the relevant MRTG log file:
2009-12-17 07:23:12 -- 2009-12-17 07:23:12: ERROR: Cannot update /home/netops/va
r/mrtg/ips/test-ips_tot_pack.rrd with '1261063392:2569191946:2560325415' unknown
option '--daemon unix:/tmp/rrdcached.sock'
This suggests to me that my rrdtool installation isn't rrdcached-aware ...
however, when I poke around, I see rrdtool-1.4.2, which is rrdcached-aware
gnat$ locate RRDs.pm
/usr/local/lib/perl5/site_perl/5.10.1/x86_64-linux-thread-multi/RRDs.pm
gnat$
gnat$ cd /usr/local/lib/perl5/site_perl/5.10.1/x86_64-linux-thread-multi
gnat$ grep VERSION= RRDs.pm
$VERSION=1.4002;
gnat$
gnat$ strings ./auto/RRDs/RRDs.so | grep lib | more
librrd.so.4
libc.so.6
/usr/local/lib
gnat$
gnat$ cd /usr/local/lib
gnat$ l librrd*
-rw-r--r-- 1 skendric users 1174384 Dec 17 06:56 librrd.a
-rwxr-xr-x 1 skendric users 1021 Dec 17 06:56 librrd.la*
lrwxrwxrwx 1 skendric users 15 Dec 17 06:56 librrd.so -> librrd.so.4.1.2*
lrwxrwxrwx 1 skendric users 15 Dec 17 06:56 librrd.so.4 -> librrd.so.4.1.2*
-rwxr-xr-x 1 skendric users 645276 Dec 17 06:56 librrd.so.4.1.2*
-rw-r--r-- 1 skendric users 1173504 Dec 17 06:56 librrd_th.a
-rwxr-xr-x 1 skendric users 1061 Dec 17 06:56 librrd_th.la*
lrwxrwxrwx 1 skendric users 18 Dec 17 06:56 librrd_th.so -> librrd_th.so.4.1.2*
lrwxrwxrwx 1 skendric users 18 Dec 17 06:56 librrd_th.so.4 ->
librrd_th.so.4.1.2*
-rwxr-xr-x 1 skendric users 643176 Dec 17 06:56 librrd_th.so.4.1.2*
gnat$
gnat$ strings librrd* | grep 1.4 | grep src | more
/usr/local/src/rrdtool-1.4.2/src
/usr/local/src/rrdtool-1.4.2/src
[...]
gnat$
gnat$ /usr/local/bin/rrdtool -v
RRDtool 1.4.2 Copyright 1997-2009 by Tobias Oetiker <tobi at oetiker.ch>
Compiled Dec 17 2009 06:56:01
Usage: rrdtool [options] command command_options
Valid commands: create, update, updatev, graph, graphv, dump, restore,
last, lastupdate, first, info, fetch, tune,
resize, xport, flushcached
RRDtool is distributed under the Terms of the GNU General
Public License Version 2. (www.gnu.org/copyleft/gpl.html)
For more information read the RRD manpages
gnat$
That looks a lot like v1.4.2 to me.
I compiled rrdtool with "./configure --prefix=/usr/local
--enable-perl-site-install; make; make install"
Has anyone had success in running MRTG against rrdcached?
--sk
Stuart Kendrick
FHCRC
More information about the rrd-users
mailing list