Hi,

I've implemented some changes to configfile.c/.h to allow values in the
config section of a plugin that are handled globally. This is intended
to be used for the read-Interval of a plugin like this:

<Plugin "myplugin">
   Interval 60   # this does not reach the plugin, it's stored globally
   other_stuff_evaluated_by_plugin
   ...
</Plugin>

Values can be queried via new funtion:

  const char *plugin_global_option_get (const char *plugin, const char
*option);


The change is then used in plugin.c to have plugin specific interval
values:
- in plugin_read_thread: when no interval is defined yet, then take it
  from plugin_specific value first, if this does not exist then from
global
- in plugin_dispatch_values: if interval is not filled in by the plugin,
then 
  add the interval in the same manner as above


This patch is related to 
- roadmap item 
 
http://collectd.org/wiki/index.php/Roadmap#Per-plugin_interval_configura
tion
- discussions
  http://mailman.verplant.org/pipermail/collectd/2010-March/003687.html
  http://www.mail-archive.com/[email protected]/msg00997.html


The patch bases on collectd-4.10.1

Please let me know if you think this patch could go to main line of
collectd.

David



Attachment: collectd-4.10.1.patch
Description: collectd-4.10.1.patch

_______________________________________________
collectd mailing list
[email protected]
http://mailman.verplant.org/listinfo/collectd

Reply via email to