Oh I was thinking of StorageProxy. StorageService should exist you
just have the path wrong. It should be
"org.apache.cassandra.db:type=StorageService".(you had
org.apache.cassandra.service) JMX should be lightweight enough for
this.

On Wed, Nov 23, 2011 at 9:06 AM, David McNelis
<dmcne...@agentisenergy.com> wrote:
> But if the StorageService bean is only created once a transaction has
> occurred, is there another location, i.e. the CommitLog, that I could check
> just to see if the node is 'live'.  Or do you think I'd be better served
> trying to execute something on the node (i.e. read a record using Hector)?
> Ideally this would be as low cost an operation on the Cassandra node as
> possible, since it is just monitoring statuses (stati?).
>
> On Tue, Nov 22, 2011 at 1:15 PM, Nick Bailey <n...@datastax.com> wrote:
>>
>> There are quite a few attributes in the
>> org.apace.cassandra.db.StorageServiceMBean that could serve that
>> purpose.
>>
>> Initialized, RPCServerRunning, OperationMode, Joined, and perhaps others
>>
>> Note that some of those may not exist depending on your version of
>> cassandra, pick one appropriate for your version.
>>
>> On Tue, Nov 22, 2011 at 1:02 PM, David McNelis
>> <dmcne...@agentisenergy.com> wrote:
>> > Would there be a better bean to look at to ascertain the status that
>> > would
>> > be created when the server starts up?
>> >
>> > On Tue, Nov 22, 2011 at 11:47 AM, Nick Bailey <n...@datastax.com> wrote:
>> >>
>> >> The StorageServiceMBean is only created once some reads/writes
>> >> actually go to that node. Do a couple reads/writes from the CLI and
>> >> you should see the MBean afterwards.
>> >>
>> >> This also means your monitoring application should handle this error
>> >> in the case of nodes restarting.
>> >>
>> >> On Tue, Nov 22, 2011 at 7:51 AM, David McNelis
>> >> <dmcne...@agentisenergy.com> wrote:
>> >> > Good morning,
>> >> > I'm trying to set up a simple monitoring application (that is a
>> >> > plugin
>> >> > to
>> >> > Nagios), code can be found
>> >> >
>> >> >
>> >> > here: https://github.com/so-net-developer/Cassandra/blob/master/nagios/CheckNode.java
>> >> > However, when I try to run the CheckNode.java program I get an error
>> >> > that:
>> >> > Exception in thread "main"
>> >> > javax.management.InstanceNotFoundException:
>> >> > org.apache.cassandra.service:type=StorageService
>> >> > According to the docs on Cassandra and JMX this should be a valid
>> >> > Instance
>> >> > to create.  I've tried running this from both on the cassandra node
>> >> > and
>> >> > remotely, with no difference in outcome.
>> >> > I don't know if it matters, but these are the domains listed as
>> >> > available
>> >> > when I make a JMX getDomains call:
>> >> > org.apache.cassandra.internal
>> >> > JMImplementation
>> >> > com.sun.management
>> >> > org.apache.cassandra.request
>> >> > org.apache.cassandra.net
>> >> > java.lang
>> >> > java.util.logging
>> >> > org.apache.cassandra.db
>> >> > Because I get a  response when iterating over
>> >> > MBeanServerConection.getDomains():
>> >> > JMXConnector connector = JMXConnectorFactory.connect(new
>> >> > JMXServiceURL(JMXURL));
>> >> > MBeanServerConnection connection =
>> >> > connector.getMBeanServerConnection();
>> >> > for(String d : connection.getDomains())
>> >> >      System.out.println(d);
>> >> > I am disinclined to think its an issue with not being able to connect
>> >> > to
>> >> > JMX
>> >> > in general.
>> >> > --
>> >> > David McNelis
>> >> > Lead Software Engineer
>> >> > Agentis Energy
>> >> > www.agentisenergy.com
>> >> > c: 219.384.5143
>> >> > A Smart Grid technology company focused on helping consumers of
>> >> > energy
>> >> > control an often under-managed resource.
>> >> >
>> >> >
>> >
>> >
>> >
>> > --
>> > David McNelis
>> > Lead Software Engineer
>> > Agentis Energy
>> > www.agentisenergy.com
>> > c: 219.384.5143
>> > A Smart Grid technology company focused on helping consumers of energy
>> > control an often under-managed resource.
>> >
>> >
>
>
>
> --
> David McNelis
> Lead Software Engineer
> Agentis Energy
> www.agentisenergy.com
> c: 219.384.5143
> A Smart Grid technology company focused on helping consumers of energy
> control an often under-managed resource.
>
>

Reply via email to