1 =head1 NAME
3 collectd.conf - Configuration for the system statistics collection daemon B<collectd>
5 =head1 SYNOPSIS
7 Mode Client
8 DataDir /path/to/data/
9 PIDFile /path/to/pidfile/collectd.pid
10 LogFile /path/to/logfile/collectd.log
11 Server 123.123.123.123 12345
13 LoadPlugin cpu
14 LoadPlugin load
15 LoadPlugin ping
17 <Plugin ping>
18 Host example.org
19 Host provider.net
20 </Plugin>
22 =head1 DESCRIPTION
24 This config file controls how the system statistics collection daemon
25 B<collectd> behaves. The most significant options are B<Mode>, which controlls
26 if the daemon will act as client, server or will be independent in local mode,
27 and B<LoadPlugin> which controls which plugins to load.
29 The syntax of this config file is similar to the config file of the famos
30 B<Apache Webserver>. Each line containes either a key-value-pair or a
31 section-start or -end. Empty lines and everything after the hash-symbol `#' is
32 ignored.
34 Please note that B<there is a bug> in the library used by collectd to read the
35 configfile, that will lead to all lines with trailing whitespaces to be
36 ignored. This problem has been solved in collectdE<nbsp>4.0 and later.
38 =head1 GLOBAL OPTIONS
40 =over 4
42 =item B<Mode> (B<Local>|B<Client>|B<Server>|B<Log>)
44 Sets the operating mode. See the section B<MODES> in L<collectd(1)> for a
45 description. This option determines which other options are allowed. Defaults
46 to B<Local>.
48 =item B<LoadPlugin> I<Plugin>
50 Loads the plugin I<Plugin>. There must be at least one such line or B<collectd>
51 will be mostly useless. The names of the plugins are listed in L<collectd(1)>.
53 =item B<PIDFile> I<File>
55 Sets where to write the PID file to. This file is overwritten when it exists
56 and deleted when the program ist stopped. Some init-scripts might override this
57 setting using the B<-P> commandline option. Available in B<all modes>.
59 =item B<DataDir> I<Directory>
61 Sets the data directory. This is the directory beneath all RRD-files are
62 created. Possibly more subdirectories are created. This is also the working
63 directory for the daemon. Available in B<all modes>, though the B<Client> mode
64 won't write to this directory.
66 =item B<LogFile> I<File>
68 Sets the file to write debugging output to. This is only used if compiled with
69 debugging enabled. It's ignored otherwise. Available in B<all modes>.
71 =item B<Listen> I<Host> [I<Port>]
73 =item B<Server> I<Host> [I<Port>]
75 In B<client mode> the B<Server> statement sets the server to send datagrams to.
76 The statement may occur multiple times to send each datagram to multiple
77 destinations.
79 In B<server mode> the B<Listen> statement sets the interfaces to bind to. When
80 multiple statements are found the daemon will bind to multiple interfaces.
82 The argument I<Host> may be a hostname, an IPv4 address or an IPv6 address. If
83 the argument is a multicast address the daemon will join that multicast group.
85 If no B<Listen> statement is found the server tries join both, the IPv6
86 multicast group and the IPv4 multicast group. If no B<Server> statement is
87 found the client will try to send data to the IPv6 multicast group first. If
88 that failes the client will try the IPv4 multicast group.
90 The default IPv6 multicast group is C<ff18::efc0:4a42>. The default IPv4
91 multicast group is C<239.192.74.66>.
93 The optional I<Port> argument sets the port to use. It can either be given
94 using a numeric port number or a service name. If the argument is omited the
95 default port B<25826> is assumed.
97 =item B<TimeToLive> I<1-255>
99 Set the time-to-live of sent packets. This applies to all, unicast and
100 multicast, and IPv4 and IPv6 packets. The default is to not change this value.
101 That means that multicast packets will be sent with a TTL of C<1> (one) on most
102 operating systems.
104 =back
106 =head1 PLUGIN OPTIONS
108 Some Plugins may register own options. These options must be inclosed in a
109 C<Plugin>-Section. Which options exist depends on the plugin used:
111 =head2 Plugin C<apache>
113 To configure the C<apache>-plugin you first need to configure the Apache
114 webserver correctly. The Apache-plugin C<mod_status> needs to be loaded and
115 working and the C<ExtendedStatus> directive needs to be B<enabled>. You can use
116 the following snipped to base your Apache config upon:
118 ExtendedStatus on
119 <IfModule mod_status.c>
120 <Location /mod_status>
121 SetHandler server-status
122 </Location>
123 </IfModule>
125 The following options are accepted by the C<apache>-plugin:
127 =over 4
129 =item B<URL> I<http://host/mod_status?auto>
131 Sets the URL of the C<mod_status> output. This needs to be the output generated
132 by C<ExtendedStatus on> and it needs to be the machine readable output
133 generated by appending the C<?auto> argument.
135 =item B<User> I<Username>
137 Optional user name needed for authentication.
139 =item B<Password> I<Password>
141 Optional password needed for authentication.
143 =item B<CACert> I<File>
145 File that holds one or more SSL certificates. If you want to use HTTPS you will
146 possibly need this option. What CA certificates come bundeled with C<libcurl>
147 and are checked by default depends on the distribution you use.
149 =back
151 =head2 Plugin C<apcups>
153 =over 4
155 =item B<Host> I<Hostname>
157 Hostname of the host running B<apcupsd>. Defaults to B<localhost>. Please note
158 that IPv6 support has been disabled unless someone can confirm or decline that
159 B<apcupsd> can handle it.
161 =item B<Port> I<Port>
163 TCP-Port to connect to. Defaults to B<3551>.
165 =back
167 =head2 Plugin C<df>
169 =over 4
171 =item B<Device> I<Device>
173 Select partitions based on the devicename.
175 =item B<MountPoint> I<Directory>
177 Select partitions based on the mountpoint.
179 =item B<FSType> I<FSType>
181 Select partitions based on the filesystem type.
183 =item B<IgnoreSelected> I<true>|I<false>
185 Invert the selection: If set to true, all partitions B<except> the ones that
186 match any one of the criteria are collected. By default only selected
187 partitions are collected if a selection is made. If no selection is conifured
188 at all, B<all> partitions are selected.
190 =back
192 =head2 Plugin C<dns>
194 =over 4
196 =item B<Interface> I<Interface>
198 The dns plugin uses B<libpcap> to capture dns traffic and analyses it. This
199 option sets the interface that should be used. If this option is not set, or
200 set to "any", the plugin will try to get packets from B<all> interfaces. This
201 may not work on certain platforms, such as MacE<nbsp>OSE<nbsp>X.
203 =item B<IgnoreSource> I<IP-address>
205 Ignore packets that originate from this address.
207 =back
209 =head2 Plugin C<email>
211 =over 4
213 =item B<SocketGroup> I<Group>
215 If running as root change the group of the UNIX-socket after it has been
216 created. Defaults to B<collectd>.
218 =item B<SocketPerms> I<Permissions>
220 Change the file permissions of the UNIX-socket after it has been created. The
221 permissions must be given as a numeric, octal value as you would pass to
222 L<chmod(1)>. Defaults to B<0770>.
224 =item B<MaxConns> I<Number>
226 Sets the maximum number of connections that can be handled in parallel. Since
227 this many threads will be started immediately setting this to a very high
228 value will waste valuable resources. Defaults to B<5> and will be forced to be
229 at most B<16384> to prevent typos and dumb mistakes.
231 =back
233 =head2 Plugin C<hddtemp>
235 =over 4
237 =item B<Host> I<Hostname>
239 Hostname to connect to. Defaults to B<127.0.0.1>.
241 =item B<Port> I<Port>
243 TCP-Port to connect to. Defaults to B<7634>.
245 =back
247 =head2 Plugin C<mbmon>
249 =over 4
251 =item B<Host> I<Hostname>
253 Hostname to connect to. Defaults to B<127.0.0.1>.
255 =item B<Port> I<Port>
257 TCP-Port to connect to. Defaults to B<411>.
259 =back
261 =head2 Plugin C<ntpd>
263 =over 4
265 =item B<Host> I<Hostname>
267 Hostname of the host running B<ntpd>. Defaults to B<localhost>.
269 =item B<Port> I<Port>
271 UDP-Port to connect to. Defaults to B<123>.
273 =back
275 =head2 Plugin C<mysql>
277 =over 4
279 =item B<Host> I<Hostname>
281 Hostname of the database server. Defaults to B<localhost>.
283 =item B<User> I<Username>
285 Username to use when connecting to the database.
287 =item B<Password> I<Password>
289 Password needed to log into the database.
291 =item B<Database> I<Database>
293 Select this database. Defaults to I<no database> which is a perfecly reasonable
294 option for what this plugin does.
296 =back
298 =head2 Plugin C<ping>
300 =over 4
302 =item B<Host> I<IP-address>
304 Host to ping periodically. This option may be repeated several times to ping
305 multiple hosts.
307 =item B<TTL> I<0-255>
309 Sets the Time-To-Live of generated ICMP packets.
311 =back
313 =head2 Plugin C<sensors>
315 =over 4
317 =item B<ExtendedSensorNaming> I<true>|I<false>
319 If set to I<true> this option switches on the extended sensors and RRD-files
320 naming. This option exists to preserve backwards compatibility. It is
321 recommended that you set this option to I<true>. The default is I<false> to
322 maintain compatibility only.
324 Sensors get names like I<chip-bus-address/type-feature> (e.g.
325 I<it8712-isa-0290/voltage-in1>) and RRD files are therefore stored in a
326 standalone directory inside the B<DataDir> directory and get names like
327 I<lm_sensors-chip-bus-address/type-feature.rrd> (e.g.
328 I<lm_sensors-it8712-isa-0290/voltage-in1.rrd>).
330 The B<ExtendedSensorNaming> option breaks the compatibility with previous
331 sensors and RRD files naming and the place where RRDs are stored. If you turn
332 it on, the plugin will create new RRD files in a standalone directory inside
333 the B<DataDir> directory and without previous history. You can rename ``old''
334 RRD-files to preserve already collected statistics, because the file layout
335 hasn't changed. If you have two chips of the same type, you need to use
336 B<ExtendedSensorNaming> in order to collect information from both chips.
338 If not set or set to I<false>, the extended naming is not active. Sensors get
339 names like I<chip-feature> (e.g. I<it8712-in1>) and RRD files are stored in the
340 main B<DataDir> directory and get names like I<sensors-chip-feature.rrd> (e.g.
341 I<sensors-it8712-in1.rrd>). You simply continue using the plugin the old way
342 and additionally also getting data for newly added sensors in this mode.
344 =item B<Sensor> I<chip-feature> or B<Sensor> I<chip-bus-address/type-feature>
346 Both option modes select the name of the sensor which you want to collect.
347 The naming scheme is dependent on the state of the B<ExtendedSensorNaming>
348 option (see previous option). Both option modes can also deselect the
349 sensor according to the B<IgnoreSelected> option (see below).
351 For example the option "B<Sensor> I<it8712-in1>" will cause the collectd
352 to gather data for the voltage sensor I<in1> of the I<it8712> chip in case
353 of the B<ExtendedSensorNaming> option is set to I<false>.
355 And likewise the option "B<Sensor> I<it8712-isa-0290/voltage-in1>" will
356 cause the collectd to gather data for the voltage sensor I<in1> of the I<it8712>
357 on the isa bus at the address 0290 in case of the B<ExtendedSensorNaming>
358 option set to I<true>.
360 =item B<IgnoreSelected> I<true>|I<false>
362 If no configuration if given, the B<sensors>-plugin will collect data from
363 all sensors. This may not be practical, especially for uninteresting sensors.
364 Thus, you can use the B<Sensor>-option to pick the sensors you're
365 interested in. Sometimes, however, it's easier/prefered to collect all
366 sensors I<except> a few ones. This option enables you to
367 do that: By setting B<IgnoreSelected> to I<true> the effect of
368 B<Sensor> is inversed: All selected sensors are ignored and all
369 other sensors are collected.
371 back
373 =back
375 =head2 Plugin C<traffic>
377 =over 4
379 =item B<Interface> I<Interface>
381 Select this interface. By default these interfaces will then be collected. For a more detailed description see B<IgnoreSelected> below.
383 =item B<IgnoreSelected> I<true>|I<false>
385 If no configuration if given, the B<traffic>-plugin will collect data from
386 all interfaces. This may not be practical, especially for loopback- and
387 similar interfaces. Thus, you can use the B<Interface>-option to pick the
388 interfaces you're interested in. Sometimes, however, it's easier/prefered
389 to collect all interfaces I<except> a few ones. This option enables you to
390 do that: By setting B<IgnoreSelected> to I<true> the effect of
391 B<Interface> is inversed: All selected interfaces are ignored and all
392 other interfaces are collected.
394 =back
396 =head1 SEE ALSO
398 L<collectd(1)>
400 =head1 AUTHOR
402 Florian Forster E<lt>octo@verplant.orgE<gt>
404 =cut