【问题标题】:GCP: Is it possible for a Cloud function to trigger when an Alert fires?GCP:当警报触发时,云功能是否可以触发?
【发布时间】:2020-11-20 11:17:10
【问题描述】:

我正在使用 Google Cloud Platform 的 Google Cloud Monitoring。

我为我监控的对象创建了一些警报策略。但是,当有触发 a 的警报时,有一些我希望包含在电子邮件中的信息未包含在内。因此,我正在考虑使用云功能,如果在这种情况下可以这样做,它将触发我创建的策略之一。

如果可能,请在此问题中提供建议。

【问题讨论】:

    标签: python-3.x google-cloud-platform google-cloud-functions stackdriver google-cloud-monitoring


    【解决方案1】:

    Cloud Monitoring 支持使用 Pub/Sub 作为通知渠道:https://cloud.google.com/monitoring/support/notification-options#pubsub

    您应该能够编写一个充当 Pub/Sub 触发器来响应这些事件的云函数:https://cloud.google.com/functions/docs/calling/pubsub

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-04-04
      • 1970-01-01
      • 2021-06-22
      • 1970-01-01
      • 2020-11-11
      • 2020-08-03
      • 2021-10-31
      • 2021-11-27
      相关资源
      最近更新 更多