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

AMS High Availability

Ambari installs the Ambari Metrics System (AMS) , into the cluster with a single Metrics Collector component by default. The Collector is a daemon that runs on a specific host in the cluster and receives data from the registered publishers, the Monitors and Sinks. Depending on your needs, you might require AMS to have two Collectors to cover a High Availability scenario. This section describes the steps to enable AMS High Availability.

Prerequisite

You must deploy AMS in distributed (not embedded) mode.

To provide AMS High Availability:

Steps

  1. In Ambari Web, browse to the host where you would like to install another collector.

  2. On the Host page, choose +Add.

  3. Select Metrics Collector from the list.

    Ambari installs the new Metrics Collector and configures Ambari Metrics for HA.

    The new Collector will be installed in a “stopped” state.

  4. In Ambari Web, will have to start the new Collector component from Ambari Web.

[Note]Note

If you attempt to add a second Collector to the cluster without first switching AMS to distributed mode, the collector will install but will not be able to be started.

Traceback (most recent call last):
File
 "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py", line 150, in <module>
 AmsCollector().execute()
File
 "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 313, in execute
 method(env)
File
"/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py", line 48, in start self.configure(env, action = 'start') # for security
File
 "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 116, in locking_configure original_configure(obj, *args, **kw)
File
 "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py", line 42, in configure raise
Fail("AMS in embedded mode cannot have more than 1 instance.
Delete all but 1 instances or switch to Distributed mode ") resource_management.core.exceptions.
Fail: AMS in embedded mode cannot have more than 1 instance.
Delete all but 1 instances or switch to Distributed mode

Workaround: Delete the newly added Collector, enable distributed mode, then re-add the Collector.

More Information

AMS Architecture

Customizing the Metrics Collector Mode