Building the jmx4perl plugin - 7.0

Talend ESB System Management Integration User Guide

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

Warning

The main commands and scripts in this section (cpan, Build.PL, the Build perl script) need to be run with root permissions, for example, as root or using sudo.

We use the Perl CPAN (Comprehensive Perl Archive Network) shell here to download missing dependencies.

  1. Extract the jmx4perl distribution:

    $ cd /usr/local/src
    # tar zxvf /tmp/jmx4perl-1.05.tar.gz
    # ln -s -f jmx4perl-1.05 jmx4perl
  2. Install the build module:

    # cpan
    cpan[1]> install Module::Build
    cpan[1]> exit
  3. This step installs missing dependencies for jmx4perl. There are two ways of doing this:

    • A Build perl script is created later in this section; if you have a Build script that was previously created (for example, during an similar installation on another machine), then it's quicker to use it here:

      # cd /usr/local/src/jmx4perl
      # ./Build installdeps
    • If you do not have a previously-created Build script, then explicitly install jmx4perl dependencies (and accept the default values to any questions):

      # cpan
      cpan[1]> install Config::General
      cpan[2]> install Crypt::Blowfish_PP
      cpan[3]> install File::SearchPath
      cpan[4]> install JSON
      cpan[5]> install Module::Find
      cpan[6]> install Nagios::Plugin
      cpan[7]> install Term::Clui
      cpan[8]> install Term::ReadKey
      cpan[9]> install Term::ReadLine::Perl
      cpan[10]> install Term::ShellUI
      cpan[11]> install Term::Size
      cpan[12]> exit
  4. Run the newly-created Build.PL script, which generates the ./Build perl script:

    # cd /usr/local/src/jmx4perl
    # perl Build.PL

    Note

    Choose 'n' in response to "Install 'jolokia'" in the following script. Jolokia is not required directly on the Nagios server host, and only needs to be installed within the monitored containers (Talend containers have it pre-installed). Adding Jolokia would require installing additional modules and has not been tested.

    When running this script give the following answers:

    Install 'jmx4perl' ? (y/n) [y ]y
    Install 'check_jmx4perl' ? (y/n) [y ]y
    Install 'cacti_jmx4perl' ? (y/n) [y ]y
    Install 'j4psh' ? (y/n) [y ]y
    Install Term::ReadLine::Gnu ? (y/n) [n ]n
    Install 'jolokia' ? (y/n) [y ]n 

    * see note above

    Run the ./Build script to recheck all dependencies are installed:

    # ./Build installdeps
  5. Run the Build comand:

    # ./Build install

When all these steps finished successfully, the jmx4perl plugin should be installed onto Nagios.

  • Check everything has been correctly installed by communicating with a Talend Runtime container (this already has an active Jolokia agent) (please replace <jolokia_host> with the host where the Talend Runtime container is running) :

    $ check_jmx4perl -u http://<jolokia_host>:8040/jolokia --alias 
    			MEMORY_HEAP_USED --base MEMORY_HEAP_MAX --warning 80 --critical 90

    If you have problems getting this running, try disabling the firewall on the Jolokia (Talend Runtime container) host.