Skip to content

Commit

Permalink
docs: Update NRQL alert condition migration example references in lag…
Browse files Browse the repository at this point in the history
…acy alert condition documents.

Updated the references of migration examples from legacy alert conditions to NRQL alert conditions in synthetic and infra alert condition documents. Also updated headings in migration guide  to make it more meaningful.
  • Loading branch information
vagrawal-newrelic committed Jun 28, 2024
1 parent 6cc65d0 commit 0f8e32c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
26 changes: 21 additions & 5 deletions website/docs/guides/migration_guide_alert_conditions.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ Certain subtypes of Alert Conditions (Synthetics Alert Condition and Infra Alert

Users wanting to migrate alert conditions will need to make a few adjustments to their configuration, by following the examples outlined below.

### newrelic_synthetics_alert_condition
### Migrating from Synthetics Alert Conditions to NRQL Alert Conditions

The following example illustrates changing over to an NRQL-based alert condition using the [newrelic_nrql_alert_condition](https://registry.terraform.io/providers/newrelic/newrelic/latest/docs/resources/nrql_alert_condition) resource from a Synthetics alert condition, i.e. [newrelic_synthetics_alert_condition](https://registry.terraform.io/providers/newrelic/newrelic/latest/docs/resources/nrql_alert_condition).

Below example also illustrates how argument monitor_id in synthetic alert condition should be inserted in NRQL over syntheticCheck after migration.

Example newrelic_synthetics_alert_condition:
```
Expand Down Expand Up @@ -58,7 +62,13 @@ resource "newrelic_nrql_alert_condition" "foo" {
}
```

### newrelic_infra_alert_condition: High disk usage
### Migrating from Infra Alert Conditions to NRQL Alert Conditions

The following examples illustrates changing over to an NRQL-based alert condition using the [newrelic_nrql_alert_condition](https://registry.terraform.io/providers/newrelic/newrelic/latest/docs/resources/nrql_alert_condition) resource from a Infra alert condition, i.e. [newrelic_infra_alert_condition](https://registry.terraform.io/providers/newrelic/newrelic/latest/docs/resources/infra_alert_condition).

#### newrelic_infra_alert_condition: High disk usage

The following example illustrates changing an Infra alert condition for high disk usage to an NRQL-based alert condition.

Example newrelic_infra_alert_condition:
```
Expand Down Expand Up @@ -126,7 +136,9 @@ resource "newrelic_nrql_alert_condition" "foo" {
}
```

### newrelic_infra_alert_condition: High db connection count
#### newrelic_infra_alert_condition: High db connection count

The following example illustrates changing an Infra alert condition for high DB connection count to an NRQL-based alert condition.

Example newrelic_infra_alert_condition:
```
Expand Down Expand Up @@ -182,7 +194,9 @@ resource "newrelic_nrql_alert_condition" "foo" {
}
```

### newrelic_infra_alert_condition: Process not running
#### newrelic_infra_alert_condition: Process not running

The following example illustrates changing an Infra alert condition for process not running to an NRQL-based alert condition.

Example newrelic_infra_alert_condition:
```
Expand Down Expand Up @@ -235,7 +249,9 @@ resource "newrelic_nrql_alert_condition" "foo" {
}
```

### newrelic_infra_alert_condition: Host not reporting
#### newrelic_infra_alert_condition: Host not reporting

The following example illustrates changing an Infra alert condition for host not reporting to an NRQL-based alert condition.

Example newrelic_infra_alert_condition:
```
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/infra_alert_condition.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |-

Use this resource to create and manage Infrastructure alert conditions in New Relic.

-> **WARNING:** The `newrelic_infra_alert_condition` resource is deprecated and will be removed in the next major release. The resource [newrelic_nrql_alert_condition](nrql_alert_condition.html) would be a preferred alternative to configure alert conditions - in most cases, feature parity can be achieved with a NRQL query.
-> **WARNING:** The `newrelic_infra_alert_condition` resource is deprecated and will be removed in the next major release. The resource [newrelic_nrql_alert_condition](nrql_alert_condition.html) would be a preferred alternative to configure alert conditions - in most cases, feature parity can be achieved with a NRQL query.For more details and examples on moving away from Infra alert conditions to the NRQL based alternative, please check out [these](https://registry.terraform.io/providers/newrelic/newrelic/latest/docs/guides/migration_guide_alert_conditions#migrating-from-infra-alert-conditions-to-nrql-alert-conditions) examples.

## Example Usage

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/synthetics_alert_condition.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |-

Use this resource to create and manage synthetics alert conditions in New Relic.

-> **WARNING:** The `newrelic_synthetics_alert_condition` resource is deprecated and will be removed in the next major release. The resource [newrelic_nrql_alert_condition](nrql_alert_condition.html) would be a preferred alternative to configure alert conditions - in most cases, feature parity can be achieved with a NRQL query.
-> **WARNING:** The `newrelic_synthetics_alert_condition` resource is deprecated and will be removed in the next major release. The resource [newrelic_nrql_alert_condition](nrql_alert_condition.html) would be a preferred alternative to configure alert conditions - in most cases, feature parity can be achieved with a NRQL query.For more details and examples on moving away from Synthetics alert conditions to the NRQL based alternative, please check out [this](https://registry.terraform.io/providers/newrelic/newrelic/latest/docs/guides/migration_guide_alert_conditions#migrating-from-synthetics-alert-conditions-to-nrql-alert-conditions) example.

## Example Usage

Expand Down

0 comments on commit 0f8e32c

Please sign in to comment.