[collectd] patch for email stats from postfix and amavisd-new, dns stats from powerdns

Sebastian Harl sh at tokkee.org
Wed Nov 21 09:46:38 CET 2007


Hi Luke,

On Tue, Nov 20, 2007 at 05:37:11PM -0800, Luke Heberling wrote:
> Sebastian Harl wrote:
> >> +/* constant value inlined in module_register for 
> >> + * benefit of debian maintainer script
> >> + */
> >> +#define PLUGIN_NAME "amafix"
> >
> > Just out of curiosity: what's the benefit you're talking about? ;-)
> >
> check_plugins.pl was confused by the lack of quotation marks around the 
> plugin name argument to the plugin_register_* family of functions.  It's 
> the regular expression on line 57 of debian/bin/check_plugins.pl.

Hmm... I've somewhat misread your comment the first time and I was thinking
you defined PLUGIN_NAME for the benefit of the Debian package (which obviously
adds no benefit at all ;-). Anyway, please just use the plugin name directly
instead of the define - plugin names usually don't change so there is no need
to not use it directly.

> Perhaps a worthwhile 
> feature would be the ability to override a given type declaration.
> For example:
> email_count          value:GAUGE:0:U          #Default for all plugins
> email_count.amavis   value:COUNTER:0:U        #for amavis plugin

This will probably add a lot of confusion. Any data type is supposed to be
well defined and "frontends" like collection.cgi would get much more complex
if they aren't. Any data type definitions should be as specific as necessary
to make them usable in most cases. In this case something like "email_gauge"
would have been much better - but we cannot change it now without breaking
backward compatibility... :-/

> > I hope I didn't scare you off but could give you some useful hints :-)
> Not at all. As if it weren't apparent, I'm rather a novice when it comes 
> to C, and took on this project in part to cut my teeth, as it were. All 
> useful hints are appreciated.

Good - guess, I will have another close look at your next patches then :-)

> I'll be making all of the changes you 
> suggested and will have a set of patches for you by probably early next 
> week.

Please send in a new set of patches and remember to split them up into patches
for each module (each plugin, utils_mru_cache, etc.).

Cheers,
Sebastian

-- 
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

-------------- 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/20071121/55933f80/attachment.pgp 


More information about the collectd mailing list