contrib/docker: add instructions to README
[collectd.git] / contrib / README
1 The files in this directory may be used to perform common tasks that aren't
2 exactly `collectd's job. They may or may not require in-depth knowledge of RRD
3 files and/or `collectd's inner workings. Use at your own risk.
4
5 add_rra.sh
6 ----------
7   Before version 3.9.0 collectd used to create a different set of RRAs. The
8 most detailed of these old RRAs had a one minute resolution. This script can
9 be used to add three more RRAs: minimum, maximum and average with a ten second
10 resolution and 2200 rows (~6 hours). This will make hourly statistics much more
11 interesting. Please note that no sanity- checking whatsoever is performed. You
12 can seriously fuck up your RRD files if you don't know what you're doing.
13
14 collectd-network.py
15 -------------------
16   This Python module by Adrian Perez implements the collectd network protocol
17 in pure Python. It currently supports to receive data and notifications from
18 collectd.
19
20 collectd-unixsock.py
21 --------------------
22   This Python module by Clay Loveless provides an interface to collect's
23 unixsock plugin.
24
25 collectd2html.pl
26 ----------------
27   This script by Vincent Stehlé will search for RRD files in
28 `/var/lib/collectd/' and generate an HTML file and a directory containing
29 several PNG files which are graphs of the RRD files found.
30
31 collection.cgi
32 --------------
33   Sample CGI script that creates graphs on the fly. The Perl modules `RRDs'
34 (Debian package `librrds-perl'), `URI:Escape' (package liburi-perl),
35 `HTML::Entities' (package libhtml-parser-perl) and a CGI capable web server
36 (e.g. apache2 or boa) are needed. Simply install the script to a place where
37 the webserver will treat it as a CGI script (/usr/lib/cgi-bin/ by default) and
38 visit that page in a browser (http://localhost/cgi-bin/collection.cgi by
39 default). Please refer to your webserver's documentation for more details.
40
41   Starting with version 4, collection.cgi requires a small config file, which
42 should look something like this:
43
44   datadir: "/var/lib/collectd/rrd/"
45   libdir: "/usr/lib/collectd/"
46
47 docker/
48 -------
49 Sample docker setup using an LD_PRELOAD wrapper to redirect system calls
50 accessing /proc and /sys to prefixed bind-mounts inside the container.
51
52 Drop your collectd configuration snippets in the
53 contrib/docker/collectd.conf.d/ directory, and build an image including them:
54  $ docker build -t my_collectd ./contrib/docker/
55
56 Then run it with the required bind-mounts:
57  $ docker run -it --rm \
58     -v /proc:/rootfs/proc:ro -v /sys:/rootfs/sys:ro \
59     --name collectd my_collectd
60  $ docker exec -it collectd collectdctl listval
61
62 exec-munin.px
63 -------------
64   Script to be used with the exec-plugin (see collectd-exec(5) for details)
65 which executes munin plugins, parses the output and translates it to a format
66 the exec-plugin understands. The features are limited - changing the munin
67 plugins to use the output format understood by the exec-plugin is recommended.
68 See the embedded POD documentation for more details:
69  $ perldoc contrib/exec-munin.px
70
71 exec-smartctl
72 -------------
73   Sample script for the exec plugin. Please refer to the documentation in the
74 file - you will have to adapt it to your needs anyway.
75
76 extractDS.px
77 ------------
78   Creates a new RRD-file with only one data-source (DS) of the source-RRD-
79 file. That is very handy when you realise that you have bundled up DSes in one
80 RRD-file that should have been in multiple RRD-files instead. Is is used by
81 `migrate-3-4.px' to split up the cpu-, nfs-, swap-files and possibly others.
82
83 GenericJMX.conf
84 ---------------
85   Example configuration file for the ‘GenericJMX’ Java plugin. Please read the
86 documentation at the beginning of the file for more details.
87
88 migrate-3-4.px
89 --------------
90   Migration-script to ease the switch from version 3 to version 4. Many
91 RRD-files are expected in a different place, some have been changed (DSes have
92 been renamed) and others have bee split up into multiple files. This script
93 prints a bash-script to STDOUT which should do most of the work for you. You
94 may still need to do some things by hand, read `README.migration' for more
95 details.
96
97 redhat/
98 -------
99   Spec-file and affiliated files to build an RedHat RPM package of collectd.
100
101 snmp-data.conf
102 --------------
103   Sample configuration for the SNMP plugin. This config includes a few standard
104 <Data ..> definitions that you can include in your own config using the
105 `Include' statement (available since version 4.2.0). The config includes some
106 data that is defined in the IF-MIB, e. g. octet or packet counters, UPS-MIB and
107 whatever people have send in. If you have some more definitions please send
108 them in, so others can profit from it.
109
110 solaris-smf
111 -----------
112   Manifest file for the Solaris SMF system and detailed information on how to
113 register collectd as a service with this system.
114
115 collectd.service
116 ----------------
117   Service file for systemd. Please ship this file as
118   /lib/systemd/system/collectd.service in any linux package of collectd.