[collectd] Patch to collectd to allow configuration of Interval on a per plugin base

Hanisch, David (NSN - DE/Berlin) david.hanisch at nsn.com
Mon Feb 21 16:20:41 CET 2011


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/collectd@verplant.org/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



-------------- next part --------------
A non-text attachment was scrubbed...
Name: collectd-4.10.1.patch
Type: application/octet-stream
Size: 16225 bytes
Desc: collectd-4.10.1.patch
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20110221/a21497fa/attachment-0001.obj>


More information about the collectd mailing list