Configure the Nagios plugin to monitor the sample applications - 7.3

Talend ESB System Management Integration User Guide

EnrichVersion
7.3
EnrichProdName
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
EnrichPlatform
Talend ESB
Talend Runtime
task
Administration and Monitoring
Installation and Upgrade

About this task

In Talend Open Studio for ESB or Talend ESB installations, the configuration files are in <TalendRuntimePath>/add-ons/adapters/nagios.

Procedure

  1. Create a local directory for the configuration files if it does not exist, for example: /usr/local/nagios/etc/objects/ or /etc/nagios3/etc/objects/, depending on where your installation expects them.
  2. Define jolokia_host (the host where the examples are running) in /etc/hosts - this name is used in subsequent files, rather than hard-coding in the ip address. For example, add the line (depending on the IP address):
    192.168.1.101 jolokia_host
  3. Copy the template and sample configuration files into Nagios etc/objects subdirectory. Not all of these are needed for this example, but we will only reference the ones we need in the configuration files. For example:
    cp -f <TalendRuntimePath>/add-ons/adapters/nagios/template/*.cfg
    						/usr/local/nagios/etc/objects/
    cp -f <TalendRuntimePath>/add-ons/adapters/nagios/sample/*.cfg
    						/usr/local/nagios/etc/objects/
    This target directory may be elsewhere in your installation, for example: /etc/nagios3/etc/objects/.
  4. Add the template configuration file to the existing nagios.cfg, here are some examples, which depend on where your installation puts config files:
    • In /usr/local/nagios/etc/nagios.cfg add:
      cfg_file=/usr/local/nagios/etc/objects/jmx_commands.cfg
      cfg_file=/usr/local/nagios/etc/objects/camel_host.cfg
    • Or in /etc/nagios3/nagios.cfg add:
      cfg_file=/etc/nagios3/etc/objects/jmx_commands.cfg
      cfg_file=/etc/nagios3/etc/objects/camel_host.cfg
  5. Define macros which will be used by jmx_commands.cfg in resource.cfg, here are some examples, which depend on where your installation puts config files:
    • In /usr/local/nagios/etc/resource.cfg add 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
    • Or in /etc/nagios3/resource.cfg add 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
  6. 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 nagios.