Code

control: Updated standards-version to 3.9.5 -- no changes.
[pkg-rrdtool.git] / doc / rrdcached.html
index 717be17ef38ce967e2c5f135a3527a9264351b43..bd847902c75ba56a0de156bc927547610366d208 100644 (file)
@@ -66,6 +66,7 @@
 <p><strong>rrdcached</strong>
 [<strong>-P</strong>&nbsp;<em>permissions</em>]
 [<strong>-l</strong>&nbsp;<em>address</em>]
+[<strong>-s</strong>&nbsp;<em>group</em>]
 [<strong>-w</strong>&nbsp;<em>timeout</em>]
 [<strong>-z</strong>&nbsp;<em>delay</em>]
 [<strong>-f</strong>&nbsp;<em>timeout</em>]
@@ -86,7 +87,7 @@ force writing of values to disk, so that graphing facilities and similar can
 work with up-to-date data.</p>
 <p>The daemon was written with big setups in mind. Those setups usually run into
 IO&nbsp;related problems sooner or later for reasons that are beyond the scope
-of this document. Check the wiki at the RRDTool homepage for details. Also
+of this document. Check the wiki at the RRDtool homepage for details. Also
 check <a href="#security_considerations">SECURITY CONSIDERATIONS</a> below before using this daemon! A detailed
 description of how the daemon operates can be found in the <a href="#how_it_works">HOW IT WORKS</a>
 section below.</p>
@@ -101,12 +102,12 @@ section below.</p>
 <p>Tells the daemon to bind to <em>address</em> and accept incoming connections on that
 socket. If <em>address</em> begins with <code>unix:</code>, everything following that prefix is
 interpreted as the path to a UNIX domain socket. Otherwise the address or node
-name are resolved using <em>getaddrinfo</em>.</p>
+name are resolved using <code>getaddrinfo()</code>.</p>
 <p>For network sockets, a port may be specified by using the form
 <code>[address]:port</code>. If the address is an IPv4 address or a fully
 qualified domain name (i.&nbsp;e. the address contains at least one dot
 (<code>.</code>)), the square brackets can be omitted, resulting in the (simpler)
-<code>address:port</code> pattern. The default port is <strong>42217/udp</strong>. If you
+<code>address:port</code> pattern. The default port is <strong>42217/tcp</strong>. If you
 specify a network socket, it is mandatory to read the
 <a href="#security_considerations">SECURITY CONSIDERATIONS</a> section.</p>
 <p>The following formats are accepted. Please note that the address of the UNIX
@@ -120,6 +121,40 @@ domain socket <strong>must</strong> start with a slash in the second case!</p>
 <p>If the <strong>-l</strong> option is not specified the default address,
 <code>unix:/tmp/rrdcached.sock</code>, will be used.</p>
 </dd>
+<dt><strong><a name="s_group_name_gid" class="item"><strong>-s</strong> <em>group_name</em>|<em>gid</em></a></strong></dt>
+
+<dd>
+<p>Set the group permissions of a UNIX domain socket. The option accepts either
+a numeric group id or group name. That group will then have both read and write
+permissions (the socket will have file permissions 0750) for the socket and,
+therefore, is able to send commands to the daemon. This
+may be useful in cases where you cannot easily run all RRD processes with the same
+user privileges (e.g. graph generating CGI scripts that typically run in the
+permission context of the web server).</p>
+<p>This option affects the <em>following</em> UNIX socket addresses (the following
+<strong>-l</strong> options) or the default socket (if no <strong>-l</strong> options have been
+specified), i.e., you may specify different settings for different
+sockets.</p>
+<p>The default is not to change ownership or permissions of the socket and, thus,
+use the system default.</p>
+</dd>
+<dt><strong><a name="m_mode" class="item"><strong>-m</strong> <em>mode</em></a></strong></dt>
+
+<dd>
+<p>Set the file permissions of a UNIX domain socket. The option accepts an octal
+number representing the bit pattern for the mode (see <em>chmod(1)</em> for
+details).</p>
+<p>Please note that not all systems honor this setting. On Linux, read/write
+permissions are required to connect to a UNIX socket. However, many
+BSD-derived systems ignore permissions for UNIX sockets. See <em>unix(7)</em> for
+details.</p>
+<p>This option affects the <em>following</em> UNIX socket addresses (the following
+<strong>-l</strong> options) or the default socket (if no <strong>-l</strong> options have been
+specified), i.e., you may specify different settings for different
+sockets.</p>
+<p>The default is not to change ownership or permissions of the socket and, thus,
+use the system default.</p>
+</dd>
 <dt><strong><a name="p_command_command" class="item"><strong>-P</strong> <em>command</em>[,<em>command</em>[,...]]</a></strong></dt>
 
 <dd>
@@ -130,8 +165,9 @@ sources.</p>
 For example, to allow the <code>FLUSH</code> and <code>PENDING</code> commands one could specify:</p>
 <pre>
   rrdcached -P FLUSH,PENDING $MORE_ARGUMENTS</pre>
