11 Install and Configure APM Ruby Agent
Requirements and Installation Instructions
Prerequisites
-
Supported versions of the application server:
-
Ruby 2.X and Rails 3.2
-
Ruby 2.X and Rails 4.2
-
Ruby 2.X and Rails 5.X
-
-
If the application server you are running doesn't support TLS 1.2 security protocol, refer to My Oracle Support Doc ID 2703411.1 before proceeding with the APM agent installation.
-
Other considerations:
-
The machine hosting the application server should be able to establish an HTTPS connection either directly or indirectly (using a proxy server or an Oracle Management Cloud gateway) to Oracle Management Cloud. For more information about Oracle Management Cloud gateway, see Install a Gateway.
-
The HTTPS connection must use TLS 1.2 security protocol.
-
The install user of APM Ruby Agent should be the same as the application server user.
-
The application server should have read and write permissions to the APM Ruby Agent log and config directories.
-
Deploy the Gateway (Optional)
-
If you have an application server that does not support Transport Layer Security (TLS) protocol 1.2.
-
If you have older versions of .NET IIS servers and Java Application Servers with JDK less than 1.7 (for example, Oracle WebLogic 10.3.6)
Set the Gateway Variables (Optional)
Set the values for Gateway host and port.
-
If you're using a Bash shell:
export GW_HOST=<Gateway Host Name> export GW_PORT=<Gateway Port>
-
If you're using a C shell:
setenv GW_HOST "<Gateway Host Name>" setenv GW_PORT "<Gateway Port>"
If you are using more than one gateway, use the --additional-gateways
option with the provisioning script.
Download the APM Ruby Agent Software
Install and Provision APM Ruby Agent
After you have downloaded and extracted the installer, install and provision the APM Ruby Agent on your Rails application server.
Provision APM Ruby Agent with a standalone installer
A standalone APM Agent installer is obtained when the Agent zip file is received via email, FTP or similar means (that is, when the agent zip file was not downloaded from an OMC server). To install using the standalone agent installer specify these additional parameters when running the provisioning script:
Oprion | Description |
---|---|
--tenant-id |
The Oracle Management Cloud tenant name. You can get this value from the Agent Download page.
|
--omc-server-url |
The URL of the Oracle Management Cloud server. If you are using gateways and have specificed --gateway-host and --gateway-port , you do not need --omc-server-url .
|
Verify the APM Ruby Agent Installation
You can verify if the deployment of the APM Ruby Agent is successful by examining the logs and verifying that the user interface displays the application.
APM Ruby agent logs are located in the Rails application log directory, within the apm_agent directory: <rails_app>/log/apm_agent.
As the Rails application starts up, the agent creates three log files:
-
agent.log
-
agent_startup.log
-
agent_status.log
The agent_startup.log contains startup logs and will eventually log the following “Agent startup successfully completed”.
The agent_status.log file contains a summary of internal agent metrics showing the amount of traffic monitored, number of observations sent, and number of warnings or errors encountered among other data.
Verify Installation for multiple APM Ruby Agents:
If multiple servers are started for this Rails application, you can see a set of logs for each APM Ruby Agent. The first agent will look like the example above, and additional agents will have a number appended to the file name. For example:
-
agent_2.log
-
agent_startup_2.log
-
agent_status_2.log