Open cyberflow opened 10 years ago
I got this error too. Did U solved it
Have you guys tried renaming the module to ensure it's not conflicting with Python's own mysql module?
I have tried to rename it to mysql_test but got the error either [root@localhost python_modules]# /usr/local/ganglia/sbin/gmond -d10 loaded module: core_metrics loaded module: cpu_module loaded module: disk_module loaded module: load_module loaded module: mem_module loaded module: net_module loaded module: proc_module loaded module: sys_module loaded module: python_module [PYTHON] Can't call the metric_init function in the python module [mysql_test].
Traceback (most recent call last): File "/usr/local/lib64/ganglia/python_modules/mysql_test.py", line 1095, in metric_init update_stats(REPORT_INNODB, REPORT_MASTER, REPORT_SLAVE) File "/usr/local/lib64/ganglia/python_modules/mysql_test.py", line 264, in update_stats mysql_stats[key] = (int(global_status[key]) - int(mysql_stats_last[key])) / time_delta ValueError: invalid literal for int() with base 10: '' udp_recv_channel mcast_join=NULL mcast_if=NULL port=8649 bind=NULL buffer=0 socket created, SO_RCVBUF = 124928
tcp_accept_channel bind=NULL port=8649 gzip_output=0 Unable to create tcp_accept_channel. Exiting.
if global_status[key]=='':
a = '0'
else:
a = global_status[key]
if mysql_stats_last[key] == '':
b = '0'
else:
b = mysql_stats_last[key]
mysql_stats[key] = (int(a) - int(b)) / time_delta
I changed mysql.py to this , it works well
@chuckpu can you submit a pull request ?
Thanks
If i try add module to ganglia i get error in logs:
if i try run module form console: