To get started with New Relic APM, we're going to take you through the basics to manage your application. The first thing you need to do is see what's happening in your application. To do this, you'll need to install our agent in your environment. Next, you can put that data to work and improve your application's performance. Then, you can organize your applications so that you can easily find them and quickly view performance trends for them.
You've begun to to see what's happening with your applications and explore their performance issues. Now you can pinpoint the cause much more quickly when something goes wrong.
Get notified with alerts
Diagnosing the problem after the fact is important, but it's more important to know that you have a problem, or are about to have one, as soon as possible. Creating an alert will allow you to notify the right people in your organization, using the notification tools your teams typically use (webhooks, Slack, OpsGenie, PagerDuty, email, etc.).
Before we start, watch this video (5:16).
To set up an alert, you will decide:
- Why you want to be alerted (policy)
- What criteria will trigger an alert (conditions)
- When do your selected metric levels escalate into alerting situations (thresholds)
- Who needs to be notified about the situation, and how are they notified (channels)
Then, when an incident occurs, your teams can see what happened, acknowledge that they are taking care of the situation, and follow your standard runbook procedures to monitor and resolve the problem.
For example, you have already used the APM Overview Apdex chart to monitor your users' satisfaction with your application. Let's set up an alert to notify your team in case user dissatisfaction levels begin to rise to a level that concerns you. This will give you a proactive tool to address situations before they affect your customers.
- Try this! Create an alert policy
To create an Apdex alert, you will define why you want to be alerted (policy):
- Go to alerts.newrelic.com > Alerts policies.
- Select Add a policy, then follow the UI workflow.
- Give the policy a meaningful name; for example,
Apdex dissatisfaction over .8.
- For now, leave the Incident precedence at the default (by policy).
- Notice that the notification channel automatically defaults to send you emails about alerting situations. (You can change this later; for example, if you want to add other users or teams to the notification channel.) But for now, keep the default.
- Select Create alert policy.
- Try this! Define alerting criteria (conditions and thresholds)
Now you need to define what criteria will trigger an alert (conditions) and when these levels escalate into alerting situations (thresholds). When you select Create alert policy, the Alert conditions page automatically appears.
- From the Alert conditions page, select Create a condition.
In the Categorize section, keep the defaults:
- Product: APM
- Type of condition: Application metric
- Condition scope: Scope to the application
- Select Next, select entities.
Notice that you can apply your policy's condition to specific applications, or search for labels to easily find and assign it. Now you are going to define what levels (thresholds) trigger the alert.
- Search for and find your application, select it, and select Next, define thresholds.
- From the Define thresholds page, select
below, then identify the level when you want to be notified; for example,
.8 for at least 5 minutes.
- Use the default Condition name (
Apdex low), or change it to something meaningful for you.
- If your organization has standard procedures to handle low Apdex situations, select Add runbook URL, and add the link. Otherwise, leave blank for now.
- Select Create condition.
That's the basics to set up an alert! Now, if your application's Apdex level falls below .8 for at least five minutes, you will receive an email notification with details about the incident. You can click the link in the email, and it will automatically take you to the New Relic Alerts Incidents page, where you can review the details and take action.
- Learn more about alerts
Now that you have successfully set up a basic alerting scenario, you can review the four basic steps, or dive even deeper into using the New Relic platform.