thanks, Dejan! putting my broker's name in your example query (in place of "localhost") worked. i'll followup a bit more once we actually start monitoring.
Joe Niski IS Development | NWEA PHONE 503.212.3382 | FAX 503.639.7873 NWEA.ORG<3D%22http://www.nwea.org/%22> | Partnering to Help All Kids Learn On 10/25/2010 02:12 AM, Dejan Bosanac wrote: Hi Joe, you should use something like this for the objectName org.apache.activemq:BrokerName=localhost,Type=Broker You can see those names in JConsole (when positioning on the appropriate object). BTW. I didn't use Nagios with ActiveMQ, would love to hear your experience. Cheers -- Dejan Bosanac - http://twitter.com/dejanb Open Source Integration - http://fusesource.com/ ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net On Sat, Oct 23, 2010 at 1:44 AM, Joe Niski <joe.ni...@nwea.org><mailto:joe.ni...@nwea.org> wrote: > i'm trying to write jmx queries for the nagios-jmx-plugin > (http://snippets.syabru.ch/nagios-jmx-plugin) v 1.2.0, so our system > engineers can set up automated alerts in our Nagios infrastructure. i'm using > the check_jmx script that comes with the plugin. > > i'm not getting very far with querying for ActiveMQ objects, and there aren't > many examples out there. > > i can get JVM info easily with this query: > > check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.22.149:1098/jmxrmi -O > "java.lang:type=Memory" -A HeapMemoryUsage -K used > > i can also probe the HotSpot compiler like this (although the plugin can't > parse the return type): > > check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.22.149:1098/jmxrmi -O > "com.sun.management:type=HotSpotDiagnostic" -A DiagnosticOptions > > if i connect to ActiveMQ's JMX port with Jconsole, i can browse the hierarchy > of managed objects, but i can't seem to get the query right. When i try: > > check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.22.149:1098/jmxrmi -O > "org.apache.activemq:type=Broker" -A MemoryPercentUsage > > i get the error "objectName not found [org.apache.activemq:type=Broker]" > > i simply want to read the attributes on the Broker that shows up in jconsole > as a managed bean. > > Has anyone else used the nagios-jmx-plugin with ActiveMQ, or can anyone offer > tips for constructing JMX queries? > > thanks in advance, > Joe > > -- > > Joe Niski > IS Development | NWEA > > PHONE 503.212.3382 | FAX 503.639.7873 > > NWEA.ORG<3D%22http://www.nwea.org/%22> | Partnering to Help All Kids Learn >