Ambari Reference Guide
Also available as:
PDF
loading table of contents...

Chapter 4. Using Custom Host Names

You can customize the agent registration host name and the public host name used for
 each host in Ambari. Use this capability when "hostname" does not return the public network host name for your machines.

How to Customize the name of a host