If you want to make sure that if any service component goes down abruptly (without manual effort or graceful stop) then it should get automatically restarted in crash or abnormal termination scenario. Then in that case it is best to enable the Ambari Auto Start feature for those components:
Regarding getting the Alerts using API Call. you can use the following kind of API call to fetch all the CRITICAL alerts. Then based on the host and component and the message you can proceed with checking.
# curl -u admin:admin -H "X-Requested-By:ambari" -X GET "http://$AMBARI_HOST:8080/api/v1/clusters/$CLUSTER_NAME/alerts?fields=*&Alert/state=CRITICAL&Alert/maintenance_state=OFF"