The following code causes the Ganglia reporter to crash with a TypeError. Metrology version is 0.9.0. Python ganglia version is 0.2.4 (latest).
from metrology import Metrology
from metrology.reporter.ganglia import GangliaReporter
meter = Metrology.meter('meter')
meter.mark()
reporter = GangliaReporter("Group Name", "localhost", 8649, "udp", interval=1)
reporter.start()
reporter.join()
Exception is:
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/local/lib/python2.7/dist-packages/metrology/utils/periodic.py", line 24, in run
self.task()
File "/usr/local/lib/python2.7/dist-packages/metrology/reporter/base.py", line 11, in task
self.write()
File "/usr/local/lib/python2.7/dist-packages/metrology/reporter/ganglia.py", line 38, in write
self.send(name, 'Count', metric.count, 'int32', 'count')
File "/usr/local/lib/python2.7/dist-packages/metrology/reporter/ganglia.py", line 56, in send
self.gmetric.send(name=name, value=value, type=kind, units=unit, group=group)
File "/usr/local/lib/python2.7/dist-packages/ganglia/ganglia.py", line 34, in send
meta, data = self.pack(kwargs)
File "/usr/local/lib/python2.7/dist-packages/ganglia/ganglia.py", line 94, in pack
data.pack_string(metric['value'])
File "/usr/lib/python2.7/xdrlib.py", line 92, in pack_string
n = len(s)
TypeError: object of type 'int' has no len()
The following code causes the Ganglia reporter to crash with a TypeError. Metrology version is 0.9.0. Python ganglia version is 0.2.4 (latest).
Exception is: