Skip to content

Commit

Permalink
Merge pull request #19640 from newrelic/cross-account-alert-353994
Browse files Browse the repository at this point in the history
Create cross-account-alert.mdx
  • Loading branch information
adutta-newrelic authored Jan 16, 2025
2 parents adc0e4e + 53731a8 commit 390f6ee
Show file tree
Hide file tree
Showing 7 changed files with 158 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ To learn more about specific permissions, select a category below, or try search
* <DNT>**Incidents**</DNT>: relates to [alert incidents](/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/specify-when-alerts-create-incidents) and [view incidents from our products](/docs/alerts-applied-intelligence/new-relic-alerts/alert-incidents/view-alert-incidents-our-products).
* <DNT>**Lifecycle overrides**</DNT>: relates to [muting rules](/docs/alerts-applied-intelligence/new-relic-alerts/alert-notifications/muting-rules-suppress-notifications).
* <DNT>**Policies**</DNT>: relates to [alert policies](/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/create-edit-or-find-alert-policy).
* <DNT>**Cross-account alerts**</DNT>: relates to [cross-account alerts](/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/create-edit-or-find-alert-policy).
</Collapser>

<Collapser
Expand Down
4 changes: 4 additions & 0 deletions src/content/docs/alerts/admin/user-settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@ When an issue is inactive, it won't be aggregated or correlated by our system. F
An issue is considered inactive when it has collected 5,000 incidents.

After 30 days, an inactive issue will be automatically closed.

## Cross-account alerts [#cross-account-alerts]

The cross-account alerts settings allow you to configure an alert condition to target data reported to an account other than the one that owns the condition.
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@ For all methods except for our guided mode, the process for creating an alert co

In this example, imagine that your team manages the `WebPortal` application for an ecommerce site. You want to be alerted of any latency issues.

To create a new alert condition:

* Go to [one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > <DNT>**Alerts**</DNT>.
* Select <DNT>**Alert Conditions**</DNT> in the left navigation.
* Then select <DNT>**New alert condition**</DNT>.
* Select <DNT>**Write your own query**</DNT>.

<CollapserGroup>
<Collapser
id="set-your-query"
Expand All @@ -84,14 +77,18 @@ For all methods except for our guided mode, the process for creating an alert co
### Fine-tune advanced signal settings [#advanced-signal-settings]

After you've defined your signal, click <DNT>**Run**</DNT>. A chart will appear and display the parameters that you've set.

<Callout variant="tip">
To set up cross-account alerts, select a **data account** from the drop-down list. And you can only query a data from one account for cross-account alerts at a time.
</Callout>

<img
title="set a query"
alt="A screenshot showing a user how to set the signal behavior for an alert condition."
src="/images/alerts_screenshot-crop_set-a-query.webp"
/>

For this example, the chart will show the average latency for your `WebPortal` application. Click <DNT>**Next**</DNT> and begin configuring your alert condition.
For this example, the chart will show the average duration of a transaction. Click <DNT>**Next**</DNT> and begin configuring your alert condition.

For this example, you will customize these advanced signal settings for the condition you created to monitor latency in your `WebPortal` application.

Expand Down Expand Up @@ -177,6 +174,17 @@ For all methods except for our guided mode, the process for creating an alert co

Learn more about gap-filling strategies in our [lost signal docs](/docs/apis/nerdgraph/examples/nerdgraph-api-loss-signal-gap-filling/).
</Collapser>

<Collapser
id="cross-account-alerts"
title="Cross-account alerts"
>
Cross-account alerts in New Relic enable you to set up alert conditions that monitor data from a different account than the one where the alert is configured. This feature allows for greater flexibility in monitoring and managing dependencies across multiple accounts within New Relic.

For more information, refer to [Cross-account alert](/docs/alerts/create-alert/create-alert-condition/cross-account-alert/).
</Collapser>


</CollapserGroup>
</Step>

Expand Down Expand Up @@ -344,6 +352,8 @@ For all methods except for our guided mode, the process for creating an alert co
</Step>
</Steps>

To know more about the cross-account alerts, refer to our [Cross account alerts.](/docs/alerts/create-alert/create-alert-condition/cross-account-alert)

## Edit an existing alert condition [#edit-existing-alert-condition]

If you want to edit an alert condition you've already created, you can:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
title: Cross-account alert
tags:
- Alerts
- Alert conditions
translate:
- jp
metaDescription: "Use the conditions page to identify what triggers an alert policy's notification, starting with the product and type of metric or service."
redirects:
- /docs/alerts-applied-intelligence/new-relic-alerts/get-started/your-first-nrql-condition
- /docs/alerts/alert-policies/configuring-alerts/managing-your-alerts
- /docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/alert-conditions
- /docs/alerts-applied-intelligence/new-relic-alerts/advanced-alerts/advanced-techniques/select-product-targets-alert-condition
- /docs/alerts/create-alert/create-alert-condition/create-alert-conditions
- /docs/alerts/create-alert/create-alert-condition/update-or-disable-policies-conditions
- /docs/alerts/new-relic-alerts-beta/configuring-alert-policies/define-alert-conditions
- /docs/alerts/new-relic-alerts/configuring-alert-policies/define-alert-conditions
- /docs/alerts/new-relic-alerts-beta/configuring-alert-policies/select-product-targets-alert-condition
freshnessValidatedDate: never
---

New Relic's cross-account alert option enables you to set up alert conditions that monitor data from a different account than the one where the alert is configured. This feature allows for greater flexibility in monitoring and managing dependencies across multiple accounts within New Relic.

In many organizations, different teams or departments may use separate New Relic accounts for their applications and infrastructure. Even if you are not directly responsible for an entity or data in another account, it may still be critical to your operations. For example, an application team might need to set up alerts for the hosts that run their application but are managed under a different account.

This offers several benefits to:

* **Manage** alerts across multiple accounts that you have access to, enabling a consolidated view of all relevant incidents and issues.
* **Limit** write and edit access to sensitive accounts, minimizing the need for multiple users to have permissions on accounts they do not directly manage.
* **Organize** alert configurations by reducing unnecessary alerts on accounts that serve as data sources for others.
* **Delegate** alert threshold management and governance to the appropriate teams, easing the burden on account owners.
* **Ensure** timely alerts for critical dependencies, even if they reside in different New Relic accounts.

## Get started [#get-started]

Before you start using cross-account alerts:

* You must first enable the data sharing between accounts. This is currently being done only on a per-account basis in New Relic UI.
* Organization managers will have the ability to turn the data-sharing toggle **on**.
* Alternatively, you can create a custom role with the **Cross-account conditions: Data-sharing access control** permission and assign it to the users to whom you want to grant this capability. For more information, refer to [Create custom roles](/docs/accounts/accounts-billing/new-relic-one-user-management/account-user-mgmt-tutorial/#roles/).

Once you've ensured your user has the proper role and permission, you can allow other accounts to query data from the selected account by following the below steps:

<Steps>

<Step>
Go to [one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > <DNT>**Alerts**</DNT>.
</Step>

<Step>
On the left navigation menu, select <DNT>**General**</DNT>
</Step>

<Step>
Go to **Cross-accounts**, and enable **Let other accounts query data from this account**.
</Step>

<Step>
Click **Save**.
</Step>

</Steps>

There is also an API that enables users with the appropriate roles and permissions to opt multiple accounts in or out simultaneously. For more information, refer to [Add API examples for cross-accogit unt alert elections.](/docs/apis/nerdgraph/examples/nerdgraph-api-cross-account-alerting-elections)

As long as you have at least read-only access to the data account, you can create alert conditions and query data from any account within your organization.

## Create a cross-account alert condition

You can create cross-account alerts in the following ways:

* **API**: Enter the account number you'd like your condition to target in the `dataAccountId` field in the condition builder API. For more information, refer to [NRQL condition](/docs/apis/nerdgraph/examples/nerdgraph-api-nrql-condition-alerts/#create-cross-account-alert).

-OR-

* **UI**: In the query mode of the condition builder UI, you'll see a drop-down as part of the first step. This menu lists the accounts that you can access for querying in your new alert. For more information, refer to [Create alert condition using query mode.](/docs/alerts/create-alert/create-alert-condition/alert-conditions/#advanced-signal-settings)

<Callout variant="tip">
At this time, the entity health status is not affected by any cross-account alert conditions.
</Callout>

## Restrict data sharing for cross account alerts

When an account stops sharing data (the **Let other accounts query data from this account** option is disabled), then:

* The account does not appear in the drop-down, when choosing where to query for your new alert conditions.
* Any previously created alert conditions targeting that account's data will be deleted, and evaluation will stop. All history pertaining to that condition will be deleted.

## Data visibility

Currently, when using this feature, any user with at least read access to the account that owns the alert condition can view cross-account alert condition information. This access is granted regardless of whether the user has `read` access to the originating account. Users can see:

* Condition names and details, including condition signals, facet names, etc.
* Issues and incidents pertaining to the cross account condition, including signals, facet names in the incident titles, etc.
* Workflows to set up notifications on cross account alert conditions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,43 @@ mutation {
}
```

## Create cross-account alert [#create-cross-account-alert]

Here's an example of creating a static condition:

```graphql
mutation {
alertsNrqlConditionStaticCreate(
accountId: YOUR_ACCOUNT_ID
policyId: YOUR_POLICY_ID
condition: {
name: "Low Host Count - Catastrophic"
enabled: true
nrql: {
query: "SELECT uniqueCount(host) FROM Transaction WHERE appName='my-app-name'"
dataAccountId: YOUR_DATA_ACCOUNT_ID
}
signal: {
aggregationWindow: 60
aggregationMethod: EVENT_FLOW
aggregationDelay: 120
}
terms: {
threshold: 2
thresholdOccurrences: AT_LEAST_ONCE
thresholdDuration: 600
operator: BELOW
priority: CRITICAL
}
violationTimeLimitSeconds: 86400
}
) {
id
name
}
}
```

## Update a condition [#update-condition]

Complete the following:
Expand Down
3 changes: 3 additions & 0 deletions src/nav/alerts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ pages:
pages:
- title: Alert conditions
path: /docs/alerts/create-alert/create-alert-condition/alert-conditions
pages:
- title: Cross-account alert
path: /docs/alerts/create-alert/create-alert-condition/cross-account-alert
- title: Create NRQL conditions
path: /docs/alerts/create-alert/create-alert-condition/create-nrql-alert-conditions
- title: Create (HNR) NRQL conditions
Expand Down
Binary file modified static/images/alerts_screenshot-crop_set-a-query.webp
Binary file not shown.

0 comments on commit 390f6ee

Please sign in to comment.