You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Jai Bheemsen Rao Dhanwada <ja...@gmail.com> on 2020/03/30 18:55:05 UTC

JMX mBean for gossipinfo/status

Hello All,

I am trying to find the mBean that gives information for "node tool
gossipinfo" or "nodetool status".
Back ground: I am trying find the available Datacenters in my Cassandra
cluster using the JMX mBeans.

Thanks in advance.

Re: JMX mBean for gossipinfo/status

Posted by Jai Bheemsen Rao Dhanwada <ja...@gmail.com>.
I tried looking at the org.apache.cassandra.db:type=StorageService mBean,
but don't see an option for the datacenter

On Mon, Mar 30, 2020 at 11:55 AM Jai Bheemsen Rao Dhanwada <
jaibheemsen@gmail.com> wrote:

> Hello All,
>
> I am trying to find the mBean that gives information for "node tool
> gossipinfo" or "nodetool status".
> Back ground: I am trying find the available Datacenters in my Cassandra
> cluster using the JMX mBeans.
>
> Thanks in advance.
>

Re: JMX mBean for gossipinfo/status

Posted by Jai Bheemsen Rao Dhanwada <ja...@gmail.com>.
Thanks for explanation, this helps.

On Mon, Mar 30, 2020 at 12:15 PM J.B. Langston <jb...@datastax.com>
wrote:

> Each nodetool subcommand is defined here.
> https://github.com/apache/cassandra/tree/trunk/src/java/org/apache/cassandra/tools/nodetool
>
> Each command will call back into the NodeProbe object (sometimes
> indirectly), which makes the actual JMX calls:
> https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/tools/NodeProbe.java
>
> Often times one nodetool command may call multiple JMX methods or read
> multiple JMX properties. My general approach is to start from the command
> ad follow all the method calls until I find the name of an MBean (using an
> IDE can be helpful for this).
>
> In the case of status, it is getting the DC info from
> org.apache.cassandra.db:type=EndpointSnitchInfo, which is accessed from
> NodeProbe.getEndpointSnitchInfoProxy().
>
> In the case of gossipinfo, it's from org.apache.cassandra.net:
> type=FailureDetector.
>
> On Mon, Mar 30, 2020 at 1:55 PM Jai Bheemsen Rao Dhanwada <
> jaibheemsen@gmail.com> wrote:
>
>> Hello All,
>>
>> I am trying to find the mBean that gives information for "node tool
>> gossipinfo" or "nodetool status".
>> Back ground: I am trying find the available Datacenters in my Cassandra
>> cluster using the JMX mBeans.
>>
>> Thanks in advance.
>>
>

Re: JMX mBean for gossipinfo/status

Posted by "J.B. Langston" <jb...@datastax.com>.
Each nodetool subcommand is defined here.
https://github.com/apache/cassandra/tree/trunk/src/java/org/apache/cassandra/tools/nodetool

Each command will call back into the NodeProbe object (sometimes
indirectly), which makes the actual JMX calls:
https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/tools/NodeProbe.java

Often times one nodetool command may call multiple JMX methods or read
multiple JMX properties. My general approach is to start from the command
ad follow all the method calls until I find the name of an MBean (using an
IDE can be helpful for this).

In the case of status, it is getting the DC info from
org.apache.cassandra.db:type=EndpointSnitchInfo, which is accessed from
NodeProbe.getEndpointSnitchInfoProxy().

In the case of gossipinfo, it's from org.apache.cassandra.net:
type=FailureDetector.

On Mon, Mar 30, 2020 at 1:55 PM Jai Bheemsen Rao Dhanwada <
jaibheemsen@gmail.com> wrote:

> Hello All,
>
> I am trying to find the mBean that gives information for "node tool
> gossipinfo" or "nodetool status".
> Back ground: I am trying find the available Datacenters in my Cassandra
> cluster using the JMX mBeans.
>
> Thanks in advance.
>