Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Using google alert when Google Cloud Function retry successfully ?

In my GCP project, I have set up an alert to see if there is any error occurs when calling the API from my system and this rarely happens but to make sure I also enabled retry-driven for that cloud functions but is there any way to make alert also sends mail when retry is successful and this email should have custom body email like which function is failing, data response when retry successful.

Solved Solved
1 1 335
1 ACCEPTED SOLUTION

Hello @HackTD  ,Welcome on Google Cloud Community.

If you have proper metrics, you should be able to send such notification via email notification channel, as natively Operations ( aka Stackdriver ) allows you to use emails as notification endpoint. Regarding body, depends what data are obtained via metric. If metric handle such data, you should be able to use them as variables under "Documentation" section of alerting policy. You could also try to create log-based metrics and thus alerts, and obtain data from logs. Grab following links for reading more:

https://cloud.google.com/monitoring/support/notification-options <- email notification channel 

https://cloud.google.com/logging/docs/logs-based-metrics <- log-based metrics

https://cloud.google.com/logging/docs/alerting/log-based-alerts <- log-based alerts

--
cheers,
Damian Sztankowski
LinkedIn medium.com Cloudskillsboost Sessionize Youtube

View solution in original post

1 REPLY 1

Hello @HackTD  ,Welcome on Google Cloud Community.

If you have proper metrics, you should be able to send such notification via email notification channel, as natively Operations ( aka Stackdriver ) allows you to use emails as notification endpoint. Regarding body, depends what data are obtained via metric. If metric handle such data, you should be able to use them as variables under "Documentation" section of alerting policy. You could also try to create log-based metrics and thus alerts, and obtain data from logs. Grab following links for reading more:

https://cloud.google.com/monitoring/support/notification-options <- email notification channel 

https://cloud.google.com/logging/docs/logs-based-metrics <- log-based metrics

https://cloud.google.com/logging/docs/alerting/log-based-alerts <- log-based alerts

--
cheers,
Damian Sztankowski
LinkedIn medium.com Cloudskillsboost Sessionize Youtube