Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

API + how the get status summary for all services in ambari cluster

Solved Go to solution

API + how the get status summary for all services in ambari cluster

how the get status summary details for services in ambari cluster by rest API commands


example for kafka service ( kafka broker summary )

47420-capture5.png

let take the HDFS service as example

HDFS include the following sub application/services

so how to get status started/stop for "Standby NameNode" , ZKFailoverController , Active NameNode , etc

the same for all rest services

47419-capture4.png

47418-capture4.png

47417-capture3.png

47416-capture2.png

47415-capture1.png

Michael-Bronson
1 ACCEPTED SOLUTION

Accepted Solutions

Re: API + how the get status summary for all services in ambari cluster

New Contributor
@Michael Bronson

This API will get you status of all components on all hosts in your cluster

curl -u {ambari_username}:{ambari_password} -H "X-Requested-By:ambari" -i GET http://localhost:8080/api/v1/clusters/cl1/components?fields=host_components/HostRoles/state

And if you need to find the status of individual component e.g for datanode;

curl -u {ambari_username}:{ambari_password} -H "X-Requested-By:ambari" -i GET http://localhost:8080/api/v1/clusters/cl1/components/DATANODE?fields=host_components/HostRoles/state

Hope this helps!

2 REPLIES 2
Highlighted

Re: API + how the get status summary for all services in ambari cluster

New Contributor

Re: API + how the get status summary for all services in ambari cluster

New Contributor
@Michael Bronson

This API will get you status of all components on all hosts in your cluster

curl -u {ambari_username}:{ambari_password} -H "X-Requested-By:ambari" -i GET http://localhost:8080/api/v1/clusters/cl1/components?fields=host_components/HostRoles/state

And if you need to find the status of individual component e.g for datanode;

curl -u {ambari_username}:{ambari_password} -H "X-Requested-By:ambari" -i GET http://localhost:8080/api/v1/clusters/cl1/components/DATANODE?fields=host_components/HostRoles/state

Hope this helps!

Don't have an account?
Coming from Hortonworks? Activate your account here