Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
chore: update tb pipes and datasources (#1081)
Maximilian Kaske64c14125ca1b
diff --git a/apps/web/src/components/forms/monitor/section-scheduling.tsx b/apps/web/src/components/forms/monitor/section-scheduling.tsxindex 425e916e4..6f8b9afdf 100644--- a/apps/web/src/components/forms/monitor/section-scheduling.tsx+++ b/apps/web/src/components/forms/monitor/section-scheduling.tsx@@ -153,7 +153,6 @@ export function SectionScheduling({ form, limits, plan }: Props) {item.code,)}onCheckedChange={(checked) => {- console.log(field.value);return checked? field.onChange([...(field.valuediff --git a/packages/tinybird/datasources/__ttl_3d_mv.datasource b/packages/tinybird/datasources/__ttl_3d_mv.datasourcedeleted file mode 100644index 27fb0811b..000000000--- a/packages/tinybird/datasources/__ttl_3d_mv.datasource+++ /dev/null@@ -1,17 +0,0 @@-# Data Source created from Pipe '__ttl_3d__v0'-VERSION 0--SCHEMA >- `time` DateTime,- `latency` Int64,- `monitorId` String,- `region` LowCardinality(String),- `statusCode` Nullable(Int16),- `url` String,- `workspaceId` String,- `cronTimestamp` Int64--ENGINE "MergeTree"-ENGINE_PARTITION_KEY "toYYYYMM(time)"-ENGINE_SORTING_KEY "monitorId, time"-ENGINE_TTL "time + toIntervalDay(3)"diff --git a/packages/tinybird/datasources/__ttl_45d_mv.datasource b/packages/tinybird/datasources/__ttl_45d_mv.datasourcedeleted file mode 100644index 28a9f2dd7..000000000--- a/packages/tinybird/datasources/__ttl_45d_mv.datasource+++ /dev/null@@ -1,17 +0,0 @@-# Data Source created from Pipe '__ttl_45d__v0'-VERSION 0--SCHEMA >- `time` DateTime,- `latency` Int64,- `monitorId` String,- `region` LowCardinality(String),- `statusCode` Nullable(Int16),- `url` String,- `workspaceId` String,- `cronTimestamp` Int64--ENGINE "MergeTree"-ENGINE_PARTITION_KEY "toYYYYMM(time)"-ENGINE_SORTING_KEY "monitorId, time"-ENGINE_TTL "time + toIntervalDay(45)"diff --git a/packages/tinybird/datasources/__ttl_7d_all_mv.datasource b/packages/tinybird/datasources/__ttl_7d_all_mv.datasourcedeleted file mode 100644index c024fe107..000000000--- a/packages/tinybird/datasources/__ttl_7d_all_mv.datasource+++ /dev/null@@ -1,22 +0,0 @@-VERSION 0--# Data Source created from Pipe '__ttl_7d_all__v0'--SCHEMA >- `time` DateTime,- `latency` Int64,- `monitorId` String,- `region` LowCardinality(String),- `statusCode` Nullable(Int16),- `timestamp` Int64,- `url` String,- `workspaceId` String,- `cronTimestamp` Int64,- `message` Nullable(String),- `timing` Nullable(String),- `headers` Nullable(String)--ENGINE "MergeTree"-ENGINE_PARTITION_KEY "toYYYYMM(time)"-ENGINE_SORTING_KEY "monitorId, cronTimestamp, time"-ENGINE_TTL "time + toIntervalDay(7)"diff --git a/packages/tinybird/datasources/check_response_http.datasource b/packages/tinybird/datasources/check_response_http.datasourcenew file mode 100644index 000000000..0e286d053--- /dev/null+++ b/packages/tinybird/datasources/check_response_http.datasource@@ -0,0 +1,15 @@+VERSION 0++SCHEMA >+ `body` String `json:$.body`,+ `headers` String `json:$.headers`,+ `latency` Int32 `json:$.latency`,+ `region` String `json:$.region`,+ `requestId` Int16 `json:$.requestId`,+ `statusCode` Int16 `json:$.statusCode`,+ `timestamp` Int64 `json:$.timestamp`,+ `timing` String `json:$.timing`,+ `workspaceId` Int16 `json:$.workspaceId`++ENGINE "MergeTree"+ENGINE_SORTING_KEY "timestamp, timing, workspaceId"diff --git a/packages/tinybird/datasources/__ttl_14d_mv.datasource b/packages/tinybird/datasources/mv__http_14d.datasourcesimilarity index 61%rename from packages/tinybird/datasources/__ttl_14d_mv.datasourcerename to packages/tinybird/datasources/mv__http_14d.datasourceindex 22c76b61b..5195321a6 100644--- a/packages/tinybird/datasources/__ttl_14d_mv.datasource+++ b/packages/tinybird/datasources/mv__http_14d.datasource@@ -1,15 +1,17 @@-# Data Source created from Pipe '__ttl_14d__v0'VERSION 0+# Data Source created from Pipe 'aggregate__http_14d__v0'SCHEMA >`time` DateTime,`latency` Int64,- `monitorId` String,+ `error` Int8,`region` LowCardinality(String),+ `trigger` Nullable(String),`statusCode` Nullable(Int16),- `url` String,- `workspaceId` String,- `cronTimestamp` Int64+ `timestamp` Int64,+ `cronTimestamp` Int64,+ `monitorId` String,+ `workspaceId` StringENGINE "MergeTree"ENGINE_PARTITION_KEY "toYYYYMM(time)"diff --git a/packages/tinybird/datasources/__ttl_1d_mv.datasource b/packages/tinybird/datasources/mv__http_1d.datasourcesimilarity index 66%rename from packages/tinybird/datasources/__ttl_1d_mv.datasourcerename to packages/tinybird/datasources/mv__http_1d.datasourceindex bbd41ff36..764c43d4b 100644--- a/packages/tinybird/datasources/__ttl_1d_mv.datasource+++ b/packages/tinybird/datasources/mv__http_1d.datasource@@ -1,16 +1,17 @@-# Data Source created from Pipe '__ttl_1d__v0'VERSION 0+# Data Source created from Pipe 'aggregate__http_1d__v0'SCHEMA >`time` DateTime,`latency` Int64,- `monitorId` String,+ `error` Int8,`region` LowCardinality(String),+ `trigger` Nullable(String),`statusCode` Nullable(Int16),- `url` String,- `workspaceId` String,`timestamp` Int64,- `cronTimestamp` Int64+ `cronTimestamp` Int64,+ `monitorId` String,+ `workspaceId` StringENGINE "MergeTree"ENGINE_PARTITION_KEY "toYYYYMM(time)"diff --git a/packages/tinybird/datasources/__ttl_1h_mv.datasource b/packages/tinybird/datasources/mv__http_30d.datasourcesimilarity index 58%rename from packages/tinybird/datasources/__ttl_1h_mv.datasourcerename to packages/tinybird/datasources/mv__http_30d.datasourceindex 046855a6a..6c116f20c 100644--- a/packages/tinybird/datasources/__ttl_1h_mv.datasource+++ b/packages/tinybird/datasources/mv__http_30d.datasource@@ -1,18 +1,19 @@-# Data Source created from Pipe '__ttl_1h__v0'VERSION 0+# Data Source created from Pipe 'aggregate__http_30d__v0'SCHEMA >`time` DateTime,`latency` Int64,- `monitorId` String,+ `error` Int8,`region` LowCardinality(String),+ `trigger` Nullable(String),`statusCode` Nullable(Int16),- `url` String,- `workspaceId` String,`timestamp` Int64,- `cronTimestamp` Int64+ `cronTimestamp` Int64,+ `monitorId` String,+ `workspaceId` StringENGINE "MergeTree"ENGINE_PARTITION_KEY "toYYYYMM(time)"ENGINE_SORTING_KEY "monitorId, time"-ENGINE_TTL "time + toIntervalHour(1)"+ENGINE_TTL "time + toIntervalDay(30)"diff --git a/packages/tinybird/datasources/__ttl_7d_mv.datasource b/packages/tinybird/datasources/mv__http_7d.datasourcesimilarity index 61%rename from packages/tinybird/datasources/__ttl_7d_mv.datasourcerename to packages/tinybird/datasources/mv__http_7d.datasourceindex 0dd7f5bea..a45060c0f 100644--- a/packages/tinybird/datasources/__ttl_7d_mv.datasource+++ b/packages/tinybird/datasources/mv__http_7d.datasource@@ -1,15 +1,17 @@-# Data Source created from Pipe '__ttl_7d__v0'VERSION 0+# Data Source created from Pipe 'aggregate__http_7d__v0'SCHEMA >`time` DateTime,`latency` Int64,- `monitorId` String,+ `error` Int8,`region` LowCardinality(String),+ `trigger` Nullable(String),`statusCode` Nullable(Int16),- `url` String,- `workspaceId` String,- `cronTimestamp` Int64+ `timestamp` Int64,+ `cronTimestamp` Int64,+ `monitorId` String,+ `workspaceId` StringENGINE "MergeTree"ENGINE_PARTITION_KEY "toYYYYMM(time)"diff --git a/packages/tinybird/datasources/__ttl_45d_all_mv.datasource b/packages/tinybird/datasources/mv__http_full_30d.datasourcesimilarity index 56%rename from packages/tinybird/datasources/__ttl_45d_all_mv.datasourcerename to packages/tinybird/datasources/mv__http_full_30d.datasourceindex 1e4ed03ec..8a86b69b0 100644--- a/packages/tinybird/datasources/__ttl_45d_all_mv.datasource+++ b/packages/tinybird/datasources/mv__http_full_30d.datasource@@ -1,6 +1,5 @@VERSION 0--# Data Source created from Pipe '__ttl_45d_all__v0'+# Data Source created from Pipe 'aggregate__http_full_30d__v0'SCHEMA >`time` DateTime,@@ -8,15 +7,19 @@ SCHEMA >`monitorId` String,`region` LowCardinality(String),`statusCode` Nullable(Int16),+ `error` Int8,`timestamp` Int64,`url` String,`workspaceId` String,`cronTimestamp` Int64,`message` Nullable(String),`timing` Nullable(String),- `headers` Nullable(String)+ `headers` Nullable(String),+ `assertions` Nullable(String),+ `body` Nullable(String),+ `trigger` Nullable(String)ENGINE "MergeTree"ENGINE_PARTITION_KEY "toYYYYMM(time)"-ENGINE_SORTING_KEY "monitorId, cronTimestamp, time"-ENGINE_TTL "time + toIntervalDay(45)"+ENGINE_SORTING_KEY "monitorId, time"+ENGINE_TTL "time + toIntervalDay(30)"diff --git a/packages/tinybird/datasources/__ttl_45d_count_utc_mv.datasource b/packages/tinybird/datasources/mv__http_status_45d.datasourcesimilarity index 79%rename from packages/tinybird/datasources/__ttl_45d_count_utc_mv.datasourcerename to packages/tinybird/datasources/mv__http_status_45d.datasourceindex 9653d8658..ca1b37996 100644--- a/packages/tinybird/datasources/__ttl_45d_count_utc_mv.datasource+++ b/packages/tinybird/datasources/mv__http_status_45d.datasource@@ -1,5 +1,5 @@-# Data Source created from Pipe '__ttl_45d_count_utc__v1'-VERSION 1+VERSION 0+# Data Source created from Pipe 'aggregate__http_status_45d__v0'SCHEMA >`time` DateTime('UTC'),diff --git a/packages/tinybird/datasources/__ttl_7d_count_utc_mv.datasource b/packages/tinybird/datasources/mv__http_status_7d.datasourcesimilarity index 79%rename from packages/tinybird/datasources/__ttl_7d_count_utc_mv.datasourcerename to packages/tinybird/datasources/mv__http_status_7d.datasourceindex 03d716e7d..1c2e74fe7 100644--- a/packages/tinybird/datasources/__ttl_7d_count_utc_mv.datasource+++ b/packages/tinybird/datasources/mv__http_status_7d.datasource@@ -1,5 +1,5 @@-# Data Source created from Pipe '__ttl_7d_count_utc__v1'-VERSION 1+VERSION 0+# Data Source created from Pipe 'aggregate__http_status_7d__v0'SCHEMA >`time` DateTime('UTC'),diff --git a/packages/tinybird/datasources/mv__tcp_14d.datasource b/packages/tinybird/datasources/mv__tcp_14d.datasourcenew file mode 100644index 000000000..79098c67d--- /dev/null+++ b/packages/tinybird/datasources/mv__tcp_14d.datasource@@ -0,0 +1,18 @@+VERSION 0+# Data Source created from Pipe 'aggregate__tcp_14d__v0'++SCHEMA >+ `time` DateTime,+ `latency` Int64,+ `error` Int16,+ `region` String,+ `trigger` Nullable(String),+ `timestamp` Int64,+ `cronTimestamp` Int64,+ `monitorId` Int32,+ `workspaceId` Int32++ENGINE "MergeTree"+ENGINE_PARTITION_KEY "toYYYYMM(time)"+ENGINE_SORTING_KEY "monitorId, time"+ENGINE_TTL "time + toIntervalDay(14)"diff --git a/packages/tinybird/datasources/mv__tcp_1d.datasource b/packages/tinybird/datasources/mv__tcp_1d.datasourcenew file mode 100644index 000000000..4621e547d--- /dev/null+++ b/packages/tinybird/datasources/mv__tcp_1d.datasource@@ -0,0 +1,18 @@+VERSION 0+# Data Source created from Pipe 'aggregate__tcp_1d__v0'++SCHEMA >+ `time` DateTime,+ `latency` Int64,+ `error` Int16,+ `region` String,+ `trigger` Nullable(String),+ `timestamp` Int64,+ `cronTimestamp` Int64,+ `monitorId` Int32,+ `workspaceId` Int32++ENGINE "MergeTree"+ENGINE_PARTITION_KEY "toYYYYMM(time)"+ENGINE_SORTING_KEY "monitorId, time"+ENGINE_TTL "time + toIntervalDay(1)"diff --git a/packages/tinybird/datasources/mv__tcp_30d.datasource b/packages/tinybird/datasources/mv__tcp_30d.datasourcenew file mode 100644index 000000000..5a6185506--- /dev/null+++ b/packages/tinybird/datasources/mv__tcp_30d.datasource@@ -0,0 +1,18 @@+VERSION 0+# Data Source created from Pipe 'aggregate__tcp_30d__v0'++SCHEMA >+ `time` DateTime,+ `latency` Int64,+ `error` Int16,+ `region` String,+ `trigger` Nullable(String),+ `timestamp` Int64,+ `cronTimestamp` Int64,+ `monitorId` Int32,+ `workspaceId` Int32++ENGINE "MergeTree"+ENGINE_PARTITION_KEY "toYYYYMM(time)"+ENGINE_SORTING_KEY "monitorId, time"+ENGINE_TTL "time + toIntervalDay(30)"diff --git a/packages/tinybird/datasources/mv__tcp_7d.datasource b/packages/tinybird/datasources/mv__tcp_7d.datasourcenew file mode 100644index 000000000..278da9741--- /dev/null+++ b/packages/tinybird/datasources/mv__tcp_7d.datasource@@ -0,0 +1,18 @@+VERSION 0+# Data Source created from Pipe 'aggregate__tcp_7d__v0'++SCHEMA >+ `time` DateTime,+ `latency` Int64,+ `error` Int16,+ `region` String,+ `trigger` Nullable(String),+ `timestamp` Int64,+ `cronTimestamp` Int64,+ `monitorId` Int32,+ `workspaceId` Int32++ENGINE "MergeTree"+ENGINE_PARTITION_KEY "toYYYYMM(time)"+ENGINE_SORTING_KEY "monitorId, time"+ENGINE_TTL "time + toIntervalDay(7)"diff --git a/packages/tinybird/datasources/mv__tcp_full_30d.datasource b/packages/tinybird/datasources/mv__tcp_full_30d.datasourcenew file mode 100644index 000000000..86e7f9c46--- /dev/null+++ b/packages/tinybird/datasources/mv__tcp_full_30d.datasource@@ -0,0 +1,21 @@+VERSION 0+# Data Source created from Pipe 'aggregate__tcp_full_30d__v0'++SCHEMA >+ `time` DateTime,+ `monitorId` Int32,+ `region` String,+ `timestamp` Int64,+ `cronTimestamp` Int64,+ `timing` String,+ `workspaceId` Int32,+ `latency` Int64,+ `errorMessage` Nullable(String),+ `error` Int16,+ `trigger` Nullable(String),+ `uri` Nullable(String)++ENGINE "MergeTree"+ENGINE_PARTITION_KEY "toYYYYMM(time)"+ENGINE_SORTING_KEY "monitorId, time"+ENGINE_TTL "time + toIntervalDay(30)"diff --git a/packages/tinybird/datasources/mv__tcp_status_45d.datasource b/packages/tinybird/datasources/mv__tcp_status_45d.datasourcenew file mode 100644index 000000000..3bb59b746--- /dev/null+++ b/packages/tinybird/datasources/mv__tcp_status_45d.datasource@@ -0,0 +1,13 @@+VERSION 0+# Data Source created from Pipe 'aggregate__tcp_status_45d__v0'++SCHEMA >+ `time` DateTime('UTC'),+ `monitorId` Int32,+ `count` AggregateFunction(count),+ `ok` AggregateFunction(count, Nullable(UInt8))++ENGINE "AggregatingMergeTree"+ENGINE_PARTITION_KEY "toYYYYMM(time)"+ENGINE_SORTING_KEY "monitorId, time"+ENGINE_TTL "time + toIntervalDay(45)"diff --git a/packages/tinybird/datasources/__ttl_7d_count_mv.datasource b/packages/tinybird/datasources/mv__tcp_status_7d.datasourcesimilarity index 54%rename from packages/tinybird/datasources/__ttl_7d_count_mv.datasourcerename to packages/tinybird/datasources/mv__tcp_status_7d.datasourceindex df51e9762..e3eea9c96 100644--- a/packages/tinybird/datasources/__ttl_7d_count_mv.datasource+++ b/packages/tinybird/datasources/mv__tcp_status_7d.datasource@@ -1,14 +1,13 @@-VERSION 1-# Data Source created from Pipe '__ttl_7d_count__v1'+VERSION 0+# Data Source created from Pipe 'aggregate__tcp_status_7d__v0'SCHEMA >- `time` DateTime,- `monitorId` String,- `url` String,+ `time` DateTime('UTC'),+ `monitorId` Int32,`count` AggregateFunction(count),`ok` AggregateFunction(count, Nullable(UInt8))ENGINE "AggregatingMergeTree"ENGINE_PARTITION_KEY "toYYYYMM(time)"-ENGINE_SORTING_KEY "time, monitorId, url"+ENGINE_SORTING_KEY "monitorId, time"ENGINE_TTL "time + toIntervalDay(7)"diff --git a/packages/tinybird/datasources/ping_response.datasource b/packages/tinybird/datasources/ping_response.datasourceindex e5a17562a..750dcad0c 100644--- a/packages/tinybird/datasources/ping_response.datasource+++ b/packages/tinybird/datasources/ping_response.datasource@@ -1,10 +1,11 @@-VERSION 6+VERSION 8SCHEMA >`latency` Int64 `json:$.latency`,`monitorId` String `json:$.monitorId`,`region` LowCardinality(String) `json:$.region`,`statusCode` Nullable(Int16) `json:$.statusCode`,+ `error` Int8 `json:$.error`,`timestamp` Int64 `json:$.timestamp`,`url` String `json:$.url`,`workspaceId` String `json:$.workspaceId`,@@ -12,6 +13,9 @@ SCHEMA >`message` Nullable(String) `json:$.message`,`timing` Nullable(String) `json:$.timing`,`headers` Nullable(String) `json:$.headers`,+ `assertions` Nullable(String) `json:$.assertions`,+ `body` Nullable(String) `json:$.body`,+ `trigger` Nullable(String) `json:$.trigger`,ENGINE "MergeTree"ENGINE_SORTING_KEY "monitorId, cronTimestamp"diff --git a/packages/tinybird/datasources/tcp_response.datasource b/packages/tinybird/datasources/tcp_response.datasourceindex 1fef0008b..5d2d62f53 100644--- a/packages/tinybird/datasources/tcp_response.datasource+++ b/packages/tinybird/datasources/tcp_response.datasource@@ -6,12 +6,12 @@ SCHEMA >`timestamp` Int64 `json:$.timestamp`,`cronTimestamp` Int64 `json:$.timestamp`,`timing` String `json:$.timing`,- `uri` String `json:$.uri`,`workspaceId` Int32 `json:$.workspaceId`,`latency` Int64 `json:$.latency`,`errorMessage` Nullable(String) `json:$.errorMessage`,- `error` Int16 `json:$.error`+ `error` Int16 `json:$.error`,`trigger` Nullable(String) `json:$.trigger`,+ `uri` Nullable(String) `json:$.uri`,ENGINE "MergeTree"diff --git a/packages/tinybird/pipes/__ttl_14d.pipe b/packages/tinybird/pipes/__ttl_14d.pipedeleted file mode 100644index f5969b226..000000000--- a/packages/tinybird/pipes/__ttl_14d.pipe+++ /dev/null@@ -1,21 +0,0 @@-VERSION 1--NODE __ttl_14d_0-SQL >-- SELECT- toDateTime(fromUnixTimestamp64Milli(cronTimestamp)) AS time,- latency,- monitorId,- error,- region,- statusCode,- url,- workspaceId,- cronTimestamp- FROM ping_response__v7--TYPE materialized-DATASOURCE __ttl_14d_mv__v1--diff --git a/packages/tinybird/pipes/__ttl_14d_chart_all_regions_get.pipe b/packages/tinybird/pipes/__ttl_14d_chart_all_regions_get.pipedeleted file mode 100644index d67c1fb1d..000000000--- a/packages/tinybird/pipes/__ttl_14d_chart_all_regions_get.pipe+++ /dev/null@@ -1,23 +0,0 @@-VERSION 1-TOKEN "__ttl_14d_chart_all_regions_get__v1_endpoint_read_6659" READ--NODE __ttl_14d_chart_all_regions_get_0-SQL >-- %- SELECT- toStartOfInterval(- toDateTime(cronTimestamp / 1000), INTERVAL 1 HOUR- ) as h,- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,- round(quantile(0.5)(latency)) as p50Latency,- round(quantile(0.75)(latency)) as p75Latency,- round(quantile(0.9)(latency)) as p90Latency,- round(quantile(0.95)(latency)) as p95Latency,- round(quantile(0.99)(latency)) as p99Latency- FROM __ttl_14d_mv- WHERE monitorId = {{ String(monitorId, '1') }}- GROUP BY h- ORDER BY h DESC--diff --git a/packages/tinybird/pipes/__ttl_14d_chart_get.pipe b/packages/tinybird/pipes/__ttl_14d_chart_get.pipedeleted file mode 100644index 00ef2490c..000000000--- a/packages/tinybird/pipes/__ttl_14d_chart_get.pipe+++ /dev/null@@ -1,25 +0,0 @@-VERSION 1--NODE __ttl_14d_chart_get_0-SQL >-- %- SELECT- region,- toStartOfInterval(- toDateTime(cronTimestamp / 1000),- INTERVAL {{ Int64(interval, 30) }} MINUTE- ) as h,- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,- round(quantile(0.5)(latency)) as p50Latency,- round(quantile(0.75)(latency)) as p75Latency,- round(quantile(0.9)(latency)) as p90Latency,- round(quantile(0.95)(latency)) as p95Latency,- round(quantile(0.99)(latency)) as p99Latency- FROM __ttl_14d_mv__v1- WHERE- monitorId = {{ String(monitorId, '1') }}- GROUP BY h, region- ORDER BY h DESC--diff --git a/packages/tinybird/pipes/__ttl_14d_metrics_get.pipe b/packages/tinybird/pipes/__ttl_14d_metrics_get.pipedeleted file mode 100644index 13b8fd612..000000000--- a/packages/tinybird/pipes/__ttl_14d_metrics_get.pipe+++ /dev/null@@ -1,36 +0,0 @@-VERSION 1--NODE __ttl_14d_metrics_get_0-SQL >-- %- SELECT- round(quantile(0.5)(latency)) as p50Latency,- round(quantile(0.75)(latency)) as p75Latency,- round(quantile(0.9)(latency)) as p90Latency,- round(quantile(0.95)(latency)) as p95Latency,- round(quantile(0.99)(latency)) as p99Latency,- count() as count,- count(if(error = 0, 1, NULL)) AS ok,- max(cronTimestamp) AS lastTimestamp- FROM __ttl_14d_mv__v1- WHERE- monitorId = {{ String(monitorId, '1') }}- AND time >= toDateTime64(now() - INTERVAL 14 DAY, 3)- UNION ALL- SELECT- round(quantile(0.5)(latency)) AS p50Latency,- round(quantile(0.75)(latency)) AS p75Latency,- round(quantile(0.9)(latency)) AS p90Latency,- round(quantile(0.95)(latency)) AS p95Latency,- round(quantile(0.99)(latency)) AS p99Latency,- count() as count,- count(if(error = 0, 1, NULL)) AS ok,- NULL as lastTimestamp -- no need to query the `lastTimestamp` as not relevant- FROM __ttl_45d_mv__v1- WHERE- monitorId = {{ String(monitorId, '1') }}- AND time >= toDateTime64(now() - INTERVAL 28 DAY, 3)- AND time < toDateTime64(now() - INTERVAL 14 DAY, 3)--diff --git a/packages/tinybird/pipes/__ttl_14d_metrics_get_by_region.pipe b/packages/tinybird/pipes/__ttl_14d_metrics_get_by_region.pipedeleted file mode 100644index 160543f87..000000000--- a/packages/tinybird/pipes/__ttl_14d_metrics_get_by_region.pipe+++ /dev/null@@ -1,22 +0,0 @@-VERSION 1--NODE __ttl_14d_metrics_get_by_region_0-SQL >-- %- SELECT- region,- round(quantile(0.5)(latency)) as p50Latency,- round(quantile(0.75)(latency)) as p75Latency,- round(quantile(0.9)(latency)) as p90Latency,- round(quantile(0.95)(latency)) as p95Latency,- round(quantile(0.99)(latency)) as p99Latency,- count() as count,- count(if(error = 0, 1, NULL)) AS ok,- max(cronTimestamp) AS lastTimestamp- FROM __ttl_14d_mv__v1- WHERE- monitorId = {{ String(monitorId, '1') }}- GROUP BY region--diff --git a/packages/tinybird/pipes/__ttl_1d.pipe b/packages/tinybird/pipes/__ttl_1d.pipedeleted file mode 100644index e12b539e5..000000000--- a/packages/tinybird/pipes/__ttl_1d.pipe+++ /dev/null@@ -1,22 +0,0 @@-VERSION 1--NODE __ttl_1d_0-SQL >-- SELECT- toDateTime(fromUnixTimestamp64Milli(cronTimestamp)) AS time,- latency,- monitorId,- error,- region,- statusCode,- url,- workspaceId,- timestamp,- cronTimestamp- FROM ping_response__v8--TYPE materialized-DATASOURCE __ttl_1d_mv__v1--diff --git a/packages/tinybird/pipes/__ttl_1d_chart_get.pipe b/packages/tinybird/pipes/__ttl_1d_chart_get.pipedeleted file mode 100644index 72129941f..000000000--- a/packages/tinybird/pipes/__ttl_1d_chart_get.pipe+++ /dev/null@@ -1,27 +0,0 @@-VERSION 1--TOKEN "__ttl_1d_chart_get_endpoint_read_4815" READ--NODE __ttl_1d_chart_get_0-SQL >-- %- SELECT- region,- toStartOfInterval(- toDateTime(cronTimestamp / 1000),- INTERVAL {{ Int64(interval, 30) }} MINUTE- ) as h,- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,- round(quantile(0.5)(latency)) as p50Latency,- round(quantile(0.75)(latency)) as p75Latency,- round(quantile(0.9)(latency)) as p90Latency,- round(quantile(0.95)(latency)) as p95Latency,- round(quantile(0.99)(latency)) as p99Latency- FROM __ttl_1d_mv__v1- WHERE- monitorId = {{ String(monitorId, '1') }}- GROUP BY h, region- ORDER BY h DESC--diff --git a/packages/tinybird/pipes/__ttl_1d_list_get.pipe b/packages/tinybird/pipes/__ttl_1d_list_get.pipedeleted file mode 100644index c3b5b5b9f..000000000--- a/packages/tinybird/pipes/__ttl_1d_list_get.pipe+++ /dev/null@@ -1,13 +0,0 @@-VERSION 1--NODE __ttl_1d_list_get__v0_0-SQL >-- %- SELECT latency, monitorId, error, region, statusCode, timestamp, url, workspaceId, cronTimestamp- FROM __ttl_1d_mv__v1- WHERE- monitorId = {{ String(monitorId, '1') }}- ORDER BY cronTimestamp DESC--diff --git a/packages/tinybird/pipes/__ttl_1d_metrics_get.pipe b/packages/tinybird/pipes/__ttl_1d_metrics_get.pipedeleted file mode 100644index 20e2546fd..000000000--- a/packages/tinybird/pipes/__ttl_1d_metrics_get.pipe+++ /dev/null@@ -1,36 +0,0 @@-VERSION 1--NODE __ttl_1d_metrics_get_0-SQL >-- %- SELECT- round(quantile(0.5)(latency)) as p50Latency,- round(quantile(0.75)(latency)) as p75Latency,- round(quantile(0.9)(latency)) as p90Latency,- round(quantile(0.95)(latency)) as p95Latency,- round(quantile(0.99)(latency)) as p99Latency,- count() as count,- count(if(error = 0, 1, NULL)) AS ok,- max(cronTimestamp) AS lastTimestamp- FROM __ttl_1d_mv__v1- WHERE- monitorId = {{ String(monitorId, '1') }}- AND time >= toDateTime64(now() - INTERVAL 1 DAY, 3)- UNION ALL- SELECT- round(quantile(0.5)(latency)) AS p50Latency,- round(quantile(0.75)(latency)) AS p75Latency,- round(quantile(0.9)(latency)) AS p90Latency,- round(quantile(0.95)(latency)) AS p95Latency,- round(quantile(0.99)(latency)) AS p99Latency,- count() as count,- count(if(error = 0, 1, NULL)) AS ok,- NULL as lastTimestamp -- no need to query the `lastTimestamp` as not relevant- FROM __ttl_3d_mv__v1- WHERE- monitorId = {{ String(monitorId, '1') }}- AND time >= toDateTime64(now() - INTERVAL 2 DAY, 3)- AND time < toDateTime64(now() - INTERVAL 1 DAY, 3)--diff --git a/packages/tinybird/pipes/__ttl_1d_metrics_get_by_region.pipe b/packages/tinybird/pipes/__ttl_1d_metrics_get_by_region.pipedeleted file mode 100644index d6b551c7c..000000000--- a/packages/tinybird/pipes/__ttl_1d_metrics_get_by_region.pipe+++ /dev/null@@ -1,21 +0,0 @@-VERSION 1--NODE __ttl_1d_metrics_get_by_region_0-SQL >-- %- SELECT- region,- round(quantile(0.5)(latency)) as p50Latency,- round(quantile(0.75)(latency)) as p75Latency,- round(quantile(0.9)(latency)) as p90Latency,- round(quantile(0.95)(latency)) as p95Latency,- round(quantile(0.99)(latency)) as p99Latency,- count() as count,- count(if(error = 0, 1, NULL)) AS ok- FROM __ttl_1d_mv__v1- WHERE- monitorId = {{ String(monitorId, '1') }}- GROUP BY region--diff --git a/packages/tinybird/pipes/__ttl_1h.pipe b/packages/tinybird/pipes/__ttl_1h.pipedeleted file mode 100644index 3886bb361..000000000--- a/packages/tinybird/pipes/__ttl_1h.pipe+++ /dev/null@@ -1,22 +0,0 @@-VERSION 1--NODE __ttl_1h_0-SQL >-- SELECT- toDateTime(fromUnixTimestamp64Milli(cronTimestamp)) AS time,- latency,- monitorId,- error,- region,- statusCode,- url,- workspaceId,- timestamp,- cronTimestamp- FROM ping_response__v8--TYPE materialized-DATASOURCE __ttl_1h_mv__v1--diff --git a/packages/tinybird/pipes/__ttl_1h_chart_get.pipe b/packages/tinybird/pipes/__ttl_1h_chart_get.pipedeleted file mode 100644index fa999b069..000000000--- a/packages/tinybird/pipes/__ttl_1h_chart_get.pipe+++ /dev/null@@ -1,25 +0,0 @@-VERSION 1--NODE __ttl_1h_chart_get_0-SQL >-- %- SELECT- region,- toStartOfInterval(- toDateTime(cronTimestamp / 1000),- INTERVAL {{ Int64(interval, 30) }} MINUTE- ) as h,- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,- round(quantile(0.5)(latency)) as p50Latency,- round(quantile(0.75)(latency)) as p75Latency,- round(quantile(0.9)(latency)) as p90Latency,- round(quantile(0.95)(latency)) as p95Latency,- round(quantile(0.99)(latency)) as p99Latency- FROM __ttl_1h_mv__v1- WHERE- monitorId = {{ String(monitorId, '1') }}- GROUP BY h, region- ORDER BY h DESC--diff --git a/packages/tinybird/pipes/__ttl_1h_last_timestamp_monitor_get.pipe b/packages/tinybird/pipes/__ttl_1h_last_timestamp_monitor_get.pipedeleted file mode 100644index 4ec0173e5..000000000--- a/packages/tinybird/pipes/__ttl_1h_last_timestamp_monitor_get.pipe+++ /dev/null@@ -1,12 +0,0 @@-VERSION 1--NODE __ttl_1h_last_timestamp_monitor_get__v0_0-SQL >-- %- SELECT max(cronTimestamp) as cronTimestamp- FROM __ttl_1h_mv__v1- WHERE- monitorId = {{ String(monitorId, '1') }}--diff --git a/packages/tinybird/pipes/__ttl_1h_last_timestamp_workspace_get.pipe b/packages/tinybird/pipes/__ttl_1h_last_timestamp_workspace_get.pipedeleted file mode 100644index a86ee3131..000000000--- a/packages/tinybird/pipes/__ttl_1h_last_timestamp_workspace_get.pipe+++ /dev/null@@ -1,11 +0,0 @@-VERSION 1--NODE __ttl_1h_last_timestamp_workspace_get__v0_0-SQL >-- %- SELECT max(cronTimestamp) as cronTimestamp- FROM __ttl_1h_mv__v1- WHERE workspaceId = {{ String(workspaceId, '1') }}--diff --git a/packages/tinybird/pipes/__ttl_1h_list_get.pipe b/packages/tinybird/pipes/__ttl_1h_list_get.pipedeleted file mode 100644index 0e9c1dbf8..000000000--- a/packages/tinybird/pipes/__ttl_1h_list_get.pipe+++ /dev/null@@ -1,14 +0,0 @@-VERSION 1--NODE __ttl_1h_list_get__v0_0-SQL >-- %- -- FIXME: `timestamp` is missing on 1h, 3d, 7d, 45d mv!- SELECT latency, monitorId, error, region, statusCode, url, workspaceId, cronTimestamp, timestamp- FROM __ttl_1h_mv__v1- WHERE- monitorId = {{ String(monitorId, '1') }}- ORDER BY cronTimestamp DESC--diff --git a/packages/tinybird/pipes/__ttl_1h_metrics_get.pipe b/packages/tinybird/pipes/__ttl_1h_metrics_get.pipedeleted file mode 100644index 2f6378843..000000000--- a/packages/tinybird/pipes/__ttl_1h_metrics_get.pipe+++ /dev/null@@ -1,36 +0,0 @@-VERSION 1--NODE __ttl_1h_metrics_get_0-SQL >-- %- SELECT- round(quantile(0.5)(latency)) as p50Latency,- round(quantile(0.75)(latency)) as p75Latency,- round(quantile(0.9)(latency)) as p90Latency,- round(quantile(0.95)(latency)) as p95Latency,- round(quantile(0.99)(latency)) as p99Latency,- count() as count,- count(if(error = 0, 1, NULL)) AS ok,- max(cronTimestamp) AS lastTimestamp- FROM __ttl_1h_mv__v1- WHERE- monitorId = {{ String(monitorId, '1') }}- AND time >= toDateTime64(now() - INTERVAL 1 HOUR, 3)- UNION ALL- SELECT- round(quantile(0.5)(latency)) AS p50Latency,- round(quantile(0.75)(latency)) AS p75Latency,- round(quantile(0.9)(latency)) AS p90Latency,- round(quantile(0.95)(latency)) AS p95Latency,- round(quantile(0.99)(latency)) AS p99Latency,- count() as count,- count(if(error = 0, 1, NULL)) AS ok,- NULL as lastTimestamp -- no need to query the `lastTimestamp` as not relevant- FROM __ttl_1d_mv__v1- WHERE- monitorId = {{ String(monitorId, '1') }}- AND time >= toDateTime64(now() - INTERVAL 2 HOUR, 3)- AND time < toDateTime64(now() - INTERVAL 1 HOUR, 3)--diff --git a/packages/tinybird/pipes/__ttl_1h_metrics_get_by_region.pipe b/packages/tinybird/pipes/__ttl_1h_metrics_get_by_region.pipedeleted file mode 100644index fe3f91e11..000000000--- a/packages/tinybird/pipes/__ttl_1h_metrics_get_by_region.pipe+++ /dev/null@@ -1,21 +0,0 @@-VERSION 1--NODE __ttl_1h_metrics_get_by_region_0-SQL >-- %- SELECT- region,- round(quantile(0.5)(latency)) as p50Latency,- round(quantile(0.75)(latency)) as p75Latency,- round(quantile(0.9)(latency)) as p90Latency,- round(quantile(0.95)(latency)) as p95Latency,- round(quantile(0.99)(latency)) as p99Latency,- count() as count,- count(if(error = 0, 1, NULL)) AS ok,- FROM __ttl_1h_mv__v1- WHERE- monitorId = {{ String(monitorId, '1') }}- GROUP BY region--diff --git a/packages/tinybird/pipes/__ttl_3d.pipe b/packages/tinybird/pipes/__ttl_3d.pipedeleted file mode 100644index 5d3b6a8f2..000000000--- a/packages/tinybird/pipes/__ttl_3d.pipe+++ /dev/null@@ -1,22 +0,0 @@-VERSION 1--NODE __ttl_3d_0-SQL >-- SELECT- toDateTime(fromUnixTimestamp64Milli(cronTimestamp)) AS time,- latency,- monitorId,- error,- region,- statusCode,- url,- workspaceId,- cronTimestamp,- timestamp- FROM ping_response__v8--TYPE materialized-DATASOURCE __ttl_3d_mv__v1--diff --git a/packages/tinybird/pipes/__ttl_3d_chart_get.pipe b/packages/tinybird/pipes/__ttl_3d_chart_get.pipedeleted file mode 100644index 68e271694..000000000--- a/packages/tinybird/pipes/__ttl_3d_chart_get.pipe+++ /dev/null@@ -1,25 +0,0 @@-VERSION 1--NODE __ttl_3d_chart_get_0-SQL >-- %- SELECT- region,- toStartOfInterval(- toDateTime(cronTimestamp / 1000),- INTERVAL {{ Int64(interval, 30) }} MINUTE- ) as h,- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,- round(quantile(0.5)(latency)) as p50Latency,- round(quantile(0.75)(latency)) as p75Latency,- round(quantile(0.9)(latency)) as p90Latency,- round(quantile(0.95)(latency)) as p95Latency,- round(quantile(0.99)(latency)) as p99Latency- FROM __ttl_3d_mv__v0- WHERE- monitorId = {{ String(monitorId, '1') }}- GROUP BY h, region- ORDER BY h DESC--diff --git a/packages/tinybird/pipes/__ttl_3d_list_get.pipe b/packages/tinybird/pipes/__ttl_3d_list_get.pipedeleted file mode 100644index a3a2339d4..000000000--- a/packages/tinybird/pipes/__ttl_3d_list_get.pipe+++ /dev/null@@ -1,14 +0,0 @@-VERSION 1--NODE __ttl_3d_list_get__v1_0-SQL >-- %- SELECT latency, monitorId, error, region, statusCode, url, workspaceId, cronTimestamp, timestamp- FROM __ttl_3d_mv__v1- WHERE- monitorId = {{ String(monitorId, '1') }}- {% if defined(url) %} AND url = {{ String(url) }} {% end %}- ORDER BY cronTimestamp DESC--diff --git a/packages/tinybird/pipes/__ttl_3d_metrics_get.pipe b/packages/tinybird/pipes/__ttl_3d_metrics_get.pipedeleted file mode 100644index 157dad7f4..000000000--- a/packages/tinybird/pipes/__ttl_3d_metrics_get.pipe+++ /dev/null@@ -1,36 +0,0 @@-VERSION 1--NODE __ttl_3d_metrics_get_0-SQL >-- %- SELECT- round(quantile(0.5)(latency)) as p50Latency,- round(quantile(0.75)(latency)) as p75Latency,- round(quantile(0.9)(latency)) as p90Latency,- round(quantile(0.95)(latency)) as p95Latency,- round(quantile(0.99)(latency)) as p99Latency,- count() as count,- count(if(error = 0, 1, NULL)) AS ok,- max(cronTimestamp) AS lastTimestamp- FROM __ttl_3d_mv__v1- WHERE- monitorId = {{ String(monitorId, '1') }}- AND time >= toDateTime64(now() - INTERVAL 3 DAY, 3)- UNION ALL- SELECT- round(quantile(0.5)(latency)) AS p50Latency,- round(quantile(0.75)(latency)) AS p75Latency,- round(quantile(0.9)(latency)) AS p90Latency,- round(quantile(0.95)(latency)) AS p95Latency,- round(quantile(0.99)(latency)) AS p99Latency,- count() as count,- count(if(error = 0, 1, NULL)) AS ok,- NULL as lastTimestamp -- no need to query the `lastTimestamp` as not relevant- FROM __ttl_7d_mv__v1- WHERE- monitorId = {{ String(monitorId, '1') }}- AND time >= toDateTime64(now() - INTERVAL 6 DAY, 3)- AND time < toDateTime64(now() - INTERVAL 3 DAY, 3)--diff --git a/packages/tinybird/pipes/__ttl_3d_metrics_get_by_region.pipe b/packages/tinybird/pipes/__ttl_3d_metrics_get_by_region.pipedeleted file mode 100644index e04067d7b..000000000--- a/packages/tinybird/pipes/__ttl_3d_metrics_get_by_region.pipe+++ /dev/null@@ -1,22 +0,0 @@-VERSION 1--NODE __ttl_3d_metrics_get_by_region_0-SQL >-- %- SELECT- region,- round(quantile(0.5)(latency)) as p50Latency,- round(quantile(0.75)(latency)) as p75Latency,- round(quantile(0.9)(latency)) as p90Latency,- round(quantile(0.95)(latency)) as p95Latency,- round(quantile(0.99)(latency)) as p99Latency,- count() as count,- count(if(error = 0, 1, NULL)) AS ok,- max(cronTimestamp) AS lastTimestamp- FROM __ttl_3d_mv__v0- WHERE- monitorId = {{ String(monitorId, '1') }}- GROUP BY region--diff --git a/packages/tinybird/pipes/__ttl_45d.pipe b/packages/tinybird/pipes/__ttl_45d.pipedeleted file mode 100644index f7287ee2c..000000000--- a/packages/tinybird/pipes/__ttl_45d.pipe+++ /dev/null@@ -1,20 +0,0 @@-VERSION 1--NODE __ttl_45d_0-SQL >-- SELECT- toStartOfDay(fromUnixTimestamp64Milli(cronTimestamp)) AS time,- latency,- monitorId,- region,- statusCode,- url,- workspaceId,- cronTimestamp- FROM ping_response__v8--TYPE materialized-DATASOURCE __ttl_45d_mv__v1--diff --git a/packages/tinybird/pipes/__ttl_45d_all.pipe b/packages/tinybird/pipes/__ttl_45d_all.pipedeleted file mode 100644index 3956a0fa0..000000000--- a/packages/tinybird/pipes/__ttl_45d_all.pipe+++ /dev/null@@ -1,11 +0,0 @@-VERSION 1--NODE __ttl_45d_all_0-SQL >-- SELECT toDateTime(fromUnixTimestamp64Milli(cronTimestamp)) AS time, * FROM ping_response__v8--TYPE materialized-DATASOURCE __ttl_45d_all_mv__v1--diff --git a/packages/tinybird/pipes/__ttl_45d_all_details_get.pipe b/packages/tinybird/pipes/__ttl_45d_all_details_get.pipedeleted file mode 100644index 825b1399d..000000000--- a/packages/tinybird/pipes/__ttl_45d_all_details_get.pipe+++ /dev/null@@ -1,14 +0,0 @@-VERSION 1--NODE __ttl_45d_all_details_get_0-SQL >-- %- SELECT *- from __ttl_45d_all_mv__v1- WHERE- monitorId = {{ String(monitorId, '1') }}- AND cronTimestamp = {{ Int64(cronTimestamp, 1709477432205) }}- AND region = {{ String(region, 'ams') }}--diff --git a/packages/tinybird/pipes/__ttl_45d_count_utc.pipe b/packages/tinybird/pipes/__ttl_45d_count_utc.pipedeleted file mode 100644index e3796dcf4..000000000--- a/packages/tinybird/pipes/__ttl_45d_count_utc.pipe+++ /dev/null@@ -1,23 +0,0 @@-VERSION 1--DESCRIPTION >- TODO: descripe what it is for!---NODE __ttl_45d_count_utc_0-SQL >-- SELECT- toStartOfDay(toTimeZone(time, 'UTC')) AS time,- monitorId,- countState() AS count,- countState(if(error = 0, 1, NULL)) AS ok- FROM __ttl_45d_mv__v1- GROUP BY- time,- monitorId--TYPE materialized-DATASOURCE __ttl_45d_count_utc_mv__v1--diff --git a/packages/tinybird/pipes/__ttl_45d_count_utc_get.pipe b/packages/tinybird/pipes/__ttl_45d_count_utc_get.pipeindex c21f323ee..8270880ff 100644--- a/packages/tinybird/pipes/__ttl_45d_count_utc_get.pipe+++ b/packages/tinybird/pipes/__ttl_45d_count_utc_get.pipe@@ -1,11 +1,12 @@VERSION 1+TOKEN "__ttl_45d_count_utc_get__v1_endpoint_read_7956" READNODE __ttl_45d_count_utc_get_0SQL >%SELECT time as day, countMerge(count) as count, countMerge(ok) as ok- FROM __ttl_45d_count_utc_mv__v1+ FROM mv__http_status_45dWHEREmonitorId = {{ String(monitorId, '4') }}GROUP BY day@@ -14,7 +15,7 @@ SQL >FROMtoStartOfDay(toStartOfDay(toTimeZone(now(), 'UTC')))TO toStartOfDay(- date_sub(DAY, 7, now())+ date_sub(DAY, 45, now())) STEP INTERVAL -1 DAYdiff --git a/packages/tinybird/pipes/__ttl_45d_statuspage_get.pipe b/packages/tinybird/pipes/__ttl_45d_statuspage_get.pipedeleted file mode 100644index 079283d98..000000000--- a/packages/tinybird/pipes/__ttl_45d_statuspage_get.pipe+++ /dev/null@@ -1,38 +0,0 @@-VERSION 1-TOKEN "__ttl_45d_statuspage_get_endpoint_read_1959" READ--NODE __ttl_45d_statuspage_get_0-SQL >-- %- SELECT- toDateTime(cronTimestamp / 1000, 'UTC') AS day,- -- only for debugging purposes- toTimezone(day, {{ String(timezone, 'Europe/London') }}) as with_timezone,- toStartOfDay(with_timezone) as start_of_day,- statusCode- -- latency- FROM __ttl_45d_mv- WHERE monitorId = {{ String(monitorId, '4') }}----NODE __ttl_7d_statuspage_get_1-SQL >-- %- SELECT- start_of_day as day,- count() AS count,- count(multiIf((statusCode >= 200) AND (statusCode <= 299), 1, NULL)) AS ok- FROM __ttl_45d_statuspage_get_0- GROUP BY start_of_day- ORDER BY start_of_day DESC- WITH FILL- FROM- toStartOfDay(toTimezone(now(), {{ String(timezone, 'Europe/London') }}))- TO toStartOfDay(- toTimezone(date_sub(DAY, 46, now()), {{ String(timezone, 'Europe/London') }})- ) STEP INTERVAL -1 DAY--diff --git a/packages/tinybird/pipes/__ttl_7d.pipe b/packages/tinybird/pipes/__ttl_7d.pipedeleted file mode 100644index 953600f64..000000000--- a/packages/tinybird/pipes/__ttl_7d.pipe+++ /dev/null@@ -1,22 +0,0 @@-VERSION 1--NODE __ttl_7d_0-SQL >-- SELECT- toDateTime(fromUnixTimestamp64Milli(cronTimestamp)) AS time,- latency,- monitorId,- error- region,- statusCode,- url,- workspaceId,- cronTimestamp,- timestamp- FROM ping_response__v8--TYPE materialized-DATASOURCE __ttl_7d_mv__v1--diff --git a/packages/tinybird/pipes/__ttl_7d_all.pipe b/packages/tinybird/pipes/__ttl_7d_all.pipedeleted file mode 100644index 387f5981d..000000000--- a/packages/tinybird/pipes/__ttl_7d_all.pipe+++ /dev/null@@ -1,11 +0,0 @@-VERSION 1--NODE __ttl_7d_all_0-SQL >-- SELECT toDateTime(fromUnixTimestamp64Milli(cronTimestamp)) AS time, * FROM ping_response__v8--TYPE materialized-DATASOURCE __ttl_7d_all_mv__v1--diff --git a/packages/tinybird/pipes/__ttl_7d_all_details_get.pipe b/packages/tinybird/pipes/__ttl_7d_all_details_get.pipedeleted file mode 100644index 4333819d4..000000000--- a/packages/tinybird/pipes/__ttl_7d_all_details_get.pipe+++ /dev/null@@ -1,14 +0,0 @@-VERSION 1--NODE __ttl_7d_all_details_get_0-SQL >-- %- SELECT *- from __ttl_7d_all_mv__v1- WHERE- monitorId = {{ String(monitorId, '1') }}- AND cronTimestamp = {{ Int64(cronTimestamp, 1709477432205) }}- AND region = {{ String(region, 'ams') }}--diff --git a/packages/tinybird/pipes/__ttl_7d_chart_all_regions_get.pipe b/packages/tinybird/pipes/__ttl_7d_chart_all_regions_get.pipedeleted file mode 100644index 86ab46c49..000000000--- a/packages/tinybird/pipes/__ttl_7d_chart_all_regions_get.pipe+++ /dev/null@@ -1,23 +0,0 @@-VERSION 1-TOKEN "__ttl_7d_chart_all_regions_get__v1_endpoint_read_8648" READ--NODE __ttl_7d_chart_all_regions_get_0-SQL >-- %- SELECT- toStartOfInterval(- toDateTime(cronTimestamp / 1000), INTERVAL 1 HOUR- ) as h,- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,- round(quantile(0.5)(latency)) as p50Latency,- round(quantile(0.75)(latency)) as p75Latency,- round(quantile(0.9)(latency)) as p90Latency,- round(quantile(0.95)(latency)) as p95Latency,- round(quantile(0.99)(latency)) as p99Latency- FROM __ttl_7d_mv- WHERE monitorId = {{ String(monitorId, '1') }}- GROUP BY h- ORDER BY h DESC--diff --git a/packages/tinybird/pipes/__ttl_7d_chart_get.pipe b/packages/tinybird/pipes/__ttl_7d_chart_get.pipedeleted file mode 100644index f0483396b..000000000--- a/packages/tinybird/pipes/__ttl_7d_chart_get.pipe+++ /dev/null@@ -1,25 +0,0 @@-VERSION 1--NODE __ttl_7d_chart_get_0-SQL >-- %- SELECT- region,- toStartOfInterval(- toDateTime(cronTimestamp / 1000),- INTERVAL {{ Int64(interval, 30) }} MINUTE- ) as h,- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,- round(quantile(0.5)(latency)) as p50Latency,- round(quantile(0.75)(latency)) as p75Latency,- round(quantile(0.9)(latency)) as p90Latency,- round(quantile(0.95)(latency)) as p95Latency,- round(quantile(0.99)(latency)) as p99Latency- FROM __ttl_7d_mv__v1- WHERE- monitorId = {{ String(monitorId, '1') }}- GROUP BY h, region- ORDER BY h DESC--diff --git a/packages/tinybird/pipes/__ttl_7d_count.pipe b/packages/tinybird/pipes/__ttl_7d_count.pipedeleted file mode 100644index 8c13b8259..000000000--- a/packages/tinybird/pipes/__ttl_7d_count.pipe+++ /dev/null@@ -1,24 +0,0 @@-VERSION 1-DESCRIPTION >- TODO: descripe what it is for!---NODE __ttl_7d_count_0-SQL >-- SELECT- time,- monitorId,- url,- countState() AS count,- countState(if(error = 0, 1, NULL)) AS ok- FROM __ttl_45d_mv- GROUP BY- time,- monitorId,- url--TYPE materialized-DATASOURCE __ttl_7d_count_mv--diff --git a/packages/tinybird/pipes/__ttl_7d_count_get.pipe b/packages/tinybird/pipes/__ttl_7d_count_get.pipedeleted file mode 100644index 2dbd4bc14..000000000--- a/packages/tinybird/pipes/__ttl_7d_count_get.pipe+++ /dev/null@@ -1,22 +0,0 @@-VERSION 1-TOKEN "__ttl_7d_count_get__v1_endpoint_read_7412" READ--NODE __ttl_7d_count_get_0-SQL >-- %- SELECT time as day, countMerge(count) as count, countMerge(ok) as ok- FROM __ttl_7d_count_mv_test- WHERE- monitorId = {{ String(monitorId, '4') }}- {% if defined(url) %} AND url = {{ String(url) }} {% end %}- GROUP BY day- ORDER BY day DESC- WITH FILL- FROM- toStartOfDay(now())- TO toStartOfDay(- date_sub(DAY, 7, now())- ) STEP INTERVAL -1 DAY--diff --git a/packages/tinybird/pipes/__ttl_7d_count_utc.pipe b/packages/tinybird/pipes/__ttl_7d_count_utc.pipedeleted file mode 100644index d5958cfa2..000000000--- a/packages/tinybird/pipes/__ttl_7d_count_utc.pipe+++ /dev/null@@ -1,23 +0,0 @@-VERSION 1--DESCRIPTION >- TODO: descripe what it is for!---NODE __ttl_7d_count_utc_0-SQL >-- SELECT- toStartOfDay(toTimeZone(time, 'UTC')) AS time,- monitorId,- countState() AS count,- countState(if(error = 0, 1, NULL)) AS ok- FROM __ttl_7d_mv__v1- GROUP BY- time,- monitorId--TYPE materialized-DATASOURCE __ttl_7d_count_utc_mv__v1--diff --git a/packages/tinybird/pipes/__ttl_7d_count_utc_get.pipe b/packages/tinybird/pipes/__ttl_7d_count_utc_get.pipedeleted file mode 100644index 8b6ae3408..000000000--- a/packages/tinybird/pipes/__ttl_7d_count_utc_get.pipe+++ /dev/null@@ -1,20 +0,0 @@-VERSION 1--NODE __ttl_7d_count_utc_get_0-SQL >-- %- SELECT time as day, countMerge(count) as count, countMerge(ok) as ok- FROM __ttl_7d_count_utc_mv__v1- WHERE- monitorId = {{ String(monitorId, '4') }}- GROUP BY day- ORDER BY day DESC- WITH FILL- FROM- toStartOfDay(toStartOfDay(toTimeZone(now(), 'UTC')))- TO toStartOfDay(- date_sub(DAY, 7, now())- ) STEP INTERVAL -1 DAY--diff --git a/packages/tinybird/pipes/__ttl_7d_list_get.pipe b/packages/tinybird/pipes/__ttl_7d_list_get.pipedeleted file mode 100644index 87225dfe3..000000000--- a/packages/tinybird/pipes/__ttl_7d_list_get.pipe+++ /dev/null@@ -1,14 +0,0 @@-VERSION 1--NODE __ttl_7d_list_get__v1_0-SQL >-- %- SELECT latency, monitorId, error, region, statusCode, url, workspaceId, cronTimestamp, timestamp- FROM __ttl_7d_mv__v1- WHERE- monitorId = {{ String(monitorId, '1') }}- {% if defined(url) %} AND url = {{ String(url) }} {% end %}- ORDER BY cronTimestamp DESC--diff --git a/packages/tinybird/pipes/__ttl_7d_metrics_get.pipe b/packages/tinybird/pipes/__ttl_7d_metrics_get.pipedeleted file mode 100644index 343bfa886..000000000--- a/packages/tinybird/pipes/__ttl_7d_metrics_get.pipe+++ /dev/null@@ -1,36 +0,0 @@-VERSION 1--NODE __ttl_7d_metrics_get_0-SQL >-- %- SELECT- round(quantile(0.5)(latency)) as p50Latency,- round(quantile(0.75)(latency)) as p75Latency,- round(quantile(0.9)(latency)) as p90Latency,- round(quantile(0.95)(latency)) as p95Latency,- round(quantile(0.99)(latency)) as p99Latency,- count() as count,- count(if(error = 0, 1, NULL)) AS ok,- max(cronTimestamp) AS lastTimestamp- FROM __ttl_7d_mv__v1- WHERE- monitorId = {{ String(monitorId, '1') }}- AND time >= toDateTime64(now() - INTERVAL 7 DAY, 3)- UNION ALL- SELECT- round(quantile(0.5)(latency)) AS p50Latency,- round(quantile(0.75)(latency)) AS p75Latency,- round(quantile(0.9)(latency)) AS p90Latency,- round(quantile(0.95)(latency)) AS p95Latency,- round(quantile(0.99)(latency)) AS p99Latency,- count() as count,- count(if(error = 0, 1, NULL)) AS ok,- NULL as lastTimestamp -- no need to query the `lastTimestamp` as not relevant- FROM __ttl_14d_mv__v1- WHERE- monitorId = {{ String(monitorId, '1') }}- AND time >= toDateTime64(now() - INTERVAL 14 DAY, 3)- AND time < toDateTime64(now() - INTERVAL 7 DAY, 3)--diff --git a/packages/tinybird/pipes/__ttl_7d_metrics_get_by_region.pipe b/packages/tinybird/pipes/__ttl_7d_metrics_get_by_region.pipedeleted file mode 100644index a06a73424..000000000--- a/packages/tinybird/pipes/__ttl_7d_metrics_get_by_region.pipe+++ /dev/null@@ -1,22 +0,0 @@-VERSION 1--NODE __ttl_7d_metrics_get_by_region_0-SQL >-- %- SELECT- region,- round(quantile(0.5)(latency)) as p50Latency,- round(quantile(0.75)(latency)) as p75Latency,- round(quantile(0.9)(latency)) as p90Latency,- round(quantile(0.95)(latency)) as p95Latency,- round(quantile(0.99)(latency)) as p99Latency,- count() as count,- count(if(error = 0, 1, NULL)) AS ok,- max(cronTimestamp) AS lastTimestamp- FROM __ttl_7d_mv__v1- WHERE- monitorId = {{ String(monitorId, '1') }}- GROUP BY region--diff --git a/packages/tinybird/pipes/__ttl_7d_statuspage_get.pipe b/packages/tinybird/pipes/__ttl_7d_statuspage_get.pipedeleted file mode 100644index 397c58d46..000000000--- a/packages/tinybird/pipes/__ttl_7d_statuspage_get.pipe+++ /dev/null@@ -1,38 +0,0 @@-VERSION 1-TOKEN "__ttl_7d_statuspage_get_endpoint_read_0234" READ--NODE __ttl_7d_statuspage_get_0-SQL >-- %- SELECT- toDateTime(cronTimestamp / 1000, 'UTC') AS day,- -- only for debugging purposes- toTimezone(day, {{ String(timezone, 'Europe/London') }}) as with_timezone,- toStartOfDay(with_timezone) as start_of_day,- statusCode- -- latency- FROM __ttl_7d_mv- WHERE monitorId = {{ String(monitorId, '4') }}----NODE __ttl_7d_statuspage_get_1-SQL >-- %- SELECT- start_of_day as day,- count() AS count,- count(multiIf((statusCode >= 200) AND (statusCode <= 299), 1, NULL)) AS ok- FROM __ttl_7d_statuspage_get_0- GROUP BY start_of_day- ORDER BY start_of_day DESC- WITH FILL- FROM- toStartOfDay(toTimezone(now(), {{ String(timezone, 'Europe/London') }}))- TO toStartOfDay(- toTimezone(date_sub(DAY, 46, now()), {{ String(timezone, 'Europe/London') }})- ) STEP INTERVAL -1 DAY--diff --git a/packages/tinybird/pipes/get_result_for_on_demand_check_http.pipe b/packages/tinybird/pipes/get_result_for_on_demand_check_http.pipeindex 1fa29f763..5f5971120 100644--- a/packages/tinybird/pipes/get_result_for_on_demand_check_http.pipe+++ b/packages/tinybird/pipes/get_result_for_on_demand_check_http.pipe@@ -1,6 +1,6 @@VERSION 0-NODE get_result_for_on_demand_check_http_0+NODE endpointSQL >%@@ -13,11 +13,13 @@ SQL >timestamp,url,workspaceId,- timing- FROM __ttl_45d_all_mv__v1+ timing,+ cronTimestamp+ FROM mv__http_full_30dwhere- cronTimestamp = {{ String(cronTimestamp, '1') }}- and monitorId = {{ String(monitorId, '1') }}- and url = {{ String(url , 'https://www.openstatus.dev') }}+ cronTimestamp = {{ String(timestamp, '1729871694536') }} and+ monitorId = {{ String(monitorId, '2260') }}+ and url = {{ String(url , 'https://www.openstatus.dev/api/ping/edge') }}+ order by cronTimestamp descdiff --git a/packages/tinybird/pipes/single_checks_get.pipe b/packages/tinybird/pipes/single_checks_get.pipenew file mode 100644index 000000000..913e26884--- /dev/null+++ b/packages/tinybird/pipes/single_checks_get.pipe@@ -0,0 +1,16 @@+VERSION 1++NODE endpoint+SQL >++ %+ SELECT *+ from check_response_http+ WHERE+ workspaceId = {{ Int16(workspaceId, 1) }}+ {% if defined(requestId) %} AND requestId = {{ Int16(requestId) }} {% end %}+ ORDER BY timestamp DESC+ LIMIT {{ Int32(pageSize, 10) }}+ OFFSET {{ Int32(page, 0) * Int32(pageSize, 10) }}++diff --git a/packages/tinybird/src/client.ts b/packages/tinybird/src/client.tsindex b6a41e7c8..6ce30f9d5 100644--- a/packages/tinybird/src/client.ts+++ b/packages/tinybird/src/client.ts@@ -7,11 +7,11 @@ export class OSTinybird {private readonly tb: Client;constructor(token: string) {- // if (process.env.NODE_ENV === "development") {- // this.tb = new NoopTinybird();- // } else {- this.tb = new Client({ token });- // }+ if (process.env.NODE_ENV === "development") {+ this.tb = new NoopTinybird();+ } else {+ this.tb = new Client({ token });+ }}public get homeStats() {