[collectd] New aggregator plugin "basic_aggregator" (#136)

Lindsay Holmwood lindsay at holmwood.id.au
Fri Oct 12 13:29:27 CEST 2012


On 11 October 2012 18:11, Sebastian Harl <sh at tokkee.org> wrote:
>
> Now, my idea is to introduce a "reconfigure" callback that allows to
> reconfigure a single plugin. This could then be exposed, for example,
> through the 'unixsock' plugin.
>
> Example:
>
>   /* plugin.h */
>   int plugin_register_reconfig (const char *name,
>           int (*callback) (oconfig_item_t *));
>
>   /* UNIXSOCK */
>   RECONFIGURE <PluginName>
>
> Obviously, "reconfigure" will fail if the specified plugin did not
> register a "reconfig" callback. In case, the plugin did not specify a
> "config" callback either, "reconfigure" could be a no-op (no error).
>
> Internally, the callback would trigger re-parsing the whole
> collectd.conf file. Then, the appropriate config-block would be
> dispatched to the registered "reconfig" callback just in the same way
> that the original configuration was dispatched to the "config" callback.
>
> As a second step we could then think about also implementing a "reload"
> action. This would mean unloading and reloading the shared object of a
> plugin and then doing a "reconfigure".
>
> This approach will allow us to introduce a global "reload" operation
> step by step. Also, if we decide never to implement a global operation,
> some plugins (like the aggregator) will still be able to benefit from
> the infrastructure.

The implication here is that a reload wouldn't work unless all plugins
implement a reconfigure callback. Unless a cookie cutter approach can
be devised, it would take a fair amount of development effort to
implement the callback across all the collectd plugins.

This would limit the usefulness of the reload command. Maybe as a
stepping stone to having the reconfigure callback implemented
everywhere, the reload command could just skip over plugins that don't
have the callback, and output a list of plugins that have actually
been reconfigured.

The operator would then have some insight into which plugins have been
reconfigured, and why they may not see their configuration change take
effect.

> What do others think?

I think the idea is great.

A reload command would certainly help when you've got big
installations with lots of plugins loaded, or plugins that lag when
stopping and starting (such as the RRDtool plugin).

Cheers,
Lindsay


-- 
w: http://holmwood.id.au/~lindsay/
t: @auxesis



More information about the collectd mailing list