Differences

This shows you the differences between two versions of the page.

pnp-0.6:rrdcached [2010/02/22 21:30]
Wolfgang fixed link
pnp-0.6:rrdcached [2010/05/28 20:16] (current)
Wolfgang unix socket only
Line 11: Line 11:
===== Mode of operation ===== ===== Mode of operation =====
-The rrdcached is working as a daemon in the background and opens a UNIX or TCP socket to wait for requests of rrdtool.+The rrdcached is working as a daemon in the background and opens a UNIX or TCP socket to wait for requests of rrdtool. Due to security reasons newer versions of rrdcached cannot use absolute paths for network access anymore so the only possible way are unix sockets.
==== rrdcached ==== ==== rrdcached ====
Line 21: Line 21:
<code> <code>
-l unix:/path/to/rrdcached.sock -l unix:/path/to/rrdcached.sock
 +-l /path/to/rrdcached.sock
-l 127.0.0.1 -l 127.0.0.1
-l 127.0.0.1:8888 -l 127.0.0.1:8888
</code> </code>
-Option -L is an unprivileged socket which only triggers the FLUSH command to write to the RRD databases using the daemon.+Option -P specifies which commands are usable with the RRD data bases 
 +<code>-P FLUSH,PENDING</code>
-<code>-L 127.0.0.1</code>+Option -s allows to change the group ownership of the unix socket 
 + 
 +<code>-s nagios</code> 
 + 
 +Option -m sets the permissions of the unix socket in the usual octal format 
 + 
 +<code>-m 0660</code>
Option -w specifies the interval (in seconds) the data will be written to disk. Option -w specifies the interval (in seconds) the data will be written to disk.
Line 47: Line 55:
These options may result in a call of rrdcached with the following parameters These options may result in a call of rrdcached with the following parameters
-<code> rrdcached -w 1800 -z 1800 -p /tmp/rrdcached.pid -j /tmp -l 127.0.0.1</code>+<code> rrdcached -w 1800 -z 1800 -p /tmp/rrdcached.pid -j /tmp -s nagios -m 0660 -l unix:/tmp/rrdcached.sock</code>
==== rrdtool ==== ==== rrdtool ====
Line 53: Line 61:
RRDtool itself will be informed about the daemon using the option --daemon=<socket>. RRDtool itself will be informed about the daemon using the option --daemon=<socket>.
-   rrdtool --daemon=127.0.0.1 update ...+   rrdtool --daemon=unix:/tmp/rrdcached.sock update ...
Of course this has to correspond with the options of rrdcached! Of course this has to correspond with the options of rrdcached!
Line 67: Line 75:
# Use only with rrdtool svn revision 1511+ # Use only with rrdtool svn revision 1511+
# #
-RRD_DAEMON_OPTS = 127.0.0.1:8888+RRD_DAEMON_OPTS = unix:/var/run/rrdcached.sock
</code> </code>
Line 78: Line 86:
# #
# $conf['RRD_DAEMON_OPTS'] = 'unix:/tmp/rrdcached.sock'; # $conf['RRD_DAEMON_OPTS'] = 'unix:/tmp/rrdcached.sock';
-$conf['RRD_DAEMON_OPTS'] = '127.0.0.1:8888';+$conf['RRD_DAEMON_OPTS'] = 'unix:/var/run/rrdcached.sock';
</code> </code>
pnp-0.6/rrdcached.1266870607.txt.gz · Last modified: 2010/02/22 21:30 by Wolfgang
www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0