IBM Performance Management

Configuring the Ruby agent with customized settings

If you have multiple Ruby runtimes installed on the system, you must specify the runtime to use to gather data from your Ruby applications. The chosen Ruby runtime must be compatible with the version of Ruby on Rails that is used in the application. To specify the runtime to use, configure the agent with customized settings.

About this task

The Managed System Name includes the instance name that you specify, for example, instance_name:host_name:pc, where pc is your two character product code. The Managed System Name is limited to 32 characters. The instance name that you specify is limited to 28 characters, minus the length of your host name. For example, if you specify Ruby2 as your instance name, your managed system name is Ruby2:hostname:KM.
Important: If you specify a long instance name, the Managed System name is truncated and the agent code does not display correctly.

Procedure

  1. To configure the agent, enter:
    install_dir/bin/ruby-agent.sh config instance_name
    Where instance_name is the name you want to give to the instance, and install_dir is the installation directory of Ruby agent. The default installation directory is /opt/ibm/apm/agent.
  2. When prompted to Edit Monitoring Agent for Ruby settings, enter 1 to continue.
  3. When prompted for Ruby Runtime Bin Location, specify the binary directory. For example, /usr/local/rvm/rubies/ruby-2.0.0-p247/bin if you use Ruby Version Manager (RVM).
  4. When prompted with Allow the Ruby agent to auto-detect all current running Ruby on Rails applications, enter Y or N to continue.
    Note: This function can be enabled on only one agent instance. When you configure other instances, enter N to disable this function and continue.
  5. When prompted for Rails Application Server, press Enter to accept the default of ruby or specify the value for the server that you use according to the following list:
    • For Webrick servers, accept the default or specify ruby; if the Rails is installed by Ruby Stack, specify .ruby.bin.
    • For Passenger servers, specify passenger.
    • For Unicorn servers, specify unicorn.
    • For Puma servers, specify puma.
    • For Thin servers, if the applications are started by running the command thin start, accept the default to use ruby; if the applications are started by running the command thin start -d, specify thin; if the Rails is installed by Ruby Stack and the applications are started by running the command thin start, specify .ruby.bin.
  6. When prompted for Socket Data Source, press Enter to accept the default of 0 to use the ephemeral port.
  7. When prompted to Edit 'Ruby_Application' settings, enter 5 to exit.
  8. To start the agent, enter:
    install_dir/bin/ruby-agent.sh start instance_name