-
Notifications
You must be signed in to change notification settings - Fork 13
How to connect New Relic to your localhost machine
New relic is a performance monitoring for PHP that can help you find out what taking to much to render.
Register to New relic.
Download New relic PHP agent from here for your local machine and extract it to a easy access folder.
Check the path of the your php folder using the command which php
Copy your license from your account.
Go to the folder you extracted the php agent to. Type the next command sudo NR_INSTALL_PHPLIST=<your php path> ./newrelic-install
and go through the installation.
example: sudo NR_INSTALL_PHPLIST=/Applications/MAMP/bin/php/php5.3.20/bin ./newrelic-install
Restart your apache server.
Log in to your new relic dashboard and get your license key.
Open your newrelic.ini file(you can locate the file full path using the phpinfo()):
- on Mac look for new-relic in php info to test installation.
Set the value of the variable newrelic.license to your license key you saved before.
When clicking on Application you'll see your servers:
Clicking on the PHP application will lead you to the graph of your local machine:
That's it. You can start monitoring your local application and see what's consuming the machine resources.