Personal tools
You are here: Home Documentation Hadoop Monitoring Guide
Document Actions

Monitoring Guide

by admin last modified 2008-10-13 06:22

How to monitor Hadoop using JMX and Nagios

Install the check_jmx Nagios plugin

  • Download the check_jmx Nagios plugin from nagiosexchange
  • Unpack check_jmx.
  • Run make
  • Copy the contents of the plugins/ directory to the Nagios plugins directory; the two files should be a *.jar and a script.  Edit the check_jmx script as necessary to reflect any necessary environment setup.

Enable JMX monitoring on Hadoop

Add the following line to hadoop-env.sh:
export HADOOP_NAMENODE_OPTS=" -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=8004 -Dcom.sun.management.jmxremote.password.file=$HADOOP_HOME/conf/jmxremote.password -Dcom.sun.management.jmxremote.access.file=$HADOOP_HOME/conf/jmxremote.access"
export HADOOP_DATANODE_OPTS=" -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=8004 -Dcom.sun.management.jmxremote.password.file=$HADOOP_HOME/conf/jmxremote.password -Dcom.sun.management.jmxremote.access.file=$HADOOP_HOME/conf/jmxremote.access"

Add check_jmx to the Nagios deploy

./check_jmx -U service:jmx:rmi:///jndi/rmi://node182:8004/jmxrmi -O hadoop.dfs:service=DataNode,name=DataNodeStatistics -A BlockReportsMaxTime -w 10 -c 150
./check_jmx -U service:jmx:rmi:///jndi/rmi://node182:8004/jmxrmi -O java.lang:type=Memory -A HeapMemoryUsage -K used -C 10000000




Powered by Plone, the Open Source Content Management System