I was testing an instance (toolsbeta-puppettestbed) for Ganglia statistics of a Redis server with "import redis::ganglia". The instance had the Ubuntu package python-redis installed from earlier, unrelated tests.
This led to ganglia-monitor, upon reading /etc/ganglia/conf.d/redis.pyconf's:
modules { |
module { |
name = "redis" |
language = "python" |
param host { value = "127.0.0.1" } |
param port { value = 6379 } |
} |
} |
to import the Python module redis from the Ubuntu package, but not the module of the same name in /usr/lib/ganglia/python_modules/redis.py. Symptoms were /var/log/upstart/ganglia-monitor.log containing:
[PYTHON] Can't find the metric_init function in the python module [redis]. |
Unable to find the metric information for 'connected_clients'. Possible that the module has not been loaded. |
[...] |
but in fact *a* module had been loaded, just not the "right" one.
Two immediate possible solutions:
a) Rename /usr/lib/ganglia/python_modules/redis.py to redis_monitoring.py or something similar;
b) liaison with upstream Ganglia so that /usr/lib/ganglia/python_modules gets higher priority in Python's path.
Version: unspecified
Severity: minor
URL: https://github.com/ganglia/monitor-core/issues/22