{GPL, other}: Relicense to MIT license.
[collectd.git] / src / collectd.pod
index 5e4b3b2..8fccdb3 100644 (file)
@@ -1,3 +1,5 @@
+=encoding UTF-8
+
 =head1 NAME
 
 collectd - System statistics collection daemon
@@ -10,7 +12,7 @@ collectd I<[options]>
 
 collectd is a daemon that receives system statistics and makes them available
 in a number of ways. The main daemon itself doesn't have any real functionality
-appart from loading, querying and submitting to plugins. For a description of
+apart from loading, querying and submitting to plugins. For a description of
 available plugins please see L</PLUGINS> below.
 
 =head1 OPTIONS
@@ -26,6 +28,16 @@ Specify an alternative config file. This is the place to go when you wish to
 change B<collectd>'s behavior. The path may be relative to the current working
 directory.
 
+=item B<-t>
+
+Test the configuration only. The program immediately exits after parsing the
+config file. A return code not equal to zero indicates an error.
+
+=item B<-T>
+
+Test the plugin read callbacks only. The program immediately exits after invoking
+the read callbacks once. A return code not equal to zero indicates an error.
+
 =item B<-P> I<E<lt>pid-fileE<gt>>
 
 Specify an alternative pid file. This overwrites any settings in the config 
@@ -37,7 +49,7 @@ config-option.
 
 Don't fork to the background. I<collectd> will also B<not> close standard file
 descriptors, detach from the session nor write a pid file. This is mainly
-thought for 'supervisioning' init replacements such as I<runit>.
+thought for 'supervising' init replacements such as I<runit>.
 
 =item B<-h>
 
@@ -47,14 +59,18 @@ Output usage information and exit.
 
 =head1 PLUGINS
 
-As noted above, the real power of collectd lies within it's plugins. There are
-two big groups of plugins, B<input> and B<output> plugins:
+As noted above, the real power of collectd lies within it's plugins. A
+(hopefully complete) list of plugins and short descriptions can be found in the
+F<README> file that is distributed with the sourcecode. If you're using a
+package it's a good bet to search somewhere near F</usr/share/doc/collectd>.
+
+There are two big groups of plugins, B<input> and B<output> plugins:
 
 =over 4
 
 =item
 
