Skip to end of metadata
Go to start of metadata

Aggregates JMX information from local java processes into a REST service and offers configuration generation for nagios.



Autodetects running processes and uses auto discovery plugins to detect what resources are available in these processes.

Currently autodection supports:

  • ActiveMQ: Broker, Queues, Topics
  • Camel: Context, Routes
  • CXF: Endpoints
  • Karaf: Features
  • Tomcat7: WebModules

Simple XML Output

Plugins extract selected mbeans into an easy to understand structure.

<?xml version="1.0" encoding="UTF-8"?>
<ns2:host xmlns:ns2="">
  <process name="ActiveMQ" href="...">
    <instance type="ActiveMQ" name="localhost">
      <resource name="localhost" oName="..." href="..."/>
      <resources name="Queue">
        <resource name="example.A" oName="..." href="...">
          <attr name="ConsumerCount" value="1" href="..."/>
          <attr name="QueueSize" value="99" href="..."/>

Fetching any mbean attribute

Besides the listed beans and attributes JMXAggregator allows to read any mbean and attribute with simple types.

The URL below fetches the current queue size of the queue myqueue from the ActiveMQ process.



The administrator can provide a xsl style sheet to filter the for the attributes he wants to have in the nagios config. The line below selects the failed and completed exchanges from camel routes

 <xsl:template match="attr[../../@name='Route' and (@name='ExchangesFailed' or @name='ExchangesCompleted')]"><xsl:copy-of select="."/></xsl:template>

Configuration generation

The filtered xml is used to generate nagios configs. These are available from the rest service and can be copied to nagios using wget:

> wget -Omyhost.cfg localhost:8080/cxf/jmx-aggregator/process/all/config
> /etc/init.d/nagios3 restart

The nagios configs contain one service config for each attribute:

define service {
	use generic-service
	host_name localhost
	service_description Camel-sopwin58/181-camel-3-Route-route1-ExchangesFailed
	check_command check_http_metric!0!0!http://localhost:8080/cxf/jmx-aggregator/process/karaf-root



Twitter: @schneider_chris

Github: cschneider



Popular Labels

My colleagues at Talend

Talend Community Coders

  • No labels