Apache Ambari Operations
Also available as:
loading table of contents...

Customizing the Metrics Collector Mode

Metrics Collector is built using Hadoop technologies such as Apache HBase, Apache Phoenix, and Apache Traffic Server (ATS). The Collector can store metrics data on the local file system, referred to as embedded mode, or use an external HDFS, referred to as distributed mode. By default, the Collector runs in embedded mode. In embedded mode, the Collector captures and writes metrics to the local file system on the host where the Collector is running.


When running in embedded mode, you should confirm that hbase.rootdir and hbase.tmp.dir have adequately sized and lightly used partitions. Directory configurations in Ambari Metrics > Configs > Advanced > ams-hbase-site are using a sufficiently sized and not heavily utilized partition, such as:


You should also confirm that the TTL settings are appropriate.

When the Collector is configured for distributed mode, it writes metrics to HDFS, and the components run in distributed processes, which helps to manage CPU and memory consumption.

To switch the Metrics Collector from embedded mode to distributed mode,


  1. In Ambari Web, browse to Services > Ambari Metrics > Configs.

  2. Change the values of listed properties to the values shown in the following table:

    Configuration SectionPropertyDescriptionValue


    Metrics Service operation mode (timeline.metrics.service.operation.mode)

    Designates whether to run in distributed or embedded mode.


    Advanced ams-hbase-site


    Indicates AMS will run in distributed mode.


    Advanced ams-hbase-site

    hbase.rootdir 1

    The HDFS directory location where metrics will be stored.


  3. Using Ambari Web > Hosts > Components restart the Metrics Collector.

If your cluster if configured for a highly available NameNode, set the hbase.rootdir value to use the HDFS name service instead of the NameNode host name:


Optionally, you can migrate existing data from the local store to HDFS prior to switching to distributed mode:


  1. Create an HDFS directory for the ams user:

    su - hdfs -c 'hdfs dfs -mkdir -p /apps/ams/metrics'
  2. Stop Metrics Collector.

  3. Copy the metric data from the AMS local directory to an HDFS directory. This is the value of hbase.rootdir in Advanced ams-hbase-site used when running in embedded mode. For example:

    su - hdfs -c 'hdfs dfs -copyFromLocal
    /var/lib/ambari-metrics-collector/hbase/* /apps/ams/metrics'
    su - hdfs -c 'hdfs dfs -chown -R ams:hadoop
  4. Switch to distributed mode.

  5. Restart the Metrics Collector.

If you are working with Apache HBase cluster metrics and want to display the more granular metrics of HBase cluster performance on the individual region, table, or user level, see .

More Information

Customizing Cluster-Environment-Specific Settings

Customizing TTL Settings

Enabling Individual Region, Table, and User Metrics for HBase