Hadoop provides interfaces for many monitoring tools, such as JMX, Nagios, and Ganglia. Using Ganglia to monitor hadoop is easy to configure, just modify the $ HADOOP_HOMEconfhadoop-metrics.properties file and change the relevant configuration segment to the following example: # Configurationofthedfscontextforganglia # P Hadoop provides interfaces for many monitoring tools, such as JMX, Nagios, and Ganglia. Using Ganglia to monitor hadoop is easy to configure. You only need to modify $ HADOOP_HOME/conf/hadoop-me
TrIn the ics. properties file, modify the relevant configuration section to the following example:
- # Configuration of"DfS "contExT for ganglia
- # Pick one: Ganglia 3.0 (foRmEr) or Ganglia 3.1 (latter)
- #Dfs. class=Org. Apache. hadoop. metrics. ganglia. GangliaContext
- Dfs. class=Org. Apache. hadoop. metrics. ganglia. GangliaContext31
- Dfs. period=10
- Dfs. servers=192. 168.9.45: 8649/* The address is the address of the Ganglia monitoring server.
-
- # Configuration of the "maprEd"Context for ganglia
- # Pick one: Ganglia 3.0 (former) or Ganglia 3.1 (latter)
- #Mapred. class=Org. Apache. hadoop. metrics. ganglia. GangliaContext
- Mapred. class=Org. Apache. hadoop. metrics. ganglia. GangliaContext31
- Mapred. period=10
- Mapred. servers=192. 16 8.9.45: 8649
-
- # Configuration of the "jvm" context for ganglia
- Jvm. class=Org. Apache. hadoop. metrics. ganglia. GangliaContext
- Jvm. period=10
- Jvm. servers=192. 16 8.9.45: 8649
Keep the default value for other parts of the configuration file.
Distribute the configuration file to various datanode nodes and restart hadoop.ClusterYou can see the running status of each Hadoop node on the monitoring page of Ganglia. Note: My Hadoop version is cloudera and the version isHadoop-0.20.2-CDH3B4; Different Hadoop versions may have different things to modify.