-<p>The <strong>-P</strong> option effects the <em>following</em> socket addresses (the following <strong>-l</strong>
-options). In the following example, only the IPv4 network socket (address
+<p>The <strong>-P</strong> option affects the <em>following</em> socket addresses (the following <strong>-l</strong>
+options) or the default socket (if no <strong>-l</strong> options have been
+specified). In the following example, only the IPv4 network socket (address
 <code>10.0.0.1</code>) will be restricted to the <code>FLUSH</code> and <code>PENDING</code> commands:</p>
 <pre>
   rrdcached -l unix:/some/path -P FLUSH,PENDING -l 10.0.0.1</pre>
@@ -256,28 +292,38 @@ containing <code>../</code> will also be blocked.</p>
 <h1><a name="affected_rrdtool_commands">AFFECTED RRDTOOL COMMANDS</a></h1>
 <p>The following commands may be made aware of the <strong>rrdcached</strong> using the command
 line argument <strong>--daemon</strong> or the environment variable <strong>RRDCACHED_ADDRESS</strong>:</p>
-<dl>
-<dt><strong><a name="dump" class="item"><strong>dump</strong></a></strong></dt>
-
-<dt><strong><a name="fetch" class="item"><strong>fetch</strong></a></strong></dt>
-
-<dt><strong><a name="flush" class="item"><strong>flush</strong></a></strong></dt>
-
-<dt><strong><a name="graph" class="item"><strong>graph</strong></a></strong></dt>
-
-<dt><strong><a name="graphv" class="item"><strong>graphv</strong></a></strong></dt>
-
-<dt><strong><a name="info" class="item"><strong>info</strong></a></strong></dt>
-
-<dt><strong><a name="last" class="item"><strong>last</strong></a></strong></dt>
-
-<dt><strong><a name="lastupdate" class="item"><strong>lastupdate</strong></a></strong></dt>
-
-<dt><strong><a name="update" class="item"><strong>update</strong></a></strong></dt>
-
-<dt><strong><a name="xport" class="item"><strong>xport</strong></a></strong></dt>
-
-</dl>
+<ul>
+<li>
+<p>dump</p>
+</li>
+<li>
+<p>fetch</p>
+</li>
+<li>
+<p>flush</p>
+</li>
+<li>
+<p>graph</p>
+</li>
+<li>
+<p>graphv</p>
+</li>
+<li>
+<p>info</p>
+</li>
+<li>
+<p>last</p>
+</li>
+<li>
+<p>lastupdate</p>
+</li>
+<li>
+<p>update</p>
+</li>
+<li>
+<p>xport</p>
+</li>
+</ul>
 <p>The <strong>update</strong> command can send values to the daemon instead of writing them to
 the disk itself. All other commands can send a <strong>FLUSH</strong> command (see below) to
 the daemon before accessing the files, so they work with up-to-date data even
@@ -290,7 +336,7 @@ if the cache timeout is large.</p>
 are printed to <code>STDERR</code>. One of the steps when starting up is to fork to the
 background and closing <code>STDERR</code> - after this writing directly to the user is
 no longer possible. Once this has happened, the daemon will send log messages
-to the system logging daemon using <em>syslog(3)</em>. The facility used is
+to the system logging daemon using <code>syslog(3)</code>. The facility used is
 <code>LOG_DAEMON</code>.</p>
 <p>
 </p>
@@ -305,7 +351,7 @@ diagram below) are appended to the tree node.</p>
 <p>When appending a value to a tree node, it is checked whether it's time to write
 the values to disk. Values are written to disk if
 <code>now()&nbsp;-&nbsp;First&nbsp;&gt;=&nbsp;timeout</code>, where <code>timeout</code> is the timeout specified
-using the <strong>-w</strong> option, see <em>OPTIONS</em>. If the values are &quot;old enough&quot; they
+using the <strong>-w</strong> option, see <a href="#options">OPTIONS</a>. If the values are &quot;old enough&quot; they
 will be enqueued in the &quot;update queue&quot;, i.&nbsp;e. they will be appended to
 the linked list shown below.  Because the tree nodes and the elements of the
 linked list are the same data structures in memory, any update to a file that
@@ -381,12 +427,13 @@ to disk.</p>
 <p>
 </p>
 <h2><a name="authentication">Authentication</a></h2>
-<p>There is no authentication.</p>
-<p>The client/server protocol does not yet have any authentication mechanism. It
-is likely that authentication and encryption will be added in a future version,
-but for the time being it is the administrator's responsibility to secure the
-traffic from/to the daemon!</p>
-<p>It is highly recommended to install a packet filter or similar mechanism to
+<p>If your rrdtool installation was built without libwrap there is no form of 
+authentication for clients connecting to the rrdcache daemon!</p>
+<p>If your rrdtool installation was built with libwrap then you can use
+hosts_access to restrict client access to the rrdcache daemon (rrdcached).  For more
+information on how to use hosts_access to restrict access to the rrdcache
+daemon you should read the <code>hosts_access(5)</code> man pages.</p>
+<p>It is still highly recommended to install a packet filter or similar mechanism to
 prevent unauthorized connections. Unless you have a dedicated VLAN or VPN for
 this, using network sockets is probably a bad idea!</p>
 <p>
@@ -436,7 +483,7 @@ files will be messed up good!</p>
 <h1><a name="protocol">PROTOCOL</a></h1>
 <p>The daemon communicates with clients using a line based ASCII protocol which is
 easy to read and easy to type. This makes it easy for scripts to implement the
-protocol and possible for users to use <em>telnet</em> to connect to the daemon
+protocol and possible for users to use telnet to connect to the daemon
 and test stuff &quot;by hand&quot;.</p>
 <p>The protocol is line based, this means that each record consists of one or more
 lines. A line is terminated by the line feed character <code>0x0A</code>, commonly
@@ -675,8 +722,8 @@ updates WILL BE LOST</strong>.</p>
 </p>
 <hr />
 <h1><a name="author">AUTHOR</a></h1>
-<p><strong>rrdcached</strong> and this manual page have been written by Florian Forster
-&lt;octo&nbsp;at&nbsp;verplant.org&gt;.</p>
+<p>Florian Forster &lt;octo&nbsp;at&nbsp;verplant.org&gt;</p>
+<p>Both <strong>rrdcached</strong> and this manual page have been written by Florian.</p>
 <p>
 </p>
 <hr />