Thanks Yusaku !!
This was very precise answer which I was looking out for as a solution.

It worked for me.

Regards,
Pratik Gadiya
From: Yusaku Sako [mailto:[email protected]]
Sent: Monday, April 20, 2015 10:48 AM
To: [email protected]
Subject: Re: Ambari Cluster Monitoring

Hi Pratik,

> I have provisioned a cluster using Ambari Rest API's and I want to monitor 
> the progress of the cluster deployment.

Are you using the Blueprint API?
If so, you can poll on the request ID href that is returned from the Blueprint 
cluster deployment call and check on the progress in terms of percentage (and 
whether it completed successfully or not).

https://cwiki.apache.org/confluence/display/AMBARI/Blueprints
The response shown at the bottom of the page is the href I mentioned to check 
on the deployment status.

Yusaku

From: Pratik Gadiya 
<[email protected]<mailto:[email protected]>>
Reply-To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Date: Sunday, April 19, 2015 10:38 AM
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: Ambari Cluster Monitoring


Hi All,

I have provisioned a cluster using Ambari Rest API's and I want to monitor the 
progress of the cluster deployment.
Basically, I want  to check if the deployment was successful and all the 
services are up and running.

One way could be to check the state of the services, if all the services are in 
STARTED state then we can confirm that the deployment is COMPLETED and 
successful.

$ curl -X GET -H "X-Requested-By: ambari" -u admin:admin 
https://<ambari_server>/api/v1/clusters/<cluster_name>/services/?fields=ServiceInfo/state<https://%3cambari_server%3e/api/v1/clusters/%3ccluster_name%3e/services/?fields=ServiceInfo/state>

Please let me know if there is any other way to check the same.

NOTE: Instead of pointing to a general link which describes all the REST calls 
for Ambari, I would appreciate if someone could clarify if there is any other 
approach with an example or command

Regards,
Pratik Gadiya

DISCLAIMER ========== This e-mail may contain privileged and confidential 
information which is the property of Persistent Systems Ltd. It is intended 
only for the use of the individual or entity to which it is addressed. If you 
are not the intended recipient, you are not authorized to read, retain, copy, 
print, distribute or use this message. If you have received this communication 
in error, please notify the sender and delete all copies of this message. 
Persistent Systems Ltd. does not accept any liability for virus infected mails.

DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the 
property of Persistent Systems Ltd. It is intended only for the use of the 
individual or entity to which it is addressed. If you are not the intended 
recipient, you are not authorized to read, retain, copy, print, distribute or 
use this message. If you have received this communication in error, please 
notify the sender and delete all copies of this message. Persistent Systems 
Ltd. does not accept any liability for virus infected mails.

Reply via email to