I want to be able to send cloud alert to webhook (which is cloud function's https URL with authentication via SA)
How do I achieve above scenario?
Solved! Go to Solution.
Even though webhook notification channels for Cloud Monitoring do not yet support private endpoints, a Pub/Sub topic can be selected as the notification channel. Notifications will be published to the topic when they are generated, and applications can then listen to the published notifications.
This approach can be combined with a Cloud Function that is triggered by Pub/Sub topic messages. It would allow you to receive notifications in your private Cloud Function.
Even though webhook notification channels for Cloud Monitoring do not yet support private endpoints, a Pub/Sub topic can be selected as the notification channel. Notifications will be published to the topic when they are generated, and applications can then listen to the published notifications.
This approach can be combined with a Cloud Function that is triggered by Pub/Sub topic messages. It would allow you to receive notifications in your private Cloud Function.
Thank you, I am following the same approach which you have mentioned, we do have a scenario imagine organization has many projects.
What we are planing to do, centralize the approach in a project (cloud monitoring alert → pub/Sub topic → trigger with cloud function.
Later other all projects observers and developers can create alert and select above Pub/Sub topic as an alerting channel.
Note : yes, each project's service agent (cloud monitoring alert Service account) will have to give permission to publish message on Pub/Sub topic (which is in another project where we centralized the solution) we can do an automation to give permission mean time when we're creating a new project via cloud foundation team we can add this option on automation.
What do you think of this solution?
That would be a recommended solution for managing alerting and monitoring for multiple projects, as you can further review in this guide.