You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Benjamin Jaton <be...@gmail.com> on 2014/08/21 18:16:55 UTC

ZooKeeper monitoring question

Hello,

Let's say I have a 3 nodes ensemble, but 2 of them can't connect to each
other (link down).

Is there a way for me to ask about the status of each connection? (1-2,
2-3, 1-3)

>From a client perspective it looks exactly the same so I would like to know
if the cluster is happy and everybody can talk to everybody, or if there is
a link down somewhere.

Thanks,
Ben

Re: ZooKeeper monitoring question

Posted by Benjamin Jaton <be...@gmail.com>.
Jordan > The 'srvr' command gives the number of client connections on each
server whereas I want a way to have the status of the connection between
the ZK servers themselves.

Alvaro > Using jconsole I think I can get some information through:
org.apache.ZooKeeperService > ReplicatedServer_id1 > replica.1 > Leader >
operation: followerInfo()

This operation is only available for the leader node, so I will only be
able to have part of the connections status in the ensemble, but it should
be enough for me for now.

The operation returns a String, is there any better way to parse it?
LearnerHandler Socket[addr=/10.11.12.210,port=51506,localport=2888]
tickOfLastAck:432 synced?:true queuedPacketLength:0
LearnerHandler Socket[addr=/10.11.0.80,port=60759,localport=2888]
tickOfLastAck:432 synced?:true queuedPacketLength:0

Thanks for your guidance,
Ben



On Thu, Aug 21, 2014 at 9:21 AM, Alvaro Gareppe <ag...@gmail.com> wrote:

> Take a look in JMX you probably see that with your jconsole (not 100% sure)
>
>
> On Thu, Aug 21, 2014 at 1:19 PM, Jordan Zimmerman <
> jordan@jordanzimmerman.com> wrote:
>
>> You can send a ‘srvr’ four-letter-word to each instance.
>>
>> -Jordan
>>
>>
>> From: Benjamin Jaton <be...@gmail.com>
>> Reply: user@zookeeper.apache.org <us...@zookeeper.apache.org>>
>> Date: August 21, 2014 at 11:17:24 AM
>> To: user@zookeeper.apache.org <us...@zookeeper.apache.org>>
>> Subject:  ZooKeeper monitoring question
>>
>> Hello,
>>
>> Let's say I have a 3 nodes ensemble, but 2 of them can't connect to each
>> other (link down).
>>
>> Is there a way for me to ask about the status of each connection? (1-2,
>> 2-3, 1-3)
>>
>> From a client perspective it looks exactly the same so I would like to
>> know
>> if the cluster is happy and everybody can talk to everybody, or if there
>> is
>> a link down somewhere.
>>
>> Thanks,
>> Ben
>>
>
>
>
> --
> Ing. Alvaro Gareppe
> agareppe@gmail.com
>

Re: ZooKeeper monitoring question

Posted by Alvaro Gareppe <ag...@gmail.com>.
Take a look in JMX you probably see that with your jconsole (not 100% sure)


On Thu, Aug 21, 2014 at 1:19 PM, Jordan Zimmerman <
jordan@jordanzimmerman.com> wrote:

> You can send a ‘srvr’ four-letter-word to each instance.
>
> -Jordan
>
>
> From: Benjamin Jaton <be...@gmail.com>
> Reply: user@zookeeper.apache.org <us...@zookeeper.apache.org>>
> Date: August 21, 2014 at 11:17:24 AM
> To: user@zookeeper.apache.org <us...@zookeeper.apache.org>>
> Subject:  ZooKeeper monitoring question
>
> Hello,
>
> Let's say I have a 3 nodes ensemble, but 2 of them can't connect to each
> other (link down).
>
> Is there a way for me to ask about the status of each connection? (1-2,
> 2-3, 1-3)
>
> From a client perspective it looks exactly the same so I would like to know
> if the cluster is happy and everybody can talk to everybody, or if there is
> a link down somewhere.
>
> Thanks,
> Ben
>



-- 
Ing. Alvaro Gareppe
agareppe@gmail.com

Re: ZooKeeper monitoring question

Posted by Jordan Zimmerman <jo...@jordanzimmerman.com>.
You can send a ‘srvr’ four-letter-word to each instance.

-Jordan


From: Benjamin Jaton <be...@gmail.com>
Reply: user@zookeeper.apache.org <us...@zookeeper.apache.org>>
Date: August 21, 2014 at 11:17:24 AM
To: user@zookeeper.apache.org <us...@zookeeper.apache.org>>
Subject:  ZooKeeper monitoring question  

Hello,  

Let's say I have a 3 nodes ensemble, but 2 of them can't connect to each  
other (link down).  

Is there a way for me to ask about the status of each connection? (1-2,  
2-3, 1-3)  

From a client perspective it looks exactly the same so I would like to know  
if the cluster is happy and everybody can talk to everybody, or if there is  
a link down somewhere.  

Thanks,  
Ben