lua plugin: Make it possible to register more than one reader/writer.
[collectd.git] / src / collectd-lua.pod
index f5e43aa..eccd71f 100644 (file)
@@ -72,8 +72,8 @@ These are used to collect the actual data. It is called once
 per interval (see the B<Interval> configuration option of collectd). Usually
 it will call B<collectd.dispatch_values> to dispatch the values to collectd
 which will pass them on to all registered B<write functions>. 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<MaxReadInterval> 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