当没有 table 行 update/upload 发生时设置大查询警报
Setup a Big Query Alert when no table row update/upload takes place
当超过一天没有数据上传到 Big Query table 时,为每封电子邮件设置 Big Query 警报的最佳方法是什么?我想到的是:
- Stackdriver
- 发布订阅
- 云函数
但我不确定这样做最快最好的方法是什么。我尝试通过 Stackdirver -> Create New Alert Ploicy
进行设置
- 资源type:BigQuery数据集
- 指标:上传的行数
- 条件触发如果 -> 任何时间序列违反 -> 缺席 FOR 23 小时
但是没有发送邮件。虽然有些 table 几个月都没有数据...
您应该创建基于审核日志的警报。转到 Logging -> Select BigQuery,然后按插入过滤,您可以创建一个基于日志的指标,您可以基于该指标设置警报规则:
To create an alerting policy on a logs-based counter metric, do the following:
- Go to Logs-based metrics in the Google Cloud Console:
- Find the metric you want to explore and select Create alert from
metric in the metric's More more_vert menu.
- The Conditions pane opens, with the logs-based metric you chose
pre-populated in the Target dialog.
- In the Configuration dialog, fill in the Threshold value.
- Click Save, which displays the Create new alerting policy panel with
your completed condition.
- Optional: Fill in the Notifications and Documentation sections.
- In the Name this policy section, enter a name for the alerting
policy.
- Click Save.
如本页所述:https://cloud.google.com/logging/docs/logs-based-metrics/charts-and-alerts
观看此视频,其中详细解释了这一点,并提供了有关如何执行此操作的类似示例:
https://youtu.be/dqoZEfJ7UbM?t=1275
当超过一天没有数据上传到 Big Query table 时,为每封电子邮件设置 Big Query 警报的最佳方法是什么?我想到的是:
- Stackdriver
- 发布订阅
- 云函数
但我不确定这样做最快最好的方法是什么。我尝试通过 Stackdirver -> Create New Alert Ploicy
进行设置- 资源type:BigQuery数据集
- 指标:上传的行数
- 条件触发如果 -> 任何时间序列违反 -> 缺席 FOR 23 小时
但是没有发送邮件。虽然有些 table 几个月都没有数据...
您应该创建基于审核日志的警报。转到 Logging -> Select BigQuery,然后按插入过滤,您可以创建一个基于日志的指标,您可以基于该指标设置警报规则:
To create an alerting policy on a logs-based counter metric, do the following:
- Go to Logs-based metrics in the Google Cloud Console:
- Find the metric you want to explore and select Create alert from metric in the metric's More more_vert menu.
- The Conditions pane opens, with the logs-based metric you chose pre-populated in the Target dialog.
- In the Configuration dialog, fill in the Threshold value.
- Click Save, which displays the Create new alerting policy panel with your completed condition.
- Optional: Fill in the Notifications and Documentation sections.
- In the Name this policy section, enter a name for the alerting policy.
- Click Save.
如本页所述:https://cloud.google.com/logging/docs/logs-based-metrics/charts-and-alerts
观看此视频,其中详细解释了这一点,并提供了有关如何执行此操作的类似示例: https://youtu.be/dqoZEfJ7UbM?t=1275