Category: Ganglia

Cluster/Grid level monitoring and trending system

Setup and configure Ganglia Python Modules on CentOS/RHEL 6.3

This article will guide you through the installation and configuration steps of Ganglia Plugins on CentOS 6.3.

One of the beauty of Ganglia is to add Custom metric gathering modules. These modules can be plugged directly into gmond to monitor user-specified metrics.

The procedure mentioned in this tutorial is tested on:

OS CentOS 6.3
Ganglia Version 3.6.0
Ganglia Web 3.5.10
Confuse 2.7
RRDTool 1.4.8


Also read my tutorial for Setting up Ganglia. For understanding purpose, I will take examples of two plugins (procstat and network/multi_interface) that we are going to deploy on one of the node (client machine).

1) Prerequisite

  • Ganglia Setup in working condition.
  • “modpython.so” should exits on Client Gmond Machine

   # ls -lh /usr/local/lib64/ganglia/modpython.so 
   -rwxr-xr-x. 1 root root 53K Aug 16 13:40 /usr/local/lib64/ganglia/modpython.so

2) Installation

2.1) Create a directory where you would download Ganglia Python Modules:

   # mkdir /usr/local/src
# cd /usr/local/src


2.3) First of all we need to Download Ganglia Python Modules from Git-Hub:

   # git clone https://github.com/ganglia/gmond_python_modules

3) Configuration
3.1) Create the following directory:

   # mkdir -p /etc/ganglia/conf.d /usr/local/lib64/ganglia/python_modules 


3.2) Add the following line inside module section in “/etc/ganglia/gmond.conf” config file:

   # vi /etc/ganglia/gmond.conf
   module {
      name = "python_module"
      path = "/usr/local/lib64/ganglia/modpython.so"
      params = "/usr/local/lib64/ganglia/python_modules/"
   }


3.3) Also add the following line at the end of “/etc/ganglia/gmond.conf” config file:

   # vi /etc/ganglia/gmond.conf
   include('/etc/ganglia/conf.d/*.pyconf')


3.4) Copy the sample python modules configuration and binary file to there respective directory:

   # cd gmond_python_modules
   # cp procstat/conf.d/procstat.pyconf /etc/ganglia/conf.d/
   # cp procstat/python_modules/procstat.py /usr/local/lib64/ganglia/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/lib64/ganglia/python_modules/

3.5) Modify the python module config file to add all the interface that we want to monitor traffic for in:

   # vi /etc/ganglia/conf.d/multi_interface.pyconf
    param interfaces {
      value = "eth0 ppp0"
    }

3.6) Modify the python module config file to add all the process that we want to monitor for in:

   # vi /etc/ganglia/conf.d/procstat.pyconf
   param httpd {
      value = '/var/run/httpd.pid'
    }

    param mysqld {
      value = '/\/usr\/libexec\/mysqld/'
    }

3.7) Restart the gmond process :

   # service gmond restart

3.8) Check the Ganglia graphs in Web Interface for that node (client machine), you will see the the procstat and multi-interface graphs.


Related Posts:
Setup and configure Ganglia-3.6 on CentOS/RHEL 6.3

Advertisements