You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Otis Gospodnetic <ot...@gmail.com> on 2014/11/12 22:39:41 UTC

Programmatic ZooKeeper version detection/extraction?

Hi,

Is there a way to detect which version of ZooKeeper one is running?
Is there an API for that, or a constant with this value, or maybe an MBean
or some other way to get to this info?

Thanks,
Otis
--
Monitoring * Alerting * Anomaly Detection * Centralized Log Management
Solr & Elasticsearch Support * http://sematext.com/

Re: Programmatic ZooKeeper version detection/extraction?

Posted by "Jürgen Wagner (DVT)" <ju...@devoteam.com>.
Hello Otis,
  in fact, I try to avoid JMX altogether :-) You will find that the
ZooKeeperServer MBean also provides a getVersion() method.

||||*||*||As for monitoring, we prefer to instrument Zookeeper with an
additional thread that periodically reports into our monitoring
framework. This way, we don't have to rely on the slightly strange
security models of JMX, but can handle any protocol necessary. It also
does not require JMX ports to be exposed through firewalls shielding the
Zookeeper ensemble from the rest of the world - including the monitoring
sites. JMX would only be used for ad-hoc inspections of run-time
parameters. Well, I guess it is a somewhat religious issue whether to
use JMX or not.

Best regards,
--Jürgen

On 12.11.2014 23:49, Otis Gospodnetic wrote:
> Thanks Jürgen!
>
> We'll make use of that in SPM <http://sematext.com/spm/>, thanks.
>
> I see Ani (hi!) replied with info about 4 char commands, which we could
> also use, but if you think about apps that already connect to ZK JMX (think
> of this as an API) to gather info about ZK, it might be cleaner to expose
> the version via JMX, too, so they don't have to have logic/code for
> connecting to ZK JMX to get things like metrics, and then also connect
> another way to run this one ZK command that grabs the version info.
>
> Otis
> --
> Monitoring * Alerting * Anomaly Detection * Centralized Log Management
> Solr & Elasticsearch Support * http://sematext.com/
>
>
> On Wed, Nov 12, 2014 at 5:01 PM, "Jürgen Wagner (DVT)" <
> juergen.wagner@devoteam.com> wrote:
>
>>  Hello Otis,
>>   you can try this via
>>
>> echo mntr | nc localhost 2181
>>
>> or within a Java program including the Zookeeper libraries, there is
>>
>> String org.apache.zookeeper.Version.getVersion()
>>
>> and some other version-relevated methods in this class.
>>
>> Best regards,
>> --Jürgen
>>
>>
>>


-- 

Mit freundlichen Grüßen/Kind regards/Cordialement vôtre/Atentamente/С
уважением
*i.A. Jürgen Wagner*
Head of Competence Center "Intelligence"
& Senior Cloud Consultant

Devoteam GmbH, Industriestr. 3, 70565 Stuttgart, Germany
Phone: +49 6151 868-8725, Fax: +49 711 13353-53, Mobile: +49 171 864 1543
E-Mail: juergen.wagner@devoteam.com
<ma...@devoteam.com>, URL: www.devoteam.de
<http://www.devoteam.de/>

------------------------------------------------------------------------
Managing Board: Jürgen Hatzipantelis (CEO)
Address of Record: 64331 Weiterstadt, Germany; Commercial Register:
Amtsgericht Darmstadt HRB 6450; Tax Number: DE 172 993 071



Re: Programmatic ZooKeeper version detection/extraction?

Posted by Otis Gospodnetic <ot...@gmail.com>.
Thanks Jürgen!

We'll make use of that in SPM <http://sematext.com/spm/>, thanks.

I see Ani (hi!) replied with info about 4 char commands, which we could
also use, but if you think about apps that already connect to ZK JMX (think
of this as an API) to gather info about ZK, it might be cleaner to expose
the version via JMX, too, so they don't have to have logic/code for
connecting to ZK JMX to get things like metrics, and then also connect
another way to run this one ZK command that grabs the version info.

Otis
--
Monitoring * Alerting * Anomaly Detection * Centralized Log Management
Solr & Elasticsearch Support * http://sematext.com/


On Wed, Nov 12, 2014 at 5:01 PM, "Jürgen Wagner (DVT)" <
juergen.wagner@devoteam.com> wrote:

