Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

google_monitoring_alert_policy: support "Notify on incident resolution" #8470

Comments

@yegle
Copy link

yegle commented Feb 15, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment. If the issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If the issue is assigned to a user, that user is claiming responsibility for the issue. If the issue is assigned to "hashibot", a community member has claimed the issue already.

Description

There's a new option on the web UI when editing/adding an alert policy "Notify on incident resolution" that you can uncheck, and the "RESOLVED" notification will not be triggered.

New or Affected Resource(s)

  • google_monitoring_alert_policy

Potential Terraform Configuration

# Propose what you think the configuration to take advantage of this feature should look like.
# We may not use it verbatim, but it's helpful in understanding your intent.

References

  • b/275109911
@ghost ghost added the enhancement label Feb 15, 2021
@yegle
Copy link
Author

yegle commented Feb 15, 2021

I tried to modify the policy and then use gcloud alpha monitoring policies list to show the policy, and did not see any changed fields from the output. Looks like the API does not support this option yet.

@afafara
Copy link

afafara commented Apr 12, 2021

This is now the default behaviour for new alerts: https://cloud.google.com/monitoring/docs/release-notes#April_09_2021

Cloud Monitoring has changed the default behavior for when notifications are sent. For new alerts, the default behavior is to send a notification only when the incident is created. For all alerts, the alert's Policy detail page displays when notifications are sent. To change this behavior, edit the policy. For more information, see Managing Policies.

@ahmed1smael
Copy link

For API the default is on, so it's nice to have the option to turn it off.

@Elephantei
Copy link

It would be helpful to have this option, seeing that some of the alerts do not need notification upon resolution - without this option, all of them have this by default and it makes it a very "dense" space to go through alerts.

@rbretecher-fcms
Copy link

Do you have any update on this feature ?

It would be great to have an option to disable this notification.

@rrmestl-cx
Copy link

Hello... is there an update to this feature request ?!?!?!

@gparton
Copy link

gparton commented Dec 10, 2022

PSA to those requesting this feature: Terraform can't support something that can't be achieved with the API and the API doesn't currently support this. This upstream issue to expose it in the Monitoring API needs to be addressed before the Terraform team can work on it.

modular-magician added a commit to modular-magician/terraform-provider-google that referenced this issue Aug 15, 2023
…icorp#8470)

* Allow specifying global L7 ILB in dns_record_set routing policy

* fix url_map default_service in docs

* fix forwarding rule reference in rrset for cross-region test

* don't specify region for globalL7ilb routing policy item

* add backend subnet for FR IP address provisioning

* pass backendSubnetName to cross-region L7 test case

* remove google-beta req from test backend subnet

* remove extra primary-backup examples

* add globalL7ilb value to docs

Signed-off-by: Modular Magician <[email protected]>
modular-magician added a commit that referenced this issue Aug 15, 2023
… (#15521)

* Allow specifying global L7 ILB in dns_record_set routing policy

* fix url_map default_service in docs

* fix forwarding rule reference in rrset for cross-region test

* don't specify region for globalL7ilb routing policy item

* add backend subnet for FR IP address provisioning

* pass backendSubnetName to cross-region L7 test case

* remove google-beta req from test backend subnet

* remove extra primary-backup examples

* add globalL7ilb value to docs

Signed-off-by: Modular Magician <[email protected]>
@k4leung4
Copy link

The REST API documentation shows support for notificationPrompts now.
https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.alertPolicies#alertstrategy

https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.alertPolicies#NotificationPrompt

@toVersus
Copy link
Contributor

I opened a PR to add support for this feature. I've detailed the behavior in the PR, and it worked without any issues locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment