[collectd] apache and collectd plugin

Florian Forster octo at verplant.org
Wed Apr 15 11:20:46 CEST 2009


Hi Amit,

On Tue, Apr 14, 2009 at 09:07:28PM +0530, Amit Gupta wrote:
> Do find the patch attached.

your patch applied cleanly to the Git master branch :)

I've seen some minor issues:

 - The handling of ‘lci’ in ‘config’ has some problems, I think: If
   ‘child’ is “Instance”, its ->key, ->values etc. are copied to ‘lci’.
   Later, in the ‘if (lci)’ block, they are overwritten. I'd simply
   remove the support for “Instance” in the legacy code.
 - In the ‘if (lci)’ block: lci->values is allocated but never freed.
 - It'd be awesome if you could pull the ‘apache_buffer’ variable and
   friends into the ‘apache_t’ structure. You can pass the
     apache_t *st;
   to the ‘apache_curl_callback’ function using:
     curl_easy_setopt (st->curl, CURLOPT_WRITEDATA, st);
   The argument ‘stream’ will then be a pointer to ‘st’. This will allow
   to query multiple hosts in parallel, as will be the case with the
   “complex read” stuff.

I've attached an updated patch: I've removed some now unused variables,
fixed some whitespace issues and converted the C++-style comments to
C-style comments. I'd be great if you could base further changes on this
patch.

Regards :)
-octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: collectd-apache.patch
Type: text/x-diff
Size: 16932 bytes
Desc: not available
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20090415/6d65c64a/attachment-0001.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20090415/6d65c64a/attachment-0001.pgp 


More information about the collectd mailing list