Pivotal Knowledge Base


How to find a Hadoop or Ambari cluster name from the command line


Product Version
Pivotal HD 3.0.x
Ambari 1.7.1 / 2.1.2


This article will describe how to find the Ambari cluster name from the command line. 


During troubleshooting and more specifically, while using the Ambari API, it might be necessary know the Ambari cluster name. This article describes a simple way to find the cluster name via the command line.


1. Log into the Ambari node as the user root.

2. Run the command http://localhost:8080/api/v1/clusters/ :

[root@amb171hawq ~]# curl --user admin:admin http://localhost:8080/api/v1/clusters/
"href" : "http://localhost:8080/api/v1/clusters/",
"items" : [
"href" : "http://localhost:8080/api/v1/clusters/amb171hawq",
"Clusters" : {
"cluster_name" : "amb171hawq",
"version" : "PHD-3.0"
[root@amb171hawq ~]#

3. From the above output, we can see that the cluster name is "amb171hawq".

Internal Comments 

This will be used for any KB articles that use the "Ambari API" as a reference article to avoid duplicating information in all KB articles.  


Powered by Zendesk