X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcollectd-python.pod;h=7a19f45ce3679841796569286f54572cddb59f32;hb=aecd05a0a0ec4d745506a67a937de6d1d6b33db5;hp=77f3497b6b924f2515f3896ff0584aec39b2806c;hpb=bf8a30d732662ea480e7401768e1db92d03f1a1c;p=collectd.git diff --git a/src/collectd-python.pod b/src/collectd-python.pod index 77f3497b..7a19f45c 100644 --- a/src/collectd-python.pod +++ b/src/collectd-python.pod @@ -37,7 +37,7 @@ for collectd in Python. This is a lot more efficient than executing a Python-script every time you want to read a value with the C (see L) and provides a lot more functionality, too. -The minimum required Python version is I<2.3>. +The minimum required Python version is I<2.6>. =head1 CONFIGURATION @@ -94,11 +94,12 @@ way of entering your commands. The daemonized collectd won't do that. =item * -B<2.> collectd will block I. Pressing I will usually cause +B<2.> Python will be handling I. Pressing I will usually cause collectd to shut down. This would be problematic in an interactive session, -therefore this signal will be blocked. You can still use it to interrupt -syscalls like sleep and pause but it won't generate a I -exception either. +therefore Python will be handling it in interactive sessions. This allows you +to use I to interrupt Python code without killing collectd. This also +means you can catch I exceptions which does not work during +normal operation. To quit collectd send I (press I at the beginning of a new line). @@ -474,7 +475,7 @@ Methods defined here: =over 4 -=item B([type][, values][, plugin_instance][, type_instance][, plugin][, host][, time][, interval]) -> None. Dispatch a value list. +=item B([type][, message][, plugin_instance][, type_instance][, plugin][, host][, time][, severity][, meta]) -> None. Dispatch a notification. Dispatch this instance to the collectd process. The object has members for each of the possible arguments for this method. For a detailed explanation of these @@ -500,6 +501,16 @@ generated. The severity of this notification. Assign or compare to I, I or I. +=item meta + +These are the meta data for the Notification object. +It has to be a dictionary of numbers, strings or bools. All keys must be +strings. I and I objects will be dispatched as signed integers unless +they are between 2**63 and 2**64-1, which will result in a unsigned integer. +One of these storage classes can be forced by using the classes +B and B. A meta object received by a +notification callback will always contain B or B objects. + =back =head1 FUNCTIONS @@ -658,6 +669,8 @@ Any Python module will start similar to: A very simple read function might look like: + import random + def read(data=None): vl = collectd.Values(type='gauge') vl.plugin='python.spam' @@ -677,22 +690,6 @@ To register those functions with collectd: See the section L<"CLASSES"> above for a complete documentation of the data types used by the read, write and match functions. -=head1 NOTES - -=over 4 - -=item * - -Please feel free to send in new plugins to collectd's mailing list at -EcollectdEatEcollectd.orgE 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. - -Before submitting your plugin, please take a look at -L. - -=back - =head1 CAVEATS =over 4 @@ -730,7 +727,7 @@ dispatched by the python plugin after upgrades. =item * Not all aspects of the collectd API are accessible from Python. This includes -but is not limited to filters and data sets. +but is not limited to filters. =back