>>> On 10/3/2008 at 12:23 PM, in message
<[EMAIL PROTECTED]>, Martin Hicks
<[EMAIL PROTECTED]> wrote:

> (sorry if this is a duplicate.  I sent it yesterday but I haven't seen
> it come back yet, nor has it shown up in the mailing list archives on
> sourceforge)
> 
> Hi,
> 
> I backported the spoofing patches to my 3.1.1 build (I also check this
> against trunk to make sure I hadn't missed something) in order to play
> with python DSO and spoofing.
> 
> I ran into a question.  If you have the same metric for a bunch of
> different hosts, just with different SPOOF_HOST, then how do you tell
> the difference in the call_back?  You just get the 'name', which appears
> to always be the same.
> 
[SNIP]
> 
> Am I expected to deal with each SPOOF_HOST when a call_back occurs for a
> particular metric name?
> 
> I kind of expected SPOOF_NAME to be in the 'name' argument of the
> call_back.
> 

For the spoof modules that I wrote, I appended the host name to the name of the 
metric and used it as a unique metric identifier

metric_name = name + ':' + host_name

Then in the handler I just call 

metric_keys = name.split(':')

and I end up with an array that uniquely identifies which metric for which 
host.  Finally, to make sure that the concatenation of the 
metric_name:host_name does not show up in the front end as the title of the 
graph, I make sure to assign a title to the metric in the gmond.conf file.

This is just one way to uniquely identify any spoofed metric.  Since gmond has 
no idea what a metric module is doing or what naming convention is being used, 
it simply leaves all of that up to the module itself rather than trying to 
enforce some policy.

Brad


-------------------------------------------------------------------------
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