User Tools

Site Tools


advanced:add_alerts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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://charts.windsor.ai
 +
 +{{:advanced:setup_alerts.png?800|}}
 +
 +
 +2. Create a new alert and add the query and definitions for it.
 +
 +{{:advanced:setup_alerts_definitions.png?800|}}
 +
 +Select the database and add the query and alert condition.
 +
 +For example this query checks that there is data for all last 7 days:
 +<code>
 +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(), INTERVAL 7 DAY);
 +</code>
  
advanced/add_alerts.txt ยท Last modified: 2022/02/27 16:11 by windsor_ai