[collectd] memcached:// support in curl plugin

Doug MacEachern Doug.MacEachern at hyperic.com
Mon Feb 23 19:03:48 CET 2009


> -----Original Message-----
> From: Florian Forster [mailto:octo at verplant.org]
> Sent: Monday, February 23, 2009 12:34 AM
> To: Doug MacEachern
> Cc: collectd at verplant.org
> Subject: Re: [collectd] memcached:// support in curl plugin
> 
> Hi Doug,
> 
> On Fri, Feb 20, 2009 at 03:21:25PM -0800, Doug MacEachern wrote:
> > I was starting on a generic plugin to pull metrics out of memcached
> > using libmemcached, then had a look at the new curl plugin (which is
> > great btw!) and realized most of the curl plugin features would
> apply.
> 
> sorry for the inert reaction, but I am of two minds about this. For
> one, you're perfectly right and your patch does introduce only a few
> lines new code. You'd probably have to copy a few functions to get the
> functionality into an own plugin.

Hi Florian,

No problem, that validates the choice isn't an easy one ;)
 
> On the other hand, the entire `match' stuff has already been moved to
> an extra module so plugins can use it easily. So the cURL plugin
mostly
> handles configuration and cURL options.

Very true.
 
> > Rather than copy-n-paste-n-rename most of curl.c, I had a  look at
> > libcurl to see if we could plugin in a memcached scheme handler but
> > the struct Curl_handler's are all static to url.c.
> 
> That's too bad, that'd be by far my favorite solution..

Wondering if it would make sense to implement our own pluggable scheme
handlers?  Even if there aren't that many lines of configuration handler
code, it'd be nice to share them if possible.
 
> Tell you what: I'll try to make a separate plugin from your patch and
> then we'll see how many code I actually did have to copy. I guess that
> quite some functions from the cURL plugin can be removed in the end..
> With the two alternatives side by side it might be a bit easier to
> judge the pros and cons..

I can also do this, just let me know which path you think is best:
- leave the patch as-is
- implement pluggable schemes
- a new plugin, memcachec? - and in the process see if we can extract
any more re-usable utils.

Thanks,
-Doug



More information about the collectd mailing list