Support Questions
Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

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 ?


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: