Using JMX for accessing HBase metrics

You can access HBase metrics over Java Management Extensions (JMX) through either the HBase web interface or by directly accessing the JMX remote agent.

You can access JMX metrics through the HBase web interface. JMX is enabled by default on your machine for local HBase access.

  1. In Cloudera Manager, select the HBase service.
  2. Click the HBase Web UI tab.
    The HBase portal is launched in a separate window.
  3. Click Metrics > JMX to view the HBase metrics using JMX.
    Alternatively, use the following command format to access the JMX remote agent.
    curl -i http://<localhost>:<port>/jmx

    You can use the qry parameter to fetch only a particular key.

    curl -i http://<localhost>:<port>/jmx?qry=Hadoop:service=NameNode,name=NameNodeInfo
  4. Click Metrics > JMX with description to view the HBase metrics along with the descriptions for the items.
    Alternatively, use the following command to access the HBase metrics with descriptions.
    curl -i http://<localhost>:<port>/jmx?description=true
    To enable JMX so that you can access the HBase service from remote hosts, use the following steps.
    1. Go to the HBase service.
    2. Click the Configuration tab.
    3. Select Scope > RegionServer or Scope > Master.
    4. Select Category > Advanced.
    5. Locate the Java Configuration Options for HBase RegionServer or Java Configuration Options for HBase Master property or search for it by typing its name in the Search box.
    6. Add HBASE_REGIONSERVER_OPTS or HBASE_MASTER_OPTS JVM configuration options.
    7. Enter a Reason for change, and then click Save Changes to commit the changes.
    8. Click Actions > Restart to restart the HBase service.
The HBase metrics are displayed in the JMX format.