Ganglia is a scalable distributed system monitoring tool that allows remote viewing live or historical statistics for a cluster. The Ganglia system consists of the following components:

  • A PHP-based web front end
  • Ganglia monitoring daemon (gmond): a multi-threaded monitoring daemon
  • Ganglia meta daemon (gmetad): a multi-threaded aggregation daemon
  • A few small utility programs

The daemon gmetad aggregates metrics from the gmond instances, storing them in a database. The front end pulls metrics from the database and graphs them. You can aggregate data from multiple clusters by setting up a separate gmetad for each, and then a master gmetad to aggregate data from the others. If you configure Ganglia to monitor multiple clusters, remember to use a separate port for each cluster.

MapR with Ganglia

The CLDB reports metrics about its own load, as well as cluster-wide metrics such as CPU and memory utilization, the number of active FileServer nodes, the number of volumes created, and other cluster activity. For a complete list of metrics, see Service Metrics.

MapRGangliaContext collects and sends CLDB metrics, FileServer metrics, and cluster-wide metrics to Gmon or Gmeta, depending on the configuration. On the Ganglia front end, these metrics are displayed separately for each FileServer by hostname. To monitor MapR metrics and services with Ganglia:

  1. Install the ganglia monitor on CLDB nodes to collect all the metrics required for monitoring a MapR cluster.
  2. To monitor other services such as HBase and MapReduce, install Gmon on nodes running the services and configure them as you normally would.

The Ganglia properties for the cldb and fileserver contexts are configured in the file $INSTALL_DIR/conf/hadoop-metrics.properties. Any changes to this file require a CLDB restart.

Installing Ganglia

To install Ganglia on Ubuntu:

  1. On each CLDB node, install ganglia-monitor: sudo apt-get install ganglia-monitor
  2. On the machine where you plan to run the Gmeta daemon, install gmetad: sudo apt-get install gmetad
  3. On the machine where you plan to run the Ganglia front end, install ganglia-webfrontend: sudo apt-get install ganglia-webfrontend

To install Ganglia on Red Hat:

  1. Download the following RPM packages for Ganglia version 3.1 or later:
    • ganglia-gmond
    • ganglia-gmetad
    • ganglia-web
  2. On each CLDB node, install ganglia-monitor: rpm -ivh <ganglia-gmond>
  3. On the machine where you plan to run the Ganglia meta daemon, install gmetad: rpm -ivh <gmetad>
  4. On the machine where you plan to run the Ganglia front end, install ganglia-webfrontend: rpm -ivh <ganglia-web>

For more details about Ganglia configuration and installation, see the Ganglia documentation.

To start sending CLDB metrics to Ganglia:

  1. Make sure the CLDB is configured to send metrics to Ganglia (see Service Metrics).
  2. As root (or using sudo), run the following commands:

    maprcli config save -values '{"cldb.ganglia.cldb.metrics":"1"}'
    maprcli config save -values '{"cldb.ganglia.fileserver.metrics":"1"}'

To stop sending CLDB metrics to Ganglia:

  • As root (or using sudo), run the following commands:

    maprcli config save -values '{"cldb.ganglia.cldb.metrics":"0"}'
    maprcli config save -values '{"cldb.ganglia.fileserver.metrics":"0"}'