Skip to content

Commit

Permalink
Merge pull request #18939 from newrelic/nb-alerts-fixing-urls
Browse files Browse the repository at this point in the history
fix(Alerts): Fixed broken links
  • Loading branch information
nbaenam authored Oct 15, 2024
2 parents 454df8c + 7302cc2 commit 6eacd45
Show file tree
Hide file tree
Showing 9 changed files with 144 additions and 111 deletions.
2 changes: 1 addition & 1 deletion src/content/docs/alerts/admin/rules-limits-alerts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Limits and rules pertaining to New Relic <InlinePopover type="alerts"/>:

<tr>
<td>
[Alert policy name](/docs/alerts/new-relic-alerts-beta/configuring-alert-policies/name-or-rename-alert-policy)
[Alert policy name](/docs/alerts/organize-alerts/create-edit-or-find-alert-policy/)
</td>

<td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Entities in New Relic are automatically color-coded with their health status. Fo
<td>
A [critical threshold](/docs/alerts/new-relic-alerts-beta/configuring-alert-policies/define-thresholds-trigger-alert) has been breached:

* [Notifications](/docs/alerts/new-relic-alerts-beta/managing-notification-channels/notification-channels-controlling-where-send-alerts) have been sent based on the selected [incident rollup preference](/docs/alerts/new-relic-alerts-beta/reviewing-alert-incidents/specify-when-new-relic-creates-incidents).
* [Notifications](/docs/alerts/new-relic-alerts-beta/managing-notification-channels/notification-channels-controlling-where-send-alerts) have been sent based on the selected [incident rollup preference](/docs/alerts/organize-alerts/specify-when-alerts-create-incidents/).
* The incident appears in the [<DNT>**Incidents**</DNT> index](/docs/alerts/new-relic-alerts-beta/reviewing-alert-incidents/explore-incident-history).
</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ When the [threshold](/docs/alerts/create-alert/set-thresholds/set-thresholds-ale

## View the incidents index and incident details [#view-incidents]

Incidents are grouped together into incidents. If you want to change how incidents are grouped, open the associated policy and change the [<DNT>**Incident preference**</DNT>](/docs/alerts/new-relic-alerts-beta/reviewing-alert-incidents/specify-when-new-relic-creates-incidents) setting.
Incidents are grouped together into incidents. If you want to change how incidents are grouped, open the associated policy and change the [<DNT>**Incident preference**</DNT>](/docs/alerts/organize-alerts/specify-when-alerts-create-incidents/) setting.

To view incident details:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Here is a quick reference which also includes links to more detailed information
id="rename-policy"
title="Change a policy name"
>
To [rename](/docs/alerts/new-relic-alerts-beta/configuring-alert-policies/name-or-rename-alert-policy#rename-policy) a policy:
To [rename](/docs/alerts/organize-alerts/create-edit-or-find-alert-policy/#rename-policy) a policy:

1. Go to <DNT>**[one.newrelic.com](https://one.newrelic.com) > Alerts > Alert Policies**</DNT>, then select a policy.
2. Click the policy <DNT>**settings**</DNT> tab to edit it, type a [meaningful name](#best-practices-policies) for the policy (maximum 64 characters), and hit <DNT>**Save**</DNT>.
Expand All @@ -164,7 +164,7 @@ Here is a quick reference which also includes links to more detailed information
id="new-policy"
title="Create a new policy"
>
To create a [new alert policy](/docs/alerts/new-relic-alerts-beta/configuring-alert-policies/name-or-rename-alert-policy):
To create a [new alert policy](/docs/alerts/organize-alerts/create-edit-or-find-alert-policy/):

1. Go to <DNT>**[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > Alerts > Alert Policies**</DNT>.
2. Click <DNT>**New alert policy**</DNT>.
Expand Down Expand Up @@ -214,7 +214,7 @@ Here is a quick reference which also includes links to more detailed information
id="incidents"
title="Change how incidents roll up into issues"
>
To select how [incidents](/docs/alerts/new-relic-alerts-beta/reviewing-alert-incidents/specify-when-new-relic-creates-incidents) are grouped into issues (by policy, by condition, or by target and condition):
To select how [incidents](/docs/alerts/organize-alerts/specify-when-alerts-create-incidents/) are grouped into issues (by policy, by condition, or by target and condition):

1. Go to <DNT>**[one.newrelic.com](https://one.newrelic.com/all-capabilities) > Alerts > Alert Policies**</DNT>, then select a policy.
2. Click the <DNT>**Settings**</DNT> tab.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,37 @@ redirects:
freshnessValidatedDate: never
---

In alerts, an <DNT>**entity**</DNT> is defined as any target for monitoring, such as an application, a browser, or a host. The [alerts UI](/docs/alerts/new-relic-alerts/defining-conditions/select-product-targets-alert-condition) shows available entities that you can select. You can also use the REST API and API Explorer to [add](https://rpm.newrelic.com/api/explore/alerts_entity_conditions/add) or [remove](https://rpm.newrelic.com/api/explore/alerts_entity_conditions/remove) entities for a condition.
In <InlinePopover type="alerts"/>, an <DNT>**entity**</DNT> is defined as any target for monitoring, such as an application, a browser, or a host. The [alerts UI](http://one.newrelic.com/alerts/) shows available entities that you can select. You can also use the REST API and API Explorer to [add](https://api.newrelic.com/docs/#/Alerts%20Entity%20Conditions/put_alerts_entity_conditions__entity_id__json) or [remove](https://api.newrelic.com/docs/#/Alerts%20Entity%20Conditions/delete_alerts_entity_conditions__entity_id__json) entities for a condition.

## Before using the REST API [#before-start]

The REST API is no longer the preferred way to programmatically manage your alerts. For more context, read the [Intro to APIs for <InlinePopover type="alerts"/>](/docs/alerts-applied-intelligence/new-relic-alerts/advanced-alerts/alerts-api/intro-alerts-api).
The REST API is no longer the preferred way to programmatically manage your alerts. For more context, read the [Intro to APIs for alerts](/docs/alerts/scale-automate/nerdgraph/nerdgraph-api-examples/).

## Requirements

Modifying the list of entities in a condition requires you to know:

* Your [API key](/docs/apis/rest-api-v2/getting-started/introduction-new-relic-rest-api-v2#api_key)
* The [`entity_id`](/docs/alerts/new-relic-alerts/getting-started/alerts-glossary#alert-entity) of the entity you want to monitor
* The [`condition_id`](/docs/alerts/new-relic-alerts/getting-started/alerts-glossary#alert-condition) of the condition you want to modify
* The [&#x7B;entity_ID}](/docs/new-relic-solutions/get-started/glossary/#entity) of the entity you want to monitor
* The [&#x7B;condition_ID}](/docs/new-relic-solutions/get-started/glossary/#alert-condition) of the condition you want to modify

## General procedure [#basic_process]

To update the entity list for a condition:

1. Locate the appropriate [entity ID](/docs/alerts/new-relic-alerts/getting-started/alerts-glossary#alert-entity); for example, [Application ID](/docs/apis/rest-api-v2/requirements/listing-host-instance-application-server-ids) and [browser ID](/docs/apis/rest-api-v2/browser-examples-v2/adding-or-listing-browser-apps-api-v2#specific-browser-app).
2. [Identify the policy ID by name or type](/docs/apm/apis/alert-examples-v2/listing-policies-api-v2#single_policy).
1. Locate the appropriate entity ID; for example, [Application ID](/docs/apis/rest-api-v2/requirements/listing-host-instance-application-server-ids) and [browser ID](/docs/apis/rest-api-v2/browser-examples-v2/add-or-list-browser-apps-api-v2/).
2. [Identify the policy ID by name or type](/docs/alerts/scale-automate/rest-api/rest-api-calls-alerts/#alert-policies).
3. Get the list of conditions associated with the policy and choose the one you want to modify for the appropriate category:
* [<InlinePopover type="apm"/>, <InlinePopover type="browser"/>, and <InlinePopover type="mobile"/>](/docs/alerts/new-relic-alerts/rest-api-alerts/rest-api-calls-new-relic-alerts#conditions)
* [APM, browser monitoring, and mobile monitoring](/docs/alerts/new-relic-alerts/rest-api-alerts/rest-api-calls-new-relic-alerts#conditions)
* [External services](/docs/alerts/new-relic-alerts/rest-api-alerts/rest-api-calls-new-relic-alerts#ext-services-conditions)
* [Synthetic monitoring](/docs/alerts/new-relic-alerts/rest-api-alerts/rest-api-calls-new-relic-alerts#synthetics-conditions)
4. Modify the condition using the [add](/docs/alerts/new-relic-alerts/rest-api-alerts/rest-api-calls-new-relic-alerts#add-entity) or [remove](/docs/alerts/new-relic-alerts/rest-api-alerts/rest-api-calls-new-relic-alerts#remove_entity) API requests.
4. Modify the condition using the add or remove [API requests](/docs/alerts/scale-automate/rest-api/rest-api-calls-alerts/#alert-entity-conditions).

<Callout variant="important">
Follow the requirements for the [minimum and maximum number of entities](/docs/alerts/new-relic-alerts/configuring-alert-policies/minimum-maximum-values) you can add to conditions.
</Callout>

## Example: Add/remove an entity [#example]
## Example: Add or remove an entity [#example]

The following example shows how to add a Ruby application named `TimberTime` in a condition and how to remove an entity from that same condition.

Expand All @@ -53,6 +53,7 @@ Only the first step in this example is unique to choosing the Ruby app as the en
1. Get the `entity_id`; for example, `application_id`:

```shell

curl -X GET 'https://api.newrelic.com/v2/applications.json' \
-H $API_KEY -i
```
Expand All @@ -62,6 +63,7 @@ Only the first step in this example is unique to choosing the Ruby app as the en
If you know the application name, use this command and specify the `app_name`:

```shell
curl -X GET 'https://api.newrelic.com/v2/applications.json' \
-H $API_KEY -i \
-d 'filter[name]=TimberTime'
Expand All @@ -81,7 +83,9 @@ Only the first step in this example is unique to choosing the Ruby app as the en
```
3. Get the `policy_id` you want to update; for example, the `TimberTime` app's `Logjam Alert` policy. To get the `policy_id`, use this command:
```shell
curl -X GET 'https://api.newrelic.com/v2/alerts_policies.json' \
-H $API_KEY -i \
-G -d 'filter[name]= Logjam Alert' # policy_name
Expand All @@ -101,7 +105,9 @@ Only the first step in this example is unique to choosing the Ruby app as the en
```
5. List all of this policy's conditions and locate the `condition_id`:
```shell
curl -X GET 'https://api.newrelic.com/v2/alerts_conditions.json' \
-H $API_KEY -i \
-G -d 'policy_id=85'
Expand Down Expand Up @@ -139,6 +145,7 @@ Only the first step in this example is unique to choosing the Ruby app as the en
To add `entity_id` 12345 to `condition_id` 234567, with `entity_type` set as `Application`:
```shell
curl -X PUT 'https://api.newrelic.com/v2/alerts_entity_conditions/12345.json' \
-H $API_KEY -i \
-H 'Content-Type: application/json' \
Expand All @@ -147,7 +154,9 @@ Only the first step in this example is unique to choosing the Ruby app as the en
To remove `entity_id` 8288171 from `condition_id` 234567, with `entity_type` set as `Application`:
```shell
curl -X DELETE 'https://api.newrelic.com/v2/alerts_entity_conditions/8288171.json' \
-H $API_KEY -i \
-G -d 'entity_type=Application&condition_id=234567'
Expand Down
Loading

0 comments on commit 6eacd45

Please sign in to comment.