Skip to content

Ambari cluster + Service Auto Start Configuration by API

enter image description hereAmbari services can be configured to start automatically on system boot. Each service can be configured to start all components, masters and workers, or selectively.

so how to enable all services in ambari cluster to start automatically on system boot by API ?

Remark – by default all services are disabled



You may use auto-restart API, refer following document

Syntax. Following is syntax of API

curl -u admin:<password> -H "X-Requested-By: ambari" -X PUT 'http://<ambari host>:<ambari port>/api/v1/clusters/<cluster_name>/components?ServiceComponentInfo/<component name>)' -d '{"ServiceComponentInfo" : {"recovery_enabled":"true"}}'

Example. To set auto-restart for app timeline server component of YARN service use curl command as follows.

curl -u admin:<password> -H "X-Requested-By: ambari" -X PUT 'http://localhost:8080/api/v1/clusters/HDPCL/components?ServiceComponentInfo/' -d '{"ServiceComponentInfo" : {"recovery_enabled":"true"}}'

NOTE: You can find list of components from http://<ambarihost>:<ambari port>/api/v1/clusters/Fenton/components

User contributions licensed under: CC BY-SA
8 People found this is helpful