Skip to content

Commit

Permalink
Made changes based on discussion with SME.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhetoric101 committed Aug 20, 2021
1 parent 3ae9bf8 commit 0ca032b
Showing 1 changed file with 15 additions and 21 deletions.
Expand Up @@ -16,9 +16,11 @@ Follow these steps to write your first alerts condition using a NRQL query and a

## Step 1: Write your query [#step1-nrql]

In this example, a condition is created for each host's CPU utilization (query), which will trigger a notification when the CPU utilization is above 70% (threshold).
You can use a NRQL query to return data about how your environment is performing. Then, you can create a condition from that query.

You can use a NRQL query to return data about how your environment is performing. Then you can create a condition from that query. Find the [NRQL query builder](/docs/query-your-data/explore-query-data/query-builder/use-advanced-nrql-mode-query-data/) at the top of the UI.
In this example, a condition is created for each host's CPU utilization (query), which will trigger a notification when the CPU utilization is above the .7% (threshold).

Find the [NRQL query builder](/docs/query-your-data/explore-query-data/query-builder/use-advanced-nrql-mode-query-data/) at the top of the UI.

![A screenshot showing where you can find the NRQL query builder button in New Relic One.](./images/find-builder.png 'A screenshot showing where you can find the NRQL query builder button in New Relic One.')

Expand All @@ -35,37 +37,29 @@ The condition shows each host’s CPU utilization. Use this NRQL query, or somet
down (facets) by individual host names.
</figcaption>

Once you've created a valid NRQL query, click the **Create alert** button.

Learn more about the [NRQL syntax](/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language/#syntax) to create a variety of queries.
Once you've created a valid NRQL query, click **Create alert**.

## Step 2: Name and revise your NRQL condition [#step2-nrql]
Learn more about the [NRQL syntax](/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language/#syntax) to create other useful queries.

Give your NRQL condition a name that's meaningful to you. Your query's visualization is shown automatically.

![The query's visualization shows each host’s average CPU utilization.](./images/show-nrql-graph.png 'The query's visualization shows each host’s average CPU utilization.')
## Step 2: Name your NRQL condition [#step2-nrql]

<figcaption>
The query's visualization shows each host’s average CPU utilization. A critical violation will open if any host’s average CPU utilization is over 70%. A warning threshold is met at 67%.

Warning thresholds are described below.
</figcaption>
Give your NRQL condition a name that's meaningful to you.

## Step 3: Set your condition thresholds [#step3-nrql]

Set critical and warning thresholds to determine when you’re notified about your environment's performance.

In this example, our critical threshold (red) checks for any hosts with CPU utilization over 0.7% for at least 5 minutes. A warning threshold (yellow) is also added showing when any host's CPU utilization goes over 0.67% for at least 5 minutes.
* A critical threshold is required for your alerts condition.

![A visualization of the NRQL query with critical and warning threshold lines.](./images/nrql-set-threshold.png 'A visualization of the NRQL query with critical and warning threshold lines.')
* A [warning threshold](/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition/#threshold-levels) is optional. These thresholds don't create an incident or notify you like the critical threshold does. If a critical threshold opens an incident and notifies you, warning threshold violations created afterwards will be included in the report.

<figcaption>
Use the **Set your condition thresholds** section to set the critical and warning thresholds for your condition.
</figcaption>
In this example from the **Set your condition thresholds** section, our critical threshold (red) checks for any hosts with CPU utilization over .7% for at least 5 minutes. A warning threshold (yellow) is also added showing when any host's CPU utilization goes over .67% for at least 5 minutes.

A critical threshold is required for your alerts condition. [Warning thresholds](/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/set-thresholds-alert-condition/#threshold-levels) are optional.
![A visualization of the NRQL query with critical and warning threshold lines.](./images/nrql-set-threshold.png 'A visualization of the NRQL query with critical and warning threshold lines.')

After you enter threshold values, you can see the threshold lines on the graph:

Warning thresholds don't create an incident or notify you like the critical threshold does. If a critical threshold opens an incident and notifies you, warning threshold violations created after will be included in the report.
![The query's visualization shows each host’s average CPU utilization.](./images/show-nrql-graph.png 'The query's visualization shows each host’s average CPU utilization.')

## Step 4: Create a policy

Expand Down

0 comments on commit 0ca032b

Please sign in to comment.