Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

how to find number of CPU core on datanode machine by ambari rest API

avatar

Hi all

 

 

I am running the following ambari API in order to find the CPU count on data node machine

 

 

curl -H "X-Requested-By: ambari" -u admin:admin -X GET http://master:8080/api/v1/clusters/hdp_test/hosts?fields=Hosts/host_name,Hosts/public_host_name,Host...

 

we get the error about:

 

 

{

  "status" : 400,

  "message" : "The properties [host_compnents/HostRoles/component_name] specified in the request or predicate are not supported for the resource type Host."

 

 

The target is to find the number of cpu on data node machine as we can do it on datanode linux machine

 

nproc

16

Michael-Bronson
1 ACCEPTED SOLUTION

avatar

 

the API is


curl -sH "X-Requested-By: ambari" -u admin:admin http://AMBARI_SERVER_FQDN:8080/api/v1/hosts/DATA_NODE_FQDN | grep cpu

Michael-Bronson

View solution in original post

1 REPLY 1

avatar

 

the API is


curl -sH "X-Requested-By: ambari" -u admin:admin http://AMBARI_SERVER_FQDN:8080/api/v1/hosts/DATA_NODE_FQDN | grep cpu

Michael-Bronson