当没有 table 行 update/upload 发生时设置大查询警报

Setup a Big Query Alert when no table row update/upload takes place

当超过一天没有数据上传到 Big Query table 时,为每封电子邮件设置 Big Query 警报的最佳方法是什么?我想到的是:

但我不确定这样做最快最好的方法是什么。我尝试通过 Stackdirver -> Create New Alert Ploicy

进行设置

但是没有发送邮件。虽然有些 table 几个月都没有数据...

您应该创建基于审核日志的警报。转到 Logging -> Select BigQuery,然后按插入过滤,您可以创建一个基于日志的指标,您可以基于该指标设置警报规则:

To create an alerting policy on a logs-based counter metric, do the following:

  1. Go to Logs-based metrics in the Google Cloud Console:
  2. Find the metric you want to explore and select Create alert from metric in the metric's More more_vert menu.
  3. The Conditions pane opens, with the logs-based metric you chose pre-populated in the Target dialog.
  4. In the Configuration dialog, fill in the Threshold value.
  5. Click Save, which displays the Create new alerting policy panel with your completed condition.
  6. Optional: Fill in the Notifications and Documentation sections.
  7. In the Name this policy section, enter a name for the alerting policy.
  8. Click Save.

如本页所述:https://cloud.google.com/logging/docs/logs-based-metrics/charts-and-alerts

观看此视频,其中详细解释了这一点,并提供了有关如何执行此操作的类似示例: https://youtu.be/dqoZEfJ7UbM?t=1275