Posts: 12
Registered: ‎01-21-2016
Accepted Solution

Service Names are Random in Director provisioned Cluster

After provisioned the cluster via Cloudera Director, all the service names appear to be random:

e.g. "CD-ZOOKEEPER-ftOlmEAM": 



{ "name" : "CD-ZOOKEEPER-ftOlmEAM", "type" : "ZOOKEEPER", "clusterRef" : { "clusterName" : "platform-pod1-dev-cdh" }, "serviceUrl" : "", "roleInstancesUrl" : "", "serviceState" : "STARTED", "healthSummary" : "GOOD", "healthChecks" : [ { "name" : "ZOOKEEPER_CANARY_HEALTH", "summary" : "GOOD", "suppressed" : false }, { "name" : "ZOOKEEPER_SERVERS_HEALTHY", "summary" : "GOOD", "suppressed" : false } ], "configStalenessStatus" : "FRESH", "clientConfigStalenessStatus" : "FRESH", "maintenanceMode" : false, "maintenanceOwners" : [ ], "displayName" : "ZOOKEEPER-1", "entityStatus" : "GOOD_HEALTH" }


v.s. cluster provisioned via Cloudera Manager wizzard, the service name is very predictable...


  "items" : [ {
    "name" : "zookeeper",
    "type" : "ZOOKEEPER",
    "clusterRef" : {
      "clusterName" : "cluster"
    "serviceUrl" : "http://ip-10-110-1-204.ec2.internal:7180/cmf/serviceRedirect/zookeeper",
    "serviceState" : "STARTED",
    "healthSummary" : "GOOD",
    "healthChecks" : [ {
      "summary" : "GOOD"
    }, {
      "summary" : "GOOD"
    } ],
    "configStale" : false,
    "maintenanceMode" : false,
    "maintenanceOwners" : [ ],
    "displayName" : "ZooKeeper"


This makes it very difficult to build automation around Manager REST APIs. For example, download client-conif:


Is there any way to config this in Director's cluster config or rename the service after provisioning?

Cloudera Employee
Posts: 74
Registered: ‎10-28-2014

Re: Service Names are Random in Director provisioned Cluster



Service names must be globally unique in Cloudera Manager. Director appends random characters to ensure that this uniqueness when creating services in case there are multiple clusters created under the same Cloudera Manager. There is no way to turn off this randomization in Director at the moment and there is no way to rename a service in Cloudera Manager (you can rename the display name only).


Since Director supports only a single instance of each service type, you can retrieve the list of services from Cloudera Manager and create a mapping from service type to service name for your cluster.


In bash, you can use jq to process the service list to retrieve the service names.

$ curl -u cmusername:cmpassword http://<cmhost>:7180/api/v15/clusters/<clustername>/services | jq -r '.items[] | "export \(.type)=\(.name)"' >
$ cat 

you can then script against well known servicename variables by sourcing this script.


You can similarly retrieve the service names using the java client or python client.



Posts: 12
Registered: ‎01-21-2016

Re: Service Names are Random in Director provisioned Cluster

makes sense. thanks a lot!