Operational

 

Intros

 

Learning Objectives

  • Find important information in the user interface
  • Identify issues within collected data
  • Calculate Apdex
  • Configure alert policies
  • Where to find New Relic Docs
 

New Relic under 2 minutes


 

New Relic Web Interface

 

New Relic Interface

 

Applications Menu

 

Server Menu

 

Drop Down Menu

 

Account Settings Menu

 

Time Picker

 

Zoom Select

 


 

Install App and Server Agents

 

Terms for this Section

 

New Relic License Key

This is a 40-character hexadecimal string that New Relic provides when you sign up for your account.

Example Key: a00a403ec153eb64c01a9dc47c1654ccbc3760fa

 

Agent Configuration File

The New Relic agent reads settings, including license key and application name, from a config file.

 

New Relic Log Files

The New Relic agent and daemon can be configured to log output about what they are doing.

 

Application Agent Installation

 

Install PHP Application Agent

  1. Add the repo

rpm -Uvh http://yum.newrelic.com/pub/newrelic/el5/x86_64/
newrelic-repo-5-3.noarch.rpm
    

  1. Install the app monitor

yum install newrelic-php5
    
  1. Run the installer

newrelic-install
    

 

Install PHP Application Agent

 

Server Agent Installation

 

Install Server Monitor Agent

  1. Install the server monitor agent

yum install newrelic-sysmond
   
  1. Run the installation

nrsysmond-config --set license_key=YOUR_LICENSE_KEY

 

Lab: Let’s Do New Relic

  1. Install New Relic PHP Agent
  2. Install New Relic Server Monitor Agent
  3. Make PHP Do Something

php -r "phpinfo(); sleep(10);"

  1. Observe in RPM
 

Lab: Solution


 

Configuration Setting

 

Terms for this Section

 

agent configuration

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.
 

PHP Agent Settings 

List of available PHP agent settings:

https://docs.newrelic.com/docs/agents/php-agent/configuration/php-agent-newrelicini-settings

 

Changing Settings

 

Why would you rename the app?

  
   How to Rename the App

The easiest, universal-to-all-app-agents method is change the application name in the config file.

Other ways...

 

Lab: Server Side Configurtion

  1. Log into your testing account in New Relic
  2. Select the demo application
  3. Navigate to the Settings section, Application section
  4. Change the apdex_t setting
  5. Save
  6. service httpd restart
 

Lab Solution

 

...before

after:

 

Lab: Agent Configuration

  1. Visit your “app” in browser and view-source on the page; observe that there are two lines (header and footer) referencing ‘NREUM
  2. locate newrelic.ini (on centos 6, typically /etc/php5.d/newrelic.ini)
  3. Using your favorite editor, open that file as root (eg ‘sudo vi /etc/php5.d/newrelic.ini’)
 

Lab: Agent Configuration cont...

  1. Change the setting ‘newrelic.browser_monitoring.auto_instrument’ to 0
  2. Restart your dispatcher (eg apache)
  3. 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

  1. Visit the permalink provided by your instructor
  2. Using New Relic’s Transaction and Server dashboards, determine whether the application has a performance problem
  3. 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

  1. Calculate Apdex Example
  2. Log into New Relic
  3. Review existing Apdex score
  4. Make changes to Apdex-T
  5. 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.

 

New Relic Alerting

 

New Relic Alerting

New Relic alerting enables you to...

  • 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:

 

Screen Shot 2014-08-22 at 10.46.44 AM.png

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
 

Lab: Configuring & Receiving an Alert

  1. Create a Server alert policy that:
  • a.  Named "Too low"
  • b.  Caution: 1% CPU after 5 minutes
  • c.  Send alerts: 2% CPU 6 minutes
  • d.  Apply to all servers
  1. Generate CPU load 
 

Lab Solution

 

Lab Solution

 

Lab Solution



Useful links


http://newrelic.com/resources
https://docs.newrelic.com
 

Assess your Knowledge

http://bit.ly/NRassessment

Operational

Made with Slides.com