Skip to main content Skip to complementary content
Close announcements banner

Configure the Nagios plugin to monitor the sample applications

About this task

In 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
    Information noteNote: 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.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!