New Relic
New Relic monitors the applications and helps to optimize them. It offers agents in a number of languages and here we will present the steps needed to install the PHP and Python agents.
In our example, we use the SSH access and consider the following information:
- Account name:
foo
Note
[foo], [newrelic-last-version], [version] et REPLACE_WITH_LICENSE_KEY must be replaced by accurate informations.
PHP
Given the specificities of our infrastructure, their installation script cannot be used on our servers, so here are the steps to follow.
- New Relic directory:
$HOME/newrelic/
Private Cloud
Step 1: Download the agent
Step 2: Modify php.ini
Add to php.ini (Environment > PHP):
More options are available from file /home/[foo]/newrelic/scripts/newrelic.ini.template.
Step 3: Start the daemon
Create a service with the following details:
- Command:
/home/[foo]/newrelic/daemon/newrelic-daemon.x64 -f --logfile /home/[foo]/newrelic/daemon/log - Working directory:
/home/[foo]/newrelic
Public Cloud
Step 1: Download the agent
Step 2: Modify php.ini
Add to php.ini (Environment > PHP):
More options are available from file /home/[foo]/newrelic/scripts/newrelic.ini.template.
Python
New Relic is a Python module to be installed as other ones. If the application uses a virtualenv, New Relic will need to be installed at its level.
Step 1: Install the agent
Step 2: Modify the app configuration
Add to the .py application file: