As discussed in Chapter 1, Introduction to Monitoring, Nagios is a monitoring platform, and it works very well for the Hadoop monitoring needs. Let's see how to configure Nagios for the Hadoop service checks.
On the Nagios server, called
mnode
, we need to set up the service definitions, the command definitions, and the host definitions as defined here. These definitions will enable checks, and by using these we can gather the status of a service or a node. The plugin needs to be downloaded and installed from http://www.nagios.org/download.
HDFS space check: Check the HDFS space usage on the cluster.
define command{ command_name check_hadoop_space command_line $PATH$/check_hadoop_namenode.pl -H $HOSTADDRESS$ -u $USER8$ -P $PORT$ -s $ARG2$ -w $ARG3$ -c $ARG4$ } define host { use hadoop-server host_name hadoopnode1 alias Remote Host address 192.168.0.1 contact_groups admins } Service definition: define service { use generic-service service_description...