Querying for /master/state.json will provide you with the master. So you
can query any one of the hosts in your list of potential masters, extract
the master information from that and then hit your master on the endpoint
you're interested in.

Philippe

On Tue, Jul 7, 2015 at 9:02 AM, Donald Laidlaw <donlaid...@me.com> wrote:

> Has anyone ever developed Java code to detect the mesos masters and
> leader, given a zookeeper connection?
>
> The reason I ask is because I would like to monitor mesos to report
> various metrics reported by the master. This requires detecting and
> tracking the leading master to query its /metrics/snapshot REST endpoint.
>
> Thanks,
> -Don

Reply via email to