Hi, I am trying to write a service check for a service in Ambari. However, when I hit "Run Service Check," it is run on the master node as well as the client nodes. Is there a good way to have only the master node run it?
Service check basically does the health check of the whole service, for example with HDFS its
namenode(master) and Datanode(slave).
Ambari Config groups could help here.
Hope this helps.
@Pei Heng Zeng To identify which node is running master service, log on to Ambari and then select service from Left panel (For eg HDFS) then you would see components of HDFS in main panel like Namenode, Namenode HA, DataNode.
If you click on master service name (for eg : Namenode) , it will take you to the host page on which namenode is running and you can IPadress/FQDN of the node.
You can find via AMbari API like this :http://AMBARI_SERVER:8080/api/v1/clusters/CLUSTER_NAME/services/HDFS