Cassandra
  1. Cassandra
  2. CASSANDRA-1068

Create a mini admin (JMX) interface per each cassandra node

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Fix Version/s: 0.7 beta 1
    • Component/s: None
    • Labels:
      None

      Description

      I've implemented a simple bridge using mx4j that exposes all JMX attributes through an http interface.
      This is enabled per node. Simple exposes the existing jmx attributes (and actions) to a browser.
      To use it you'll need to add mx4j-tools.jar to your classpath (add it to lib). If mx4j isn't in the classpath the code will skipped and this is not considered as an error, this is normal behavior. We expect users that need that interface to simply copy mx4j-tools.jar into their lib folder and restart the host.

      Patch will be attached in a moment.

      The default port is 8081. To override that provide e.g. -Dmx4jport=8082
      The default listen address is 0.0.0.0. To override that provide -Dmx4jaddress=127.0.0.1

      1. CASSANDRA-1068.patch
        5 kB
        Ran Tavory
      2. MX4J - Agent View.png
        628 kB
        Ran Tavory
      3. MX4J - MBean View-1.png
        227 kB
        Ran Tavory
      4. MX4J - MBean View.png
        82 kB
        Ran Tavory

        Activity

        Hide
        Ran Tavory added a comment -

        somewhat remotely related is this https://issues.apache.org/jira/browse/CASSANDRA-918

        Show
        Ran Tavory added a comment - somewhat remotely related is this https://issues.apache.org/jira/browse/CASSANDRA-918
        Hide
        Ran Tavory added a comment -

        Patch that implements conditional loading, if mx4j-tools.jar is in the classpath

        Show
        Ran Tavory added a comment - Patch that implements conditional loading, if mx4j-tools.jar is in the classpath
        Hide
        Ran Tavory added a comment -

        patch is ready for review

        Show
        Ran Tavory added a comment - patch is ready for review
        Hide
        Ran Tavory added a comment -

        attached screenshot 1

        Show
        Ran Tavory added a comment - attached screenshot 1
        Hide
        Ran Tavory added a comment -

        attaching a few more screenshots

        Show
        Ran Tavory added a comment - attaching a few more screenshots
        Hide
        Gary Dusbabek added a comment -

        +1.

        I changed getAddress() to prefer FBUtilities.getLocalAddress instead of 0.0.0.0.

        Show
        Gary Dusbabek added a comment - +1. I changed getAddress() to prefer FBUtilities.getLocalAddress instead of 0.0.0.0.
        Hide
        Gary Dusbabek added a comment -

        Thanks Ran!

        Show
        Gary Dusbabek added a comment - Thanks Ran!
        Hide
        Masood Mortazavi added a comment -

        In the description it says: . . .

        To use it you'll need to add mx4j-tools.jar to your classpath (add it to lib). If mx4j isn't in the classpath the code will skipped and this is not considered as an error, this is normal behavior. We expect users that need that interface to simply copy mx4j-tools.jar into their lib folder and restart the host.

        . . . Where are the users supposed to copy it from?

        Would the nodetool still work without this jar file in place as suggested?

        Show
        Masood Mortazavi added a comment - In the description it says: . . . To use it you'll need to add mx4j-tools.jar to your classpath (add it to lib). If mx4j isn't in the classpath the code will skipped and this is not considered as an error, this is normal behavior. We expect users that need that interface to simply copy mx4j-tools.jar into their lib folder and restart the host. . . . Where are the users supposed to copy it from? Would the nodetool still work without this jar file in place as suggested?
        Hide
        Ran Tavory added a comment -

        I added a section about mx4j at the bottom of this page http://wiki.apache.org/cassandra/Operations

        Show
        Ran Tavory added a comment - I added a section about mx4j at the bottom of this page http://wiki.apache.org/cassandra/Operations

          People

          • Assignee:
            Ran Tavory
            Reporter:
            Ran Tavory
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development