知识共享许可协议
本作品采用知识共享署名-非商业性使用-禁止演绎 3.0 未本地化版本许可协议进行许可。

检查是否有modpython.so
ls -alh /usr/local/ganglia-3.6.0/lib64/ganglia/ | grep modpython

ganglia 默认是开启mod_python

./configure --help | grep python

--disable-python        exclude mod_python and support for metric modules written in python
--with-python=PATH      Specify prefix for python or full path to interpreter

如果安装发现没有modpython.so, 说明找不到Python.h, 需要安装python-devel,这个在configure.ac有做test

more ./configure.ac | grep Python

# check for Python executable
AC_MSG_CHECKING(Python version)
if test -f "$PyEXEC_INSTALLDIR/include/python/Python.h"; then
  if test -f "$PyEXEC_INSTALLDIR/include/python$PyVERSION/Python.h"; then
AC_MSG_CHECKING(Python support)     
下载gmond_python_modules
mkdir -p /usr/local/src
cd /usr/local/src
git clone https://github.com/ganglia/gmond_python_modules
创建目录
mkdir -p /etc/ganglia/conf.d
mkdir -p /usr/local/ganglia-3.6.0/lib64/ganglia/python_modules 
修改gmond.conf
vi /usr/local/ganglia-3.6.0/etc/conf.d/modpython.conf

检查是否有
modules {
  module {
    name = "python_module"
    path = "modpython.so"
    params = "/usr/local/ganglia-3.6.0/lib64/ganglia/python_modules"
  }
}

include ("/usr/local/ganglia-3.6.0/etc/conf.d/*.pyconf") 
修改成 
include ("/etc/ganglia/conf.d/*.pyconf")
复制文件
cd /usr/local/src/gmond_python_modules
cp network/multi_interface/conf.d/multi_interface.pyconf /etc/ganglia/conf.d/
cp network/multi_interface/python_modules/multi_interface.py /usr/local/ganglia-3.6.0/lib64/ganglia/python_modules/
修改multi_interface.pyconf
vi /etc/ganglia/conf.d/multi_interface.pyconf

param interfaces {
  value = "em1 br1"
}
重启gmond
service gmond restart