For more details on running and configuring Apache ActiveMQ, see Talend ESB Infrastructure Services Configuration Guide.
The process is to start an Apache ActiveMQ standalone broker on the jolokia_host machine, and then monitor it on the Nagios machine. The Jolokia agent (JAR file) has been already integrated into the ActiveMQ distribution which is included in Talend ESB.
On the jolokia_host machine, we start the Apache ActiveMQ standalone broker which is to be monitored; in a command console:
cd <TalendRuntimePath>/activemq/bin/activemq console (Linux*)
cd <TalendRuntimePath>/activemq/bin/activemq (Windows)
The Apache ActiveMQ broker should now be running.
*Note the "console" option in Linux runs the broker in the foreground; the default is to run it in the background.
You can view this using the Web Console at
http://localhost:8161/admin/; if you access the URL
http://localhost:8161/jolokia/version, you will see a JSON output line about version information, which indicates the Jolokia agent is running correctly.
We use this Web Console to define information to be monitored - these corresepond to pre-configured entries in the check command in the Talend ESB configuration
Create a Queue with the name example.A.
Create a Topic with the name ActiveMQ.Advisory.Consumer.Queue.example.A.
Now we configure the Nagios machine to do the monitoring:
Check that the value of
/etc/hostscorresponds to the machine running the Apache ActiveMQ broker, for example:
Copy the configuration files
<TalendRuntimePath>/add-ons/adapters/nagios/templatedirectory to the Nagios configuration folder, for example:
See Syntax for adding metrics for monitoring for details of the check definitions, command definitions and other configuration details for ActiveMQ which are pre-defined in these files.
(these paths may be different, depending on your version of Nagios).
Define macros which will be used by
jmx_commands.cfgin the existing
resource.cfg; here are some examples, which depend on where your installation puts config files:
/usr/local/nagios/etc/resource.cfgadd these lines:
# set the path which jmx4perl plugin installed $USER5$=/usr/local/src/jmx4perl/scripts # set the path to where to find configuration files $USER6$=/usr/local/nagios/etc/objects
/etc/nagios3/resource.cfgadd these lines:
# set the path which jmx4perl plugin installed $USER5$=/usr/local/src/jmx4perl/scripts # set the path to where to find configuration files $USER6$=/etc/nagios3/etc/objects
Then, restart Nagios for the changes to take effect.
# service nagios restart
Note: the name of this service may vary, depending on which package you used to install Nagios, so it may be called, for example,
nagios3, instead of
Finally, Login to the Nagios Web Interface
http://192.168.198.5/nagios/, and select services.
There, you will find the status of metrics for ActiveMQ.