X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fcollectd-lua.pod;h=eccd71fb1f076acfde4c58bf6c0790702e0e83e4;hp=f5e43aaac8499aa24a6d4c2811743dd4207240f3;hb=a811574a6acbf87f23948411876a231fecaeb491;hpb=c4439c9cb3e2348ad7013644731de27a55eca478 diff --git a/src/collectd-lua.pod b/src/collectd-lua.pod index f5e43aaa..eccd71fb 100644 --- a/src/collectd-lua.pod +++ b/src/collectd-lua.pod @@ -72,8 +72,8 @@ These are used to collect the actual data. It is called once per interval (see the B configuration option of collectd). Usually it will call B to dispatch the values to collectd which will pass them on to all registered B. If this function -does not return 0 the plugin will be skipped for an increasing -amount of time until it returns normally again. +does not return 0, interval between its calls will grow until function returns +0 again. See the B configuration option of collectd. =item write functions @@ -90,12 +90,14 @@ The following functions are provided to Lua modules: =item register_read(callback) +Function to register read callbacks. The callback will be called without arguments. If this callback function does not return 0 the next call will be delayed by an increasing interval. -=item register_write +=item register_write(callback) +Function to register write callbacks. The callback function will be called with one argument passed, which will be a table of values. If this callback function does not return 0 next call will be delayed by @@ -136,8 +138,8 @@ A very simple write function might look like: To register those functions with collectd: - collectd.register_read(read) - collectd.register_write(write) + collectd.register_read(read) -- pass function as variable + collectd.register_write("write") -- pass by global-scope function name =back