libcollectdclient: Propagate errors when signing / encrypting network packets.
[collectd.git] / src / collectd-python.pod
index ef2e6bd..0da891f 100644 (file)
@@ -8,15 +8,15 @@
 # The above copyright notice and this permission notice shall be included in
 # all copies or substantial portions of the Software.
 
+=encoding UTF-8
+
 =head1 NAME
 
 collectd-python - Documentation of collectd's C<python plugin>
 
 =head1 SYNOPSIS
 
-  <LoadPlugin python>
-    Globals true
-  </LoadPlugin>
+  LoadPlugin python
   # ...
   <Plugin python>
     ModulePath "/path/to/your/python/modules"
@@ -45,23 +45,20 @@ The minimum required Python version is I<2.3>.
 
 =item B<LoadPlugin> I<Plugin>
 
-Loads the Python plugin I<Plugin>. Unlike most other LoadPlugin lines, this one
-should be a block containing the line "Globals true". This will cause collectd
-to export the name of all objects in the Python interpreter for all plugins to
-see. If you don't do this or your platform does not support it, the embedded
-interpreter will start anyway but you won't be able to load certain Python
-modules, e.g. "time".
+Loads the Python plugin I<Plugin>.
 
 =item B<Encoding> I<Name>
 
 The default encoding for Unicode objects you pass to collectd. If you omit this
-option it will default to B<ascii> on I<Python 2> and B<utf-8> on I<Python 3>.
-This is hardcoded in Python and will ignore everything else, including your
-locale.
+option it will default to B<ascii> on I<Python 2>. On I<Python 3> it will
+always be B<utf-8>, as this function was removed, so this will be silently
+ignored.
+These defaults are hardcoded in Python and will ignore everything else,
+including your locale.
 
 =item B<ModulePath> I<Name>
 
-Appends I<Name> to B<sys.path>. You won't be able to import any scripts you
+Prepends I<Name> to B<sys.path>. You won't be able to import any scripts you
 wrote unless they are located in one of the directories in this list. Please
 note that it only has effect on plugins loaded after this option. You can
 use multiple B<ModulePath> lines to add more than one directory.
@@ -534,9 +531,12 @@ your callback, not even None.
 I<name> is an optional identifier for this callback. The default name is
 B<python>.I<module>. I<module> is taken from the B<__module__> attribute of
 your callback function. Every callback needs a unique identifier, so if you
-want to register the same callback multiple time in the same module you need to
-specify a name here. Otherwise it's save to ignore this parameter I<identifier>
-is the full identifier assigned to this callback.
+want to register the same callback multiple times in the same module you need to
+specify a name here. Otherwise it's safe to ignore this parameter.
+
+=item
+
+I<identifier> is the full identifier assigned to this callback.
 
 =back
 
@@ -557,7 +557,7 @@ receive blocks where your callback identifier matches B<python.>I<blockname>.
 
 The callback will be called without arguments.
 
-=item register_read(callback[, interval][, data][, name]) -> identifier
+=item register_read(callback[, interval][, data][, name]) -> I<identifier>
 
 This function takes an additional parameter: I<interval>. It specifies the
 time between calls to the callback function.
@@ -611,7 +611,33 @@ I<identifier> is either the string that was returned by the register function
 or a callback function. The identifier will be constructed in the same way as
 for the register functions.
 
-=item B<flush>(I<plugin[, I<timeout>][, I<identifier>]) -> None
+=item B<get_dataset>(I<name>) -> I<definition>
+
+Returns the definition of a dataset specified by I<name>. I<definition> is a list
+of tuples, each representing one data source. Each tuple has 4 values:
+
+=over 4
+
+=item name
+
+A string, the name of the data source.
+
+=item type
+
+A string that is equal to either of the variables B<DS_TYPE_COUNTER>,
+B<DS_TYPE_GAUGE>, B<DS_TYPE_DERIVE> or B<DS_TYPE_ABSOLUTE>.
+
+=item min
+
+A float or None, the minimum value.
+
+=item max
+
+A float or None, the maximum value.
+
+=back
+
+=item B<flush>(I<plugin>[, I<timeout>][, I<identifier>]) -> None
 
 Flush one or all plugins. I<timeout> and the specified I<identifiers> are
 passed on to the registered flush-callbacks. If omitted, the timeout defaults
@@ -658,7 +684,7 @@ types used by the read, write and match functions.
 =item
 
 Please feel free to send in new plugins to collectd's mailing list at
-E<lt>collectdE<nbsp>atE<nbsp>verplant.orgE<gt> for review and, possibly,
+E<lt>collectdE<nbsp>atE<nbsp>collectd.orgE<gt> for review and, possibly,
 inclusion in the main distribution. In the latter case, we will take care of
 keeping the plugin up to date and adapting it to new versions of collectd.
 
@@ -725,7 +751,7 @@ Sven Trenkel E<lt>collectdE<nbsp>atE<nbsp>semidefinite.deE<gt>.
 This manpage has been written by Sven Trenkel
 E<lt>collectdE<nbsp>atE<nbsp>semidefinite.deE<gt>.
 It is based on the L<collectd-perl(5)> manual page by
-Florian Forster E<lt>octoE<nbsp>atE<nbsp>verplant.orgE<gt> and
+Florian Forster E<lt>octoE<nbsp>atE<nbsp>collectd.orgE<gt> and
 Sebastian Harl E<lt>shE<nbsp>atE<nbsp>tokkee.orgE<gt>.
 
 =cut