On Mon, Oct 06, 2008 at 04:04:01PM -0600, Brad Nicholes wrote:
> > 
> > Does this not also mean I need to know at gmond start-up time which
> > hosts the module will be spoofing for and rewrite
> > /etc/ganglia/conf.d/<module>.pyconf to reflect the list of nodes
> > that will need to be spoofed?
> > 
> 
> No.  Sorry, the colon separated name/id actually has more significance
> than I stated previously.  The metric_name:host_name is actually a
> derivative of the same style used by gmetric in the --spoof=STRING
> parameter.  Part of the patch to gmond.c was to add a function called
> get_metric_names() which for a spoofed metric, specifically looks for
> a colon separated metric name, pulls the first name from the string
> and uses that to match against the name that is referenced in the
> gmond.conf file.  So for example if your metric name is
> "my_foo_metric" then the name that is referenced in gmond.conf should
> also be "my_foo_metric".  But the name that your module actually
> assigns as the metric name in the metric definition structure should
> be "my_foo_metric:some_host_or_other_id".  This needs to be documented
> in the README.in file that explains how to write a python metric
> module.  I also plan on adding this same documentation to the wiki
> once the patch has been backported.

ah, I missed that bit in get_metric_names().

Thanks for clarifying.  I think I can manage to write a spoofed DSO now
without problem.

so the part after the colon could be any key or identifier you want, as
long as the call_back function can extract which SPOOF_HOST should be
updated.

mh


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ganglia-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ganglia-general

Reply via email to