-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(synthetics): addition of a guide on monitors muted status EOL
- Loading branch information
1 parent
ccb7528
commit 37473dd
Showing
6 changed files
with
88 additions
and
5 deletions.
There are no files selected for viewing
83 changes: 83 additions & 0 deletions
83
website/docs/guides/upcoming_synthetics_muted_status_eol_guide.html.markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
--- | ||
layout: "newrelic" | ||
page_title: "New Relic Terraform Provider: Details on the Upcoming Synthetic Monitors' MUTED Status End-of-Life and Alternatives to Move to" | ||
sidebar_current: "docs-newrelic-provider-synthetic-monitors-muted-status-eol-guide" | ||
description: |- | ||
Use this guide to find details on the upcoming end-of-life of the MUTED status of Synthetic Monitors, and alternatives to move to, which can replicate the same behaviour. | ||
--- | ||
|
||
### About Synthetic Monitors' 'MUTED' Status and the EOL | ||
Synthetic Monitors have a `status` field that defines the activity of the monitor, and can currently be either of `ENABLED`, `DISABLED`, or `MUTED`. When a monitor is MUTED, it still functions as usual (runs tests), but is muted; i.e., it does not send out notifications in cases of failure. | ||
|
||
Since it has been announced that New Relic Synthetics will discontinue support for the `MUTED` status of monitors, slated to hit its end-of-life in February 2024 (see [this community post](https://forum.newrelic.com/s/hubtopic/aAX8W0000015BHc/endoflife-product-updates-july-2023-september-2023)), the `MUTED` value of `status` has been marked **deprecated** in the New Relic Terraform Provider, in late October 2023. The provider will also _soon_ **discontinue support** for the value `MUTED` pertaining to the `status` argument of resources operating on Synthetic Monitors, with the next major release of the provider, tentatively scheduled in December 2023. | ||
|
||
This would affect all resources in the provider used to manage Synthetic Monitors (_only if_ your configuration comprises these resources with a `status = "MUTED"` argument), i.e. | ||
* [`newrelic_synthetics_monitor`](https://registry.terraform.io/providers/newrelic/newrelic/latest/docs/resources/synthetics_monitor) | ||
* [`newrelic_synthetics_broken_links_monitor`](https://registry.terraform.io/providers/newrelic/newrelic/latest/docs/resources/synthetics_broken_links_monitor) | ||
* [`newrelic_synthetics_cert_check_monitor`](https://registry.terraform.io/providers/newrelic/newrelic/latest/docs/resources/synthetics_cert_check_monitor) | ||
* [`newrelic_synthetics_script_monitor`](https://registry.terraform.io/providers/newrelic/newrelic/latest/docs/resources/synthetics_script_monitor) | ||
* [`newrelic_synthetics_step_monitor`](https://registry.terraform.io/providers/newrelic/newrelic/latest/docs/resources/synthetics_step_monitor) | ||
|
||
Considering the above, it is highly recommended for users to refrain from using `MUTED` status with Synthetic Monitors at the earliest, and move to alternatives, which have been described in the following sections of this guide. | ||
|
||
|
||
### Alternatives To `MUTED` Status | ||
|
||
There are two key alternatives one can opt for, to replicate the behaviour of the `MUTED` status of Synthetic Monitors. | ||
* [**Alert Muting Rules**](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-notifications/muting-rules-suppress-notifications/) | ||
* Alert Muting Rules, by definition, are similar to the `MUTED` status of Synthetic Monitors in terms of behaviour, though these cater to a wider scope; all kinds of alerts. These help mute alerts on the basis of pre-defined schedules and attribute matching (when alerts match the condition(s) prescribed by the user in terms of incident event attributes, operators and values, they can be muted). See [this page](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/advanced-alerts/understand-technical-concepts/incident-event-attributes/) for a comprehensive list of attributes supported by Muting Rules. | ||
* This feature may be availed from the New Relic One UI, NerdGraph, and also via the resource [`newrelic_alert_muting_rule`](https://registry.terraform.io/providers/newrelic/newrelic/latest/docs/resources/alert_muting_rule) in the New Relic Terraform Provider. Check out the example below, for an example explaining how this resource can _exactly_ be used to substitute the `MUTED` status of a Synthetic Monitor. | ||
* [**Monitor Downtime**](https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/using-monitors/monitor-downtimes-disable-monitoring-during-scheduled-maintenance-times/) | ||
* A 'Monitor Downtime', as the name suggests, helps set up a 'downtime' or a maintenance window for Synthetic Monitors, in which period they do not run, as a result of which alerts are not raised, and no notifications are received. | ||
* This feature is currently available via the New Relic One UI. A Terraform resource to facilitate managing Monitor Downtimes is currently undergoing development, and is expected to be out by late November 2023. | ||
|
||
It is important to note the difference between the functioning of Alert Muting Rules and Monitor Downtimes when these are considered to be used as substitutes to the `MUTED` status of Synthetic Monitors. | ||
* Since Alert Muting Rules are designed to mute alerts based on conditions they match, alerts generated by checks performed by monitors are muted, but does not affect the checks performed by these monitors, which would continue to function as usual. | ||
* However, since Monitor Downtimes are dedicated to scheduling "downtime"s of monitors, no alerts would be generated by monitors in this case, as they would stop running checks for the period defined in the downtime. | ||
Users may need to choose the right alternative, based on the expected behaviour they desire, when monitors are muted. | ||
|
||
### Substituting Synthetic Monitors `MUTED` Status With Alert Muting Rules | ||
|
||
The simplest method to mute a Synthetic Monitor via the [`newrelic_alert_muting_rule`](https://registry.terraform.io/providers/newrelic/newrelic/latest/docs/resources/alert_muting_rule) resource is to use the GUID of the Synthetic Monitor in the condition used to define the muting rule, and match it against the `entity.guid` attribute in the condition. The following code snippet gives an example of the same. | ||
|
||
```hcl | ||
resource "newrelic_synthetics_monitor" "sample_synthetics_monitor" { | ||
status = "ENABLED" | ||
name = "Sample Monitor" | ||
period = "EVERY_MINUTE" | ||
uri = "https://www.one.newrelic.com" | ||
type = "BROWSER" | ||
locations_public = ["AP_SOUTH_1"] | ||
custom_header { | ||
name = "some_name" | ||
value = "some_value" | ||
} | ||
enable_screenshot_on_failure_and_script = true | ||
validation_string = "success" | ||
verify_ssl = true | ||
tag { | ||
key = "some_key" | ||
values = ["some_value"] | ||
} | ||
} | ||
resource "newrelic_alert_muting_rule" "sample_alert_muting_rule" { | ||
name = "Sample Muting Rule" | ||
enabled = true | ||
description = "A muting rule, deployed to test a muting rule with a monitor." | ||
condition { | ||
conditions { | ||
attribute = "entity.guid" | ||
operator = "EQUALS" | ||
values = [newrelic_synthetics_monitor.sample_synthetics_monitor.id] | ||
} | ||
operator = "AND" | ||
} | ||
schedule { | ||
start_time = "2023-10-31T06:30:00" | ||
end_time = "2023-11-01T16:30:00" | ||
time_zone = "America/Los_Angeles" | ||
} | ||
} | ||
``` | ||
|
||
The configuration of the muting rule may be customized, based on any apt approach identified - one of which could be to use the attribute `conditionId` in the condition, to match it against the ID of the alert condition that checks for failures of tests run by the preferred Synthetic Monitor (for instance, a `SyntheticCheck` based NRQL Alert Condition), so the muting rule is applied to any alerts originating out of the condition that evaluates monitor failures/successes. Head over to the [documentation of the resource](https://registry.terraform.io/providers/newrelic/newrelic/latest/docs/resources/alert_muting_rule) for more details on attributes supported by `condition` blocks. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters