View Source

{section}
{column:width=75%}

h1. Monitoring the Petals SE ASE

{tip}In this version of the Petals ASE, the monitoring is based mainly on the ActiveMQ monitoring.{tip}

The following indicators are interesting:
* number of requests processed with fault in the persistence area: a fast increase of this value should show:
** the target service provider or its backend are overloaded or down,
** a DoD of the ASE service provider client
* number of retried requests: an increase of this value should show:
** the target service provider or its backend are overloaded or down,
** the ASE service provider client doesn't respect the SLA

{column}
{column:width=25%}
{panel:title=Table of contents}{toc}{panel}
{panel:title=Contributors}{contributors:order=name|mode=list}{panel}
{column}
{section}


h2. Monitoring with basic tools

{tip}The command-lines and configuration files mentionned in following sub-chapters are available on Ubuntu 11.10{tip}


h3. JVisualVM

As ActiveMQ is provided with a JMX API, it is very easy to connect the JVisualVM to the ActiveMQ's JVM. See [http://activemq.apache.org/jmx.html].
{info}Don't forget to install into JVisualVM its plugin *VisualVM-MBeans* previously.{info}

h3. Command line tools of ActiveMQ

ActiveMQ is provided with a command-line tools to get statistics: {{activemq-admin}}

For example, use the following command to get the number of the requests waiting to be sent to the target service provider:
{code}activemq-admin query --objname Type=Queue,Destination=testQueue --view QueueSize | grep QueueSize{code}

h2. Monitoring with Nagios

Several options are available to monitor ActiveMQ using Naggios:
* Integrating Munin with Naggios, sending messages from Munin to Naggios: [http://munin-monitoring.org/wiki/HowToContactNagios]
* Integrating Munin with Naggios, using Naggios active checks: [http://exchange.nagios.org/directory/Plugins/Uncategorized/Operating-Systems/Linux/check_munin_rrd/details]
* Integrating ActiveMQ with Naggios, using ActiveMQ's command-line tools: {color:#ff0000}{*}TODO{*}{color}
* Integrating ActiveMQ with Naggios, using ActiveMQ's JMX API: {color:#ff0000}{*}TODO{*}{color}


h2. Monitoring with Cacti

{tip}Solution based on an [article of R.I.Pienaar|http://www.devco.net/archives/2010/07/25/monitoring_activemq.php]

{tip}

h2. Monitoring with Munin

A plugin ActiveMQ for Munin exists: [http://munin-activemq.sourceforge.net]. It is very easy to install it on a Debian-based system using the Debian package. Don't forget to install Munin previously.
The downloaded package can be installed with the followinf command: {code}sudo dpkg -i munin-java-activemq-plugins_0.0.4_i386.deb{code}

h3. Pre-requisites

The plugin ActiveMQ for Munin requires a remote JMX connection to the ActiveMQ server, so you needs to configure your ActiveMQ to enable the JMX connector:

{code}<beans ... >
<broker xmlns="http://activemq.apache.org/schema/core" ... >
...
<managementContext>
<managementContext createConnector="true"/>
</managementContext>
...
</broker>
...
</beans>{code}

h3. Configuration

Edit the file {{/etc/munin/plugin-conf.d/activemq\_}} to add the queues to monitor in parameter {{env.DESTINATIONS}} of the section ?{{activemq\*}}. :

{code:none}
[activemq_*]
## The hostname to connect to.
## Default: localhost
#env.JMX_HOST localhost

## The port where the JMX server is listening
## Default: 1099
#env.JMX_PORT 1099

## The username required to authenticate to the JMX server.
## When enabling JMX for a plain ActiveMQ install, no authentication is needed.
## The default username for JMX run by ServiceMix is 'smx'
## Default:
#env.JMX_USER smx

## The password required to authenticate to the JMX server.
## The default password for JMX run by ServiceMix is 'smx'
## Default:
#env.JMX_PASS smx

## Space separated list of destinations to create graphs for.
## Default:
env.DESTINATIONS Queue:foo Queue:bar

## You can override certain configuration variables for specific plugins
#[activemq_traffic]
#env.DESTINATIONS Topic:MyTopic Queue:foo
{code}

h3. Graph samples


h4. Traffic sample

!munin-activemq-traffic.jpg|align=center!