>>> On 6/5/2008 at 5:30 PM, in message
<[EMAIL PROTECTED]>, "Bernard Li"
<[EMAIL PROTECTED]> wrote:
> Hi Brad:
> 
> On Thu, Jun 5, 2008 at 4:25 PM, Brad Nicholes <[EMAIL PROTECTED]> wrote:
> 
>> The modules sections is one of those things that is becoming more important 
> as functionality grows.  Initially for a python metric module the modules 
> section was really unnecessary.  The name directive is really not used if 
> there are no module parameters, however their is some validation taking place 
> against the language directive.  Also if your module requires any kind of 
> configuration parameters, the only way to specify the parameters is through a 
> modules section.  So even though your python module might run fine without a 
> modules section today, it is probably a good idea to get used to adding it to 
> the pyconf file just to make sure that you don't run into problems in the 
> future.
> 
> My suggestion would be to add code to make sure that the .pyconf file
> has the correct sections and parameters.  You can't always expect the
> users to do the right thing :-)
> 

There really isn't anyway to do that kind of validation.  Libconfuse will 
validate that a given directive is syntactically correct, but there isn't a way 
to validate that a modules section exists for each module, especially a python 
module.  If a module section does not exist for a C module, the C module will 
never load and gmond will fail if a collection group contains a metric that is 
not supported by any loaded module.  However a python module is different 
because it is run through mod_python.  Basically gmond has no idea that a 
python module even exists.  It thinks that all of the python metrics belong to 
mod_python which is a C module.  Mod_python loads any .py file that it finds in 
the python module directory and then queries each one for metric definitions 
which is a completely different code path than for a C module.

Brad


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Ganglia-general mailing list
Ganglia-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-general

Reply via email to