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

ambari start and stop service monitoring


ambari start and stop service monitoring

I wanted to create a script by using that I can check which service is being stopped or started at what time and from which IP the action (start and stop has been executed ) . is there some rest api to achieve the same ?


Re: ambari start and stop service monitoring

Expert Contributor

Yes, Ambari has a REST API. Documented here:

However I don't think it has exactly what you are looking for - you will not be able to retrieve the IP address of the user performing any actions. It is also a polling mechanism rather than a publish/subscribe mechanism, so you will have to ask it what the state of a particular service is to receive an answer. This is in contrast to your ask, which is to be notified when a service changes state.

You can probably accomplish what you are asking for through Ambari Alerts paired with the Ambari REST API.

Here are some examples of common actions:

Here's another example, using the REST API with Ambari Alerts:

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