New Relic monitoring for your sites
New Relic is a third-party application-performance monitoring (APM) service: it watches your site from the inside — which pages are slow, which database queries and remote calls eat the time, what errored and when — and charts it all in a web dashboard. If you're chasing "the site feels slow" beyond what the watchdog log can tell you, this is the heavier instrument.
BOA has the integration built in, and on a hosted account you can switch it on yourself. You bring your own New Relic account (their license key is the only thing BOA needs from it); the wiring on the server is two small switches, both in files you already own.
The two switches — you need both
This is the part people miss, so it comes first: New Relic reporting only happens when two things are in place. Either one alone looks plausible and does nothing.
- Your license key, in a control file for your whole instance:
~/static/control/newrelic.info - A per-site opt-in, in that site's INI file:
enable_newrelic_integration = TRUE
The key file arms the PHP layer for your instance; the INI setting opts a site in. With the key but no INI opt-in, the site's reporting is deliberately suppressed — nothing appears in your New Relic panel. With the INI opt-in but no key, there's nothing to report to. Both, and the data flows.
Switch 1 — the license key file
Your New Relic account gives you a license key — a 40-character
hexadecimal string. Put it, on its own, into the control file from your
oN.ftp shell:
echo 0123456789abcdef0123456789abcdef01234567 > ~/static/control/newrelic.info
(Or create the file over SFTP — the content is just the key, one line.)
A background agent picks the file up within a few minutes and re-configures the PHP layer of your instance to load it — there's no task to run and nothing to restart on your side.
Switch 2 — the per-site opt-in
Now opt in each site you want monitored. In the site's INI file,
sites/example.com/modules/boa_site_control.ini, set:
enable_newrelic_integration = TRUE
Prefer to monitor every site on a platform? Set the same line once in the
platform's INI file, sites/all/modules/boa_platform_control.ini, instead.
The copy-the-template-and-uncomment routine for both files is on
The two control files, and INI
changes take effect within about a minute on their own.
What you'll see in New Relic
Each opted-in site reports as its own application, named after its domain
— so example.com and shop.example.com chart separately, and a slow spot on
one doesn't hide in the average of the other. (Drush runs from the shell
report separately again, labelled as such, so command-line work doesn't
pollute your web numbers.)
Give it a few minutes of real traffic after switching on; New Relic only shows an application once data has arrived for it.
Turning it off
- One site: set its
enable_newrelic_integrationback toFALSE(or re-comment the line). The site stops reporting; others carry on. -
The whole instance: delete the key file —
SHrm ~/static/control/newrelic.infoWithin a few minutes the same background agent notices and disarms the PHP layer again. Your New Relic account and its historical data are untouched — this only stops new data from being sent.
If nothing shows up
Worked through both switches, waited, sent the site some traffic, and the application still doesn't appear in your New Relic panel? Check, in order:
- The key file's content — exactly the 40-character license key, nothing else. A pasted-in label or trailing junk means the key can't be read.
- The right site is opted in — the INI line is in that site's
boa_site_control.ini(or its platform's file), uncommented, spelledenable_newrelic_integration = TRUE. - Ask your host. The New Relic agent itself is a server-level package; most hosted servers already carry it, but if yours doesn't, installing it is your host's quick job — a short support request with "could you check the New Relic agent is installed for my instance" is all it takes.
Related
- Which file do I edit? — where the
INI files and the
static/control/folder live, and how changes take effect. - The two control files — the site-vs-platform INI routine used for the opt-in above.
- I'm blocked, or my site is slow — the first-stop checks for slowness, before reaching for an APM.
- Reference —
enable_newrelic_integrationand the other documented control-file settings in one place.