-Input plugins are queried periodically. They somehow aquire the current value
+Input plugins are queried periodically. They somehow acquire the current value
 of whatever they where designed to work with and submit these values back to
 the daemon, i. e. they "dispatch" the values. As an example, the C<cpu plugin>
 reads the current cpu-counters of time spent in the various modes (user,
@@ -72,7 +88,7 @@ Of course not all plugins fit neatly into one of the two above categories. The
 C<network plugin>, for example, is able to send (i.E<nbsp>e. "write") B<and>
 receive (i.E<nbsp>e. "dispatch") values. Also, it opens a socket upon
 initialization and dispatches the values when it receives them and isn't
-triggered at the same time the input plugins are being read. You can think if
+triggered at the same time the input plugins are being read. You can think of
 the network receive part as working asynchronous if it helps.
 
 In addition to the above, there are "logging plugins". Right now those are the
@@ -80,137 +96,32 @@ C<logfile plugin> and the C<syslog plugin>. With these plugins collectd can
 provide information about issues and significant situations to the user.
 Several loglevels let you suppress uninteresting messages.
 
+Starting with version C<4.3.0> collectd has support for B<monitoring>. This is
+done by checking thresholds defined by the user. If a value is out of range, a
+notification will be dispatched to "notification plugins". See
+L<collectd.conf(5)> for more detailed information about threshold checking.
+
 Please note that some plugins, that provide other means of communicating with
 the daemon, have manpages of their own to describe their functionality in more
-detail. In particular those are L<collectd-exec(5)>, L<collectd-unixsock(5)>,
-...
-
-=head1 SPECIAL PLUGINS
-
-=head2 perl
-
-The C<perl plugin> includes a Perl-interpreter in collectd and provides
-Perl-equivalents of the plugin-functions. This makes it possible to write
-plugins in Perl.
-
-There are two more complex types you need to know about:
-
-=over 4
-
-=item Data-Set
-
-A data-set is a list of one or more data-sources. Each data-source defines a
-name, type, min- and max-value and the data-set wraps them up into one
-structure. The general layout looks like this:
-
-  [{
-    name => 'data_source_name',
-    type => DS_TYPE_COUNTER || DS_TYPE_GAUGE
-    min  => value || undef,
-    max  => value || undef
-  }, ...]
-
-=item Value-List
-
-A value-list is one structure which features an array of values and fields to
-identify the values, i. e. time and host, plugin name and plugin-instance as
-well as a type and type-instance. Since the "type" is not included in the
-value-list but is passed as an extra argument, the general layout looks like
-this:
-
-  {
-    values => [123, 0.5],
-    time   => time (),
-    host   => 'localhost',
-    plugin => 'myplugin',
-    plugin_instance => '',
-    type_instance   => ''
-  }
-
-=back
-
-The following functions provide the C-interface to Perl-modules:
-
-=over 4
-
-=item B<plugin_register> (I<type>, I<name>, I<data>)
+detail. In particular those are L<collectd-email(5)>, L<collectd-exec(5)>,
+L<collectd-perl(5)>, L<collectd-snmp(5)>, and L<collectd-unixsock(5)>
 
-Registers a callback-function or data-set.
+=head1 SIGNALS
 
-I<type> can be one of:
+B<collectd> accepts the following signals:
 
 =over 4
 
-=item TYPE_INIT
-
-=item TYPE_READ
-
-=item TYPE_WRITE
-
-=item TYPE_LOG
-
-=item TYPE_SHUTDOWN
-
-=item TYPE_DATASET
-
-=back
-
-I<name> is the name of the callback-function or the type of the data-set,
-depending on the value of I<type>. (Please note that the type of the data-set
-is the value passed as I<name> here and has nothing to do with the I<type>
-argument which simply tells B<plugin_register> what is being registered.)
-
-The last argument, I<data>, is either a function- or an array-reference. If
-I<type> is B<TYPE_DATASET>, then the I<data> argument must be an
-array-reference which points to an array of hashes. Each hash describes one
-data-source. For the exact layout see B<Data-Set> above.
-
-If the I<type> argument is any of the other types (B<TYPE_INIT>, B<TYPE_READ>,
-...) then I<data> is expected to be a function reference. These functions are
-called in the various stages of the daemon and are passed the following
-arguments:
-
-=over 4
-
-=item TYPE_INIT
-
-=item TYPE_READ
-
-=item TYPE_SHUTDOWN
-
-No arguments are passed
-
-=item TYPE_WRITE
-
-The arguments passed are I<type>, I<data-set>, and I<value-list>. I<type> is a
-string. For the layout of I<data-set> and I<value-list> see above.
-
-=item TYPE_LOG
-
-The arguments are I<log-level> and I<message>. The log level is small for
-important messages and high for less important messages. The least important
-level is B<LOG_DEBUG>, the most important level is B<LOG_ERR>. In between there
-are (from least to most important): B<LOG_INFO>, B<LOG_NOTICE>, and
-B<LOG_WARNING>. I<message> is simply a string B<without> a newline at the end.
-
-=back
-
-=item B<plugin_unregister> (I<type>, I<plugin>)
-
-Removes a callback or data-set from collectd's internal list of
-functionsE<nbsp>/ datasets.
-
-=item B<plugin_dispatch_values> (I<type>, I<value-list>)
+=item B<SIGINT>, B<SIGTERM>
 
-Submits a I<value-list> of type I<type> to the daemon. If the data-set I<type>
-is found (and the number of values matches the number of data-sources) then the
-type, data-set and value-list is passed to all write-callbacks that are
-registered with the daemon.
+These signals cause B<collectd> to shut down all plugins and terminate.
 
-=item B<plugin_log> (I<log-level>, I<message>)
+=item B<SIGUSR1>
 
-Submits a I<message> of level I<log-level> to collectd's logging mechanism.
-The message is passed to all log-callbacks that are registered with collectd.
+This signal causes B<collectd> to signal all plugins to flush data from
+internal caches. E.E<nbsp>g. the C<rrdtool plugin> will write all pending data
+to the RRD files. This is the same as using the C<FLUSH -1> command of the
+C<unixsock plugin>.
 
 =back
 
@@ -219,11 +130,14 @@ The message is passed to all log-callbacks that are registered with collectd.
 L<collectd.conf(5)>,
 L<collectd-email(5)>,
 L<collectd-exec(5)>,
+L<collectd-perl(5)>,
+L<collectd-snmp(5)>,
 L<collectd-unixsock(5)>,
+L<types.db(5)>,
 L<http://collectd.org/>
 
 =head1 AUTHOR
 
-Florian Forster E<lt>octo@verplant.orgE<gt>
+Florian Forster E<lt>octo@collectd.orgE<gt>
 
 =cut