X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fcollectd-python.pod;h=3e44d54652e248d85d128527078dd54db86ad127;hp=7a19f45ce3679841796569286f54572cddb59f32;hb=48efd3deb4c9139fd060ff3d289896e9031bcc7c;hpb=a1b19a64325554b0410daaefed3ce229b34958b7 diff --git a/src/collectd-python.pod b/src/collectd-python.pod index 7a19f45c..3e44d546 100644 --- a/src/collectd-python.pod +++ b/src/collectd-python.pod @@ -68,8 +68,10 @@ use multiple B lines to add more than one directory. If a Python script throws an exception it will be logged by collectd with the name of the exception and the message. If you set this option to true it will also log the full stacktrace just like the default output of an interactive -Python interpreter. This should probably be set to false most of the time but -is very useful for development and debugging of new modules. +Python interpreter. This does not apply to the CollectError exception, which +will never log a stacktrace. +This should probably be set to false most of the time but is very useful for +development and debugging of new modules. =item B I @@ -124,6 +126,13 @@ normally and spawning processes from Python will work as intended. =back +=item B I + +Imports the python script I and loads it into the collectd +python process. If your python script is not found, be sure its +directory exists in python's B. You can prepend to the +B using the B configuration option. + =item EB IE block This block may be used to pass on configuration settings to a Python module. @@ -248,6 +257,18 @@ collectd you're done. The following complex types are used to pass values between the Python plugin and collectd: +=head2 CollectdError + +This is an exception. If any Python script raises this exception it will +still be treated like an error by collectd but it will be logged as a +warning instead of an error and it will never generate a stacktrace. + + class CollectdError(Exception) + +Basic exception for collectd Python scripts. +Throwing this exception will not cause a stacktrace to be logged, even if +LogTraces is enabled in the config. + =head2 Signed The Signed class is just a long. It has all its methods and behaves exactly