Alerts is a tool you can use to notify yourself and others if your telemetry exceeds some particular thresholds. Thresholds are defined by conditions you create, and you can group those conditions into policies.
Depending on your role, you may use conditions to define the violations you and your team are notified about or you may be responding to those violations and want to know the condition that caused it.
Conditions use NRQL queries to define what you want to be notified about. Use the condition UI to set the specific thresholds that generate a violation and its notification. Writing a NRQL query from scratch might seem daunting, but if you create a condition from a New Relic chart, we'll populate the condition with the NRQL used to generate the chart. Then, you can modify the query if you want and then set the condition thresholds.
Here's how to try this:
In the upper right corner of any chart, click the ellipses button, then click Create alert condition. Click on the image to enlarge it:
- If the chart displays a single metric, use the slide-out window to create a new alert condition, with the NRQL query pre-populated.
- If the chart displays multiple queries, you will be asked to choose which query you want to use.
In the condition creation form, you can select an existing policy or create a new one.
For additional help creating alerts, see Introduction to alerts.
If you are responsible for responding to violations, you may also want to know what alerts are set up for each of your services. You can quickly get a list of all the conditions and their related policies from the UI:
- From one.newrelic.com, click Explorer.
- In the left navigation pane, select Services - OpenTelemetry.
- Click the service name you want to investigate.
- In the left pane under Settings, click Alert conditions.
On the Alert conditions page, besides being able to see details about the alerts, you can also add a warning. You might do this to ensure you are notified if a threshold is approaching critical. In the Thresholds column, when you click on Create a warning, you are taken directly to the alert condition editor where you can add a warning threshold.
If you need an overview, see Create your first alert.