Install and configure vSphere Monitoring Agent

The NameNode’s monitoring agent monitors the NameNode daemon and notifies the vSphere if the NameNode daemon fails or becomes unstable. As soon as the vSphere receives the notification, it triggers HA solution to restart NameNode VM on either the same or a different ESXi host.

Follow the steps listed below to install and configure the monitoring agent:

Step 1: On the NameNode VM, download the HDP HA kit for VMware.

  • Download the Hortonworks Data Platform High Availability Kit for VMware from here.

  • Extract the following RPM files from the kit:

    • For RHEL/CentOS v5.x:

      hmonitor-vsphere-monitoring-1.1.0.15-1.el5.x86_64.rpm
    • For RHEL/CentOS v6.x:

      hmonitor-vsphere-monitoring-1.1.0.15-1.el6.x86_64.rpm
  • Install the NameNode monitoring functionality:

    yum install hmonitor
    rpm -ivh hmonitor-vsphere-monitoring-1.1.0.15-1*
    yum install hmonitor-vsphere-namenode-daemon 

Step 2: Configure the monitoring agent to point to the NameNode configurations.

  • Edit the /usr/lib/hadoop/monitor/vm-namenode.xml file and provide the FQDN for your NameNode VM here:

    <property>
     <name>service.monitor.portprobe.host</name>
     <value>$NameNode_FQDN</value>
     <description> Port to probe via a telnet operation.</description>
    </property>
  • Provide the HDFS port number.

    <property>
     <name>service.monitor.portprobe.port</name>
     <value>$HDFS_filesystem_port</value>
     <description> Port to probe via a telnet operation.</description>
    </property>
  • Provide the FQDN and port information for the HDFS filesystem.

    <property>
     <name>service.monitor.webprobe.url</name>
     <value>$http://NameNode_FQDN:NameNode_web_ui_port/</value>
     <description> URL to get.</description>
    </property>