Installing the data collector

You must install the data collector for the agent to work properly. After you install the data collector, monitoring data is displayed on the Application Performance Dashboard.

Before you begin

If you installed your Ruby on Rails application on a Linux® system by using a non-root account, and you plan to collect diagnostics data, the non-root user must have access to the diagnostics data collector home directory. Verify that the non-root user has read and write access in the install_dir/install-images/kkm directory, where install_dir is the installation directory of the Ruby agent. The default installation directory is /opt/ibm/apm/agent. If required, provide read and write permissions by using the chmod 777 command.

Procedure

  1. Stop your Ruby on Rails application.
  2. Optional: If you are upgrading the Ruby data collector to a new version, you must first uninstall the old version data collector by running the following command:
    gem uninstall stacktracer
  3. Install the diagnostics data collector. Enter gem install --local install_dir/lx8266/km/bin/stacktracer-version.gem, where version is the version number, and install_dir is the installation directory of the Ruby agent. The version number in the name of the stacktracer-version.gem file in the agent installation directory indicates the version number that you need to enter here. The default installation directory is /opt/ibm/apm/agent.
    Important: Install the data collector as the same user when you install and run the Ruby on Rails application.
  4. Navigate to the home directory of your application, open its Gemfile, and add the following line to the end of the file: gem 'stacktracer', 'version'
    where version is the version number of the data collector. The version number is indicated in the name of the stacktracer-version.gem file that is in the install_dir of the Ruby agent.

    For example, if you install the Ruby data collector Version 1.0 Fix Pack 8, you can find a stacktracer-01.00.08.00.gem file in the installation directory of you agent. And then you add the gem 'stacktracer', '01.00.08.00' line to your application to install the data collector.
    Note: If there is only one version of stacktracer in the environment, add the gem 'stacktracer' line to the end of the file. Do not specify the version number in the line.
  5. In the home directory of your application, enter bundle install.
  6. Restart your Ruby on Rails application.

Results

The data collector is installed and configured and your Ruby on Rails application is started.

What to do next

  • If you are not logged in, follow the instructions in Starting the Cloud APM console. Select Performance > Application Performance Dashboard to open the All My Applications dashboard, and drill down to the Ruby App resource monitoring dashboards and diagnostic dashboards to observe your Ruby on Rails applications from the status summary down to individual request instances.
  • To see and modify the settings for the diagnostics data collector, continue to the next topic, Configuring the diagnostics data collector.
  • To display method trace data for requests in Cloud APM UI, see Enabling method trace and adjusting the path display.
  • When method trace is enabled or the data requests are large, you might receive out of memory errors. You can increase JVM heap size to avoid these errors. See Increasing the JVM heap size.
  • You can disable and enable diagnostics data collection for one or more managed Ruby on Rails applications at any time through the Cloud APM console. See Disabling or enabling diagnostics data for Ruby applications. This function is not available for resource monitoring.