Code

convert all collectd.org URLs to https
[pkg-collectd.git] / debian / README.Debian
index 4af57c532c18628de0dbd8f1fea94e7ac5e16870..e2aeacc9fe6703504c980bbfd4ebb44518d82b74 100644 (file)
@@ -5,9 +5,26 @@ General notes:
 --------------
 
 - Some plugins require additional libraries. To prevent you from having to
-  install dependencies that you don't actually need those libraries are
-  recommendations rather than dependencies. See README.Debian.plugins in the
-  "collectd" package for details.
+  install dozens of further packages that you don't actually need, there is no
+  strict dependency on those libraries. Rather, they are listed as recommenda-
+  tions ("collectd" package) or suggestions ("collectd-core" package"). See
+  /usr/share/doc/collectd-core/README.Debian.plugins for details.
+
+- The main components of collectd have been split into two packages:
+
+  * "collectd-core":
+    This package contains the main program file and the plugins but no config-
+    uration. It allows sites to, e.g., provide customizations on top of it
+    without having to modify the "collectd" package. For example, a custom
+    configuration and appropriate dependencies may be provided by some package
+    depending on "collectd-core" and conflicting / replacing / providing
+    "collectd". Ready-to-use sample config files (collectd.conf, filters.conf,
+    thresholds.conf) are available in /usr/share/doc/collectd-core/examples/.
+
+  * "collectd":
+    This package provides a full installation of the daemon, including a
+    configuration. It is meant to be ready to use for simple setups or first
+    steps.
 
 Configuring collectd:
 ---------------------
@@ -37,24 +54,66 @@ solutions are welcome.
   (http://localhost/cgi-bin/collection.cgi by default). Please refer to your
   webserver's documentation for more details.
 
-  Starting with version 4, collection.cgi requires a small config file, which
-  is installed to /etc/collectd/collection.conf. You should not need to change
-  anything there.
+  collection.cgi requires a small config file, which is installed to
+  /etc/collectd/collection.conf. You should not need to change anything there.
 
 - collection3: A graphing front-end for the RRD files created by and filled
   with collectd. See /usr/share/doc/collectd/examples/collection3/README for
   details. This is a successor for collection.cgi.
 
+Cleanup of old data:
+--------------------
+
+collectd itself does not take care of removing any data files (e.g. RRDtool)
+that are no longer updated (e.g., no longer existing hosts or instances).
+There are a couple of ways to take care of that. In any case, double-check the
+list of files to be removed before doing so! We do not take responsibility for
+any data loss or similar.
+
+- Check the last modification time of all RRD files:
+
+    find /var/lib/collectd/rrd/ -mtime +30 -type f
+
+  This will list all files that have not been updated within the last 30 days.
+  After double-checking the list of files, use a command like the following to
+  delete old files:
+
+    find /var/lib/collectd/rrd/ -mtime +30 -type f | xargs rm
+
+  NOTE: Some versions of RRDtool did not update mtime when writing to a file.
+        This has been fixed in version 1.3.5 of RRDtool. If your version is
+        affected by that, this approach does not work.
+
+- Check the 'last_update' header of the RRD files:
+
+    export IFS="
+    "
+    for file in $( find /var/lib/collectd/rrd/ -type f -name '*.rrd' ); do
+        last_update=$( rrdtool info $file | grep last_update | cut -d' ' -f3 )
+        if test -n "$last_update" \
+                -a $(( $( date +%s ) - $last_update )) -gt 2592000; then
+            echo $file
+        fi
+    done
+
+  This will also list all files that have not been updated within the last 30
+  days. It's a bit more expensive since each and every RRD file will have to
+  be read from disk rather than checking the file-system meta-data only.
+
+When doing those checks, take into account any caching times configured in the
+RRDtool plugin or when using RRDCacheD.
+
 Building your own plugins:
 --------------------------
 
 - Originally, plugins for collectd had to be written in C and linked as shared
   objects. Starting with version 4.0.0, it is also possible to use plugins
   written in the scripting language Perl or implemented as separate processes.
-  See collectd-perl(5) and collectd-exec(5) for details.
+  In later versions, support for Java and Python has been added. See the
+  appropriate collectd-<extension>(5) manual page for details.
 
 - If you want to contribute plugins to the official distribution you should
-  read http://collectd.org/dev-info.shtml.
+  read https://collectd.org/dev-info.shtml.
 
 - If you want to build C plugins for your personal use only simply install the
   collectd-dev package and use /usr/share/doc/collectd-dev/examples/myplugin.c