Created on 03-28-2018 07:13 PM - edited 08-17-2019 11:04 PM
what is the API to stop the Metrics Collector ?
I ask this API because the API that should to the ambari metrics some times missed to stop the Metrics Collector
Created 03-28-2018 08:11 PM
You will need first to identify the Ambari Service and Component name to be used in the API, this for sure will also bring down the Metrics collector
curl -u admin:admin get http://<AMBARI_SERVER>:8080/api/v1/clusters/<CLUSTER_NAME>/services
Replace the particular service below <Service_name> with the previous output eg AMBARI_METRICS
Stop AMBARI_METRICS
curl -u admin:admin -H 'X-Requested-By: ambari' -X PUT -d '{"RequestInfo": {"context" :"Stop service "}, "Body": {"ServiceInfo": {"state": "INSTALLED"}}}' http://<AMBARI_SERVER_HOSTNAME>:8080/api/v1/clusters/<CLUSTER_NAME>/services/<Service_name>;
The service will stop check the Ambari UI
Hope that helps!!
Created 03-28-2018 08:11 PM
You will need first to identify the Ambari Service and Component name to be used in the API, this for sure will also bring down the Metrics collector
curl -u admin:admin get http://<AMBARI_SERVER>:8080/api/v1/clusters/<CLUSTER_NAME>/services
Replace the particular service below <Service_name> with the previous output eg AMBARI_METRICS
Stop AMBARI_METRICS
curl -u admin:admin -H 'X-Requested-By: ambari' -X PUT -d '{"RequestInfo": {"context" :"Stop service "}, "Body": {"ServiceInfo": {"state": "INSTALLED"}}}' http://<AMBARI_SERVER_HOSTNAME>:8080/api/v1/clusters/<CLUSTER_NAME>/services/<Service_name>;
The service will stop check the Ambari UI
Hope that helps!!