>  Hello Otis,
>   you can try this via
>
> echo mntr | nc localhost 2181
>
> or within a Java program including the Zookeeper libraries, there is
>
> String org.apache.zookeeper.Version.getVersion()
>
> and some other version-relevated methods in this class.
>
> Best regards,
> --Jürgen
>
>
> On 12.11.2014 22:39, Otis Gospodnetic wrote:
>
> Hi,
>
> Is there a way to detect which version of ZooKeeper one is running?
> Is there an API for that, or a constant with this value, or maybe an MBean
> or some other way to get to this info?
>
> Thanks,
> Otis
> --
> Monitoring * Alerting * Anomaly Detection * Centralized Log Management
> Solr & Elasticsearch Support * http://sematext.com/
>
>
>
> --
>
> Mit freundlichen Grüßen/Kind regards/Cordialement vôtre/Atentamente/С
> уважением
> *i.A. Jürgen Wagner*
> Head of Competence Center "Intelligence"
> & Senior Cloud Consultant
>
> Devoteam GmbH, Industriestr. 3, 70565 Stuttgart, Germany
> Phone: +49 6151 868-8725, Fax: +49 711 13353-53, Mobile: +49 171 864 1543
> E-Mail: juergen.wagner@devoteam.com, URL: www.devoteam.de
> ------------------------------
> Managing Board: Jürgen Hatzipantelis (CEO)
> Address of Record: 64331 Weiterstadt, Germany; Commercial Register:
> Amtsgericht Darmstadt HRB 6450; Tax Number: DE 172 993 071
>
>
>

Re: Programmatic ZooKeeper version detection/extraction?

Posted by Anirudha Jadhav <an...@gmail.com>.
Most of the zk specific info can be acquired by using the zk 4 character commands. 
http://phunt1.wordpress.com/2010/03/29/monitoring-zookeeper-3-3-even-more-cussin/

Ani

> On Nov 12, 2014, at 5:01 PM, Jürgen Wagner (DVT) <ju...@devoteam.com> wrote:
> 
> Hello Otis,
>   you can try this via
> 
> echo mntr | nc localhost 2181
> 
> or within a Java program including the Zookeeper libraries, there is
> 
> String org.apache.zookeeper.Version.getVersion()
> 
> and some other version-relevated methods in this class.
> 
> Best regards,
> --Jürgen
> 
>> On 12.11.2014 22:39, Otis Gospodnetic wrote:
>> Hi,
>> 
>> Is there a way to detect which version of ZooKeeper one is running?
>> Is there an API for that, or a constant with this value, or maybe an MBean
>> or some other way to get to this info?
>> 
>> Thanks,
>> Otis
>> --
>> Monitoring * Alerting * Anomaly Detection * Centralized Log Management
>> Solr & Elasticsearch Support * http://sematext.com/
>> 
> 
> 
> -- 
> Mit freundlichen Grüßen/Kind regards/Cordialement vôtre/Atentamente/С уважением
> i.A. Jürgen Wagner
> Head of Competence Center "Intelligence"
> & Senior Cloud Consultant
> 
> Devoteam GmbH, Industriestr. 3, 70565 Stuttgart, Germany
> Phone: +49 6151 868-8725, Fax: +49 711 13353-53, Mobile: +49 171 864 1543
> E-Mail: juergen.wagner@devoteam.com, URL: www.devoteam.de
> 
> Managing Board: Jürgen Hatzipantelis (CEO)
> Address of Record: 64331 Weiterstadt, Germany; Commercial Register: Amtsgericht Darmstadt HRB 6450; Tax Number: DE 172 993 071
> 

Re: Programmatic ZooKeeper version detection/extraction?

Posted by "Jürgen Wagner (DVT)" <ju...@devoteam.com>.
Hello Otis,
  you can try this via

echo mntr | nc localhost 2181

or within a Java program including the Zookeeper libraries, there is

String org.apache.zookeeper.Version.getVersion()

and some other version-relevated methods in this class.

Best regards,
--Jürgen

On 12.11.2014 22:39, Otis Gospodnetic wrote:
> Hi,
>
> Is there a way to detect which version of ZooKeeper one is running?
> Is there an API for that, or a constant with this value, or maybe an MBean
> or some other way to get to this info?
>
> Thanks,
> Otis
> --
> Monitoring * Alerting * Anomaly Detection * Centralized Log Management
> Solr & Elasticsearch Support * http://sematext.com/
>


-- 

Mit freundlichen Grüßen/Kind regards/Cordialement vôtre/Atentamente/С
уважением
*i.A. Jürgen Wagner*
Head of Competence Center "Intelligence"
& Senior Cloud Consultant

Devoteam GmbH, Industriestr. 3, 70565 Stuttgart, Germany
Phone: +49 6151 868-8725, Fax: +49 711 13353-53, Mobile: +49 171 864 1543
E-Mail: juergen.wagner@devoteam.com
<ma...@devoteam.com>, URL: www.devoteam.de
<http://www.devoteam.de/>

------------------------------------------------------------------------
Managing Board: Jürgen Hatzipantelis (CEO)
Address of Record: 64331 Weiterstadt, Germany; Commercial Register:
Amtsgericht Darmstadt HRB 6450; Tax Number: DE 172 993 071