How restart arcadia service programmatically through Cloudera Manager

Cloudera Manager provides a REST API to manage services.

Using the API within scripts can easily control certain actions like restarting specific roles.

Here’s ane example POST command to restart the visualization server:

curl -X POST  -H "Content-Type:application/json" -u admin:admin  
-d ' { "items" : [ "arcadiaenterprise-ARCVIZ-fa373f09ab5f1e7fbd1f194428253c21"] }' 
 'http://10.0.0.221:7180/api/v17/clusters/curly/services/arcadiaenterprise/roleCommands/restart'

To identify the “items” you want to find role name. You can do that by running a different curl command to list all the roles under the arcadiaentrprise service.

curl -u admin:admin http://10.0.0.221:7180/api/v17/clusters/curly/services/arcadiaentrprise/roles**

References:
[1] https://www.ericlin.me/2016/06/how-to-use-cloudera-manager-api-to-check-a-service-role-exited-unexpectedly/
[2] https://community.cloudera.com/t5/Cloudera-Manager-Installation/How-to-restart-a-role-of-the-specified-service-using-CM-REST/m-p/28287

1 Like