On each host in the cluster:
Stop the Hadoop services.
Change to the Hadoop configuration directory.
cd $HADOOP_CONF_DIR
Copy the Ganglia metrics properties file into place.
mv hadoop-metrics2.properties-GANGLIA hadoop-metrics2.properties
Edit the metrics properties file and set the Ganglia server hostname.
namenode.sink.ganglia.servers=my.ganglia.server.hostname:8661 datanode.sink.ganglia.servers=my.ganglia.server.hostname:8660 resourcemanager.sink.ganglia.servers=my.ganglia.server.hostname:8664 nodemanager.sink.ganglia.servers=my.ganglia.server.hostname:8660 historyserver.sink.ganglia.servers=my.ganglia.server.hostname:8666 maptask.sink.ganglia.servers=my.ganglia.server.hostname:8660 reducetask.sink.ganglia.servers=my.ganglia.server.hostname:8660
Restart the Hadoop services.