settings within the configuration files installed along with the agent.
server-side configuration
Settings within the New Relic UI that affect agent behavior.
agent vs daemon
The NR PHP Agent consists of two pieces, a PHP extension (“agent”) and a standalone process (“daemon” or “proxy daemon”) which handles transmission of data to New Relic.
apdex & apdex_t
Apdex is a measurement of how well your application is performing. It quantifies aggregate user experience into a number between 0 and 1. Apdex_t is the setting you define which sets the baseline for “expected performance”, and is used to calculate apdex.
Server Side Configuration
Whose server? Not yours, not your customer’s...New Relic’s!
Agent Configuration
Agent Configuration
Agent configuration is the most extensive and expressive way to change the behavior of the agent. It can change ...
connection type/details (proxy, SSL)
License key and application name
change settings on level of detail gathered & logged
Location
The configuration file is most often found at /etc/php5.d/newrelic.ini but could be in other locations as well.
Agent Settings
Agent settings need to be visible to PHP, so they can be set in php.ini or other config files.
NR attempts to install a “
newrelic.ini
” where the machine configuration supports multiple ini files.
The easiest, universal-to-all-app-agents method is change the application name in the config file.
Other ways...
Lab: Server Side Configurtion
Log into your testing account in New Relic
Select the demo application
Navigate to the Settings section, Application section
Change the apdex_t setting
Save
service httpd restart
Lab Solution
...before
after:
Lab: Agent Configuration
Visit your “app” in browser and view-source on the page; observe that there are two lines (header and footer) referencing ‘NREUM’
locate newrelic.ini (on centos 6, typically /etc/php5.d/newrelic.ini)
Using your favorite editor, open that file as root (eg ‘sudo vi /etc/php5.d/newrelic.ini’)
Lab: Agent Configuration cont...
Change the setting ‘newrelic.browser_monitoring.auto_instrument’ to 0
Restart your dispatcher (eg apache)
Visit the web copy of your demo script and observe that the javascript header and footer for auto_instrumentation is missing (search for ‘NREUM’)
Lab Solution
Locate and Troubleshoot Data
Terms for this Section
Transaction trace
By default, New Relic captures details about the slowest transactions, including call stacks and SQL statements.
Error trace
New Relic captures details about unhandled exceptions, including stack traces and error messages.
Transactions Dashboard
Viewing an individual transaction
Viewing transaction traces
Transaction Traces
Using the Server Dashboard
Processes Dashboard
Network Dashboard
Disks Dashboard
Lab: Using Transaction and Server data to troubleshoot performance problems
Visit the permalink provided by your instructor
Using New Relic’s Transaction and Server dashboards, determine whether the application has a performance problem
If so, determine what caused the problem (for example, slow code, slow database queries, limited server resources, etc.)
Lab Solution
Did the application have a performance problem? How did you know?
If so, what caused the problem? What data led you to that conclusion?
Using the Errors Dashboard
Viewing an individual transaction
Apdex
Terms for this Section
Apdex
An industry standard to measure users' satisfaction with the response time of an application or service. It's a simplified Service Level Agreement (SLA) solution that gives application owners better insight into how satisfied users are, in contrast to traditional metrics like average response time, which can be skewed by a few very long responses.
Apdex T
The application owner defines a response time threshold:
“T.”
All responses handled in T or less time satisfy the user. For example, if T is 1.2 seconds and a response completes in 0.5 seconds, then the user is satisfied. All responses greater than 1.2 seconds dissatisfy the user.
Apdex Score
The Apdex score is a ratio value of the number of satisfied and tolerating requests to the total requests made. Each satisfied request counts as one request, while each tolerating request counts as half as satisfied request.
Application Performance Index
How to Compute the Apdex Score
Apdex Bucket
Calculating Apdex: Errors
Unhandled Exceptions are always “Frustrating” results
Calculating Apdex
Calculating Apdex: Examples
Calculating Apdex: Examples
Calculating Apdex: Examples
Configuring Apdex Threshold
Lab: Fun with Apdex
Calculate Apdex Example
Log into New Relic
Review existing Apdex score
Make changes to Apdex-T
Refresh site to see how Apdex Score responds
Link to Apdex calculator: http://bit.do/apdex
Calculate the Following Apdex Score
Practice Time
Calculate the Following Apdex Score
Lab Solution
Alert Policies
Terms for this Section
Alert Channel
Notification method. Email is the only channel used by default, but mobile push notifications, pagerduty, hipchat, campfire, and webhooks are also configurable.
Alert Policy
A grouping mechanism for most alertables (servers, applications, and key transactions).
Alert Fatique
Occurs when user become indifferent due to excessive alerts.
Find out about problems within your infrastructure as they develop
Get the right alert to the right people, but avoid alert fatigue
Configurable thresholds, set once per application
Configurable recipients and methods
Two Kinds of Alerts
Threshhold Alerts
Only be listed within the NR UI
Usually lead to alerts being sent outside of NR
Configuring Threshold
Most alerts are based on metrics crossing thresholds:
Just like an alarm clock, if you set the threshold lower than the current value of the the metric, it will not alert until the metric drops below the threshold and then rises above it again.
Downtime Alerts
Grouping Servers & Applications w/ Alert Policies
Accounts with >1 app and/or server can effectively group alertables to manage alerts more easily
Alert Notifications
You can modify alert notifications by defining alert policies or by using the alert API settings in New Relic's REST API. You can have alerts sent to:
Alerting "Gotchas"
There are several alerting gotchas:
policy alert open => no more alerts after the first one, if ‘first critical’ is set
Alerting "Gotchas"
There are several alerting gotchas:
policy alert open => no more alerts after the first one, if ‘first critical’ is set
mobile/plugin alerting outside of policy settings:
thresholds are account-wide, not per-user, while notifications are set per-user