(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.
Here's my test example:
import pprint
import os
def metric_init(params):
global descriptors
metrics = []
metric = {'name': 'myMetric',
'call_back': metric_handler,
'time_max': 90,
'value_type': 'uint',
'units': 'units',
'format':'%u',
'description': 'Spoofed Metric',
'groups':'testmort'}
spoof_1 = metric
spoof_1['SPOOF_NAME'] = 'myMetric-r1i0n0'
spoof_1['SPOOF_HOST'] = "192.168.159.10:r1i0n0"
spoof_2 = metric
spoof_2['SPOOF_NAME'] = "myMetric-r1i0n8"
spoof_2['SPOOF_HOST'] = "192.168.159.18:r1i0n8"
metrics = [spoof_1, spoof_2]
pprint.pprint(metrics)
descriptors = metrics
return descriptors
def metric_cleanup():
pass
def metric_handler(name):
print "name = '%s'" % name
return 1
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.
thanks
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