This shows you the differences between two versions of the page.
— |
advanced:add_alerts [2022/02/27 16:11] (current) windsor_ai created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== How to add alerts to monitor data ====== | ||
+ | |||
+ | |||
+ | 1. Select the alerts menu in https:// | ||
+ | |||
+ | {{: | ||
+ | |||
+ | |||
+ | 2. Create a new alert and add the query and definitions for it. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Select the database and add the query and alert condition. | ||
+ | |||
+ | For example this query checks that there is data for all last 7 days: | ||
+ | < | ||
+ | with exchange_rate as | ||
+ | (SELECT | ||
+ | DATE(Timestamp_millis(CAST(DATE AS INT64))) AS DATE | ||
+ | FROM (SELECT CAST(DATE AS NUMERIC) AS DATE FROM jobcloud-external.mkt_windsor_ai.exchange_rates)) | ||
+ | select count(DISTINCT(date)) as number_of_days from exchange_rate where date >= DATE_SUB(CURRENT_DATE(), | ||
+ | </ | ||