Skip to content

Open-source status page, incident response and uptime monitoring

chore: migrate tb classic to forward (#2577)

Maximilian Kaskef39eb32f76b7
diff --git a/.gitignore b/.gitignore
index 8d10b8ce9..b7ed4bfe4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -89,3 +89,5 @@ skills-lock.json
.mcp.json
tmp
+
+.tinyb
\ No newline at end of file
diff --git a/apps/checker/handlers/dns.go b/apps/checker/handlers/dns.go
index 6c5c776a3..face331a7 100644
--- a/apps/checker/handlers/dns.go
+++ b/apps/checker/handlers/dns.go
@@ -246,7 +246,7 @@ func (h Handler) DNSHandler(c *gin.Context) {
func (h Handler) DNSHandlerRegion(c *gin.Context) {
ctx := c.Request.Context()
- dataSourceName := "check_dns_response__v0"
+ dataSourceName := "check_response_dns__v0"
const defaultRetry = 3
// Authorization check
diff --git a/apps/checker/handlers/tcp.go b/apps/checker/handlers/tcp.go
index 1a46f8600..678277cb5 100644
--- a/apps/checker/handlers/tcp.go
+++ b/apps/checker/handlers/tcp.go
@@ -256,7 +256,7 @@ func (h Handler) TCPHandler(c *gin.Context) {
func (h Handler) TCPHandlerRegion(c *gin.Context) {
ctx := c.Request.Context()
- dataSourceName := "check_tcp_response__v1"
+ dataSourceName := "check_response_tcp__v0"
region := c.Param("region")
if region == "" {
diff --git a/packages/tinybird/README.md b/packages/tinybird/README.md
index d0a7b6320..485391d69 100644
--- a/packages/tinybird/README.md
+++ b/packages/tinybird/README.md
@@ -1,52 +1,130 @@
-### A guide on how to migrate your tinybird datasource
+# @openstatus/tinybird
-> What to do when you want to add/remove/update a column in your `datasource`.
+Tinybird holds the monitoring time-series: every check result the probing tier
+produces lands here. Turso (see `packages/db`) holds application data. The two
+are linked by id only — no join across the boundary.
-The `_migration` folder includes:
+This package is two things:
-- `ping_response__v4.datasource` which represents the `VERSION 4` of our
- datasource
-- `ping_response.datasource` which has the upgraded schema and a new `VERSION 5`
-- `tb_backfill_populate.pipe` will fill the datasource with all the data until a
- given timestamp
-- `tb_materialized_until_change_ingest.pipe` will fill the data from a given
- timestamp
+- **Datafiles** (`datasources/`, `materializations/`, `endpoints/`) — the schema
+ and queries, deployed with the `tb` CLI.
+- **A typed client** (`src/client.ts`) — zod-validated wrappers over the
+ published endpoints, consumed by the apps.
+## Now on Tinybird Forward
+
+This project has migrated from Tinybird Classic to **Tinybird Forward**. If you
+last touched it under Classic, these are the changes that matter:
+
+| Classic | Forward |
+| --- | --- |
+| `pip install tinybird-cli` | `pip install tinybird` (or `uv tool install tinybird`) — currently 4.6.14 |
+| `tb push` / `tb pull` | `tb deploy` — no push command exists anymore |
+| Resources updated in place | Deployments: build a staging one, then promote |
+| New `VERSION` + backfill pipes per schema change | Change the schema in place; add `FORWARD_QUERY` when existing rows need transforming |
+| Datafiles anywhere | `datasources/`, `materializations/`, `endpoints/` |
+
+The old `_migration/` folder and its `VERSION`-bumping recipe are gone. Nothing
+in this repo uses `tb push`.
+
+> `tb migrate-to-forward` exists in the CLI for workspaces still on Classic.
+> This one is already migrated — you do not need it.
+
+## Deploying to Tinybird Cloud
+
+From this directory, after `tb login`:
+
+```bash
+tb --cloud deploy --check # validate; changes nothing
+tb --cloud deployment create --wait # build staging, run any backfills
+tb --cloud deployment promote # go live
```
-tb push _migration/ping_response.datasource
-tb push _migration/tb_materialized_until_change_ingest.pipe
-# after the given ts, it is time to run the backfill populate
-tb push _migration/tb_backfill_populate.pipe --populate --wait
-# after populate ends, it is time to remove the pipe
-tb pipe rm tb_backfill_populate --yes
-```
-Check if all the rows have been migrated:
+`tb --cloud deploy` collapses the last two into one step. Prefer the split form
+when the diff touches a materialized view: `create` is where data gets copied,
+and you get to see it land before promoting. `tb --cloud deployment discard`
+throws a staging deployment away.
+
+## Changing a schema
+
+Materialized views are the sharp edge. A `.pipe` under `materializations/` and
+its target `.datasource` must agree on **both** column names and order, so a
+column added to a source datasource has to be added in three places:
+
+1. the source `.datasource`,
+2. the target `mv__*.datasource` schema,
+3. the `SELECT` in the `aggregate__*.pipe` that feeds it.
+
+Never write `SELECT *` in a materialization. It silently breaks the next time a
+column is added to the source — the pipe starts producing a column the target
+has no slot for, and the deploy fails.
+
+When the target datasource already exists in the cloud, `deployment create`
+repopulates it by re-running the materialized pipe over the source, so
+historical rows get real values rather than nulls. Check the "Data that will be
+copied with this deployment" table in `--check` output to confirm. That
+repopulation is not free — it re-materializes the full retention window.
+
+Adding a nullable column, or a non-nullable one whose ClickHouse default is
+acceptable for old rows, needs nothing extra. Use `FORWARD_QUERY` when existing
+rows need a real transformation — a genuine default, a type change, a rename:
```
-tb pipe _migration/tb_datasource_union.pipe
-# after checking the result of the pipe
-tb pipe rm tb_datasource_union.pipe --yes
+FORWARD_QUERY >
+ SELECT *, 'unknown' AS source
```
----
+It is a `SELECT` list only, no `FROM`/`WHERE`, and it applies to existing data
+until the next deploy compacts it. Remove it once the change is live.
+
+## Self-hosting
-Link to the [issue](https://github.com/openstatusHQ/openstatus/issues/278) from
-Gonzalo as reference.
+**Tinybird is optional.** Openstatus runs without it; you lose the charts and
+the time-series views. Set `TINYBIRD_NOOP=true` and every pipe and ingest call
+resolves to empty instead of hitting the network.
+To run it for real, you have two options.
-<!-- FIXME: more content -->
+### Tinybird Local
+
+`docker compose up` starts a `tinybird-local` container (port `7181`) alongside
+the rest of the stack. It comes up empty — the datafiles still need deploying:
```bash
-python3 -m venv .venv
-source .venv/bin/activate
-pip install tinybird-cli
-tb auth -i
+cd packages/tinybird
+tb --local deploy
```
+Then point the apps at it:
+
```bash
-tb pull
-tb push aggregate_*.pipe --populate
-tb push endpoint_*.pipe
-...
-```
\ No newline at end of file
+TINYBIRD_URL=http://localhost:7181
+TINY_BIRD_API_KEY=<token> # tb --local token ls, then tb --local token copy <id>
+```
+
+### Tinybird Cloud
+
+Create a workspace, deploy the datafiles with the commands above, and set
+`TINY_BIRD_API_KEY` to a token with read access to the endpoints.
+`TINYBIRD_URL` can stay empty — it defaults to `https://api.tinybird.co`.
+
+## Gotcha: do not add a `tinybird.config.json` here
+
+There was one; it has been removed on purpose. The CLI classifies a project by
+scanning the paths named in that config's `folder`/`include` for source-file
+extensions. With `"folder": "."` the scan covers this whole package, finds the
+`.ts` files in `src/` and `scripts/`, decides it is a TypeScript-SDK project,
+and then fails on every command — including `tb --help`:
+
+```
+Error: Failed to generate Tinybird resources from TypeScript definitions.
+Unable to load Tinybird SDK generator bridge. Cannot find package '@tinybirdco/sdk'
+```
+
+`include` only adds scan targets, so there is no way to narrow it. Without the
+config, the CLI falls back to detecting `datasources/` and friends and treats
+this as a plain datafiles project, which is what we want.
+
+If you ever do need a config here — for `dev_mode`, say — move the datafile
+folders into a subdirectory with no `.ts` beside them and point `folder` at
+that.
diff --git a/packages/tinybird/datasources/audit_log__v0.datasource b/packages/tinybird/datasources/audit_log__v0.datasource
index 4fa11660f..28d7e60b5 100644
--- a/packages/tinybird/datasources/audit_log__v0.datasource
+++ b/packages/tinybird/datasources/audit_log__v0.datasource
@@ -1,4 +1,3 @@
-VERSION 0
SCHEMA >
`action` String `json:$.action`,
diff --git a/packages/tinybird/datasources/check_response.datasource b/packages/tinybird/datasources/check_response.datasource
deleted file mode 100644
index 1673dffec..000000000
--- a/packages/tinybird/datasources/check_response.datasource
+++ /dev/null
@@ -1,24 +0,0 @@
-VERSION 0
-
-SCHEMA >
- `requestId` Int64 `json:$.requestId`,
- `workspaceId` Int64 `json:$.workspaceId`,
- `latency` Int64 `json:$.latency`,
- `region` String `json:$.region`,
- `time` DateTime `json:$.time`,
- `headers` String `json:$.headers`,
- `timing_connectDone` Int64 `json:$.timing.connectDone`,
- `timing_connectStart` Int64 `json:$.timing.connectStart`,
- `timing_dnsDone` Int64 `json:$.timing.dnsDone`,
- `timing_dnsStart` Int64 `json:$.timing.dnsStart`,
- `timing_firstByteDone` Int64 `json:$.timing.firstByteDone`,
- `timing_firstByteStart` Int64 `json:$.timing.firstByteStart`,
- `timing_tlsHandshakeDone` Int64 `json:$.timing.tlsHandshakeDone`,
- `timing_tlsHandshakeStart` Int64 `json:$.timing.tlsHandshakeStart`,
- `timing_transferDone` Int64 `json:$.timing.transferDone`,
- `timing_transferStart` Int64 `json:$.timing.transferStart`
-
-ENGINE "MergeTree"
-ENGINE_SORTING_KEY "workspaceId, requestId, time"
-ENGINE_TTL ""
-ENGINE_PARTITION_KEY ""
\ No newline at end of file
diff --git a/packages/tinybird/datasources/check_response_dns__v0.datasource b/packages/tinybird/datasources/check_response_dns__v0.datasource
new file mode 100644
index 000000000..da7f9ee8a
--- /dev/null
+++ b/packages/tinybird/datasources/check_response_dns__v0.datasource
@@ -0,0 +1,19 @@
+
+SCHEMA >
+ `assertions` String `json:$.assertions`,
+ `cronTimestamp` Int64 `json:$.cronTimestamp`,
+ `error` Int16 `json:$.error`,
+ `errorMessage` String `json:$.errorMessage`,
+ `id` String `json:$.id`,
+ `latency` Int16 `json:$.latency`,
+ `monitorId` Int16 `json:$.monitorId`,
+ `records` String `json:$.records`,
+ `region` String `json:$.region`,
+ `requestStatus` String `json:$.requestStatus`,
+ `timestamp` Int64 `json:$.timestamp`,
+ `trigger` String `json:$.trigger`,
+ `uri` String `json:$.uri`,
+ `workspaceId` Int16 `json:$.workspaceId`
+
+ENGINE "MergeTree"
+ENGINE_SORTING_KEY "trigger, uri, workspaceId"
diff --git a/packages/tinybird/datasources/check_response_http.datasource b/packages/tinybird/datasources/check_response_http__v0.datasource
similarity index 97%
rename from packages/tinybird/datasources/check_response_http.datasource
rename to packages/tinybird/datasources/check_response_http__v0.datasource
index 0e286d053..ef81a3570 100644
--- a/packages/tinybird/datasources/check_response_http.datasource
+++ b/packages/tinybird/datasources/check_response_http__v0.datasource
@@ -1,4 +1,3 @@
-VERSION 0
SCHEMA >
`body` String `json:$.body`,
diff --git a/packages/tinybird/datasources/dns_response__v0.datasource b/packages/tinybird/datasources/dns_response__v0.datasource
index e6b124d00..da7f9ee8a 100644
--- a/packages/tinybird/datasources/dns_response__v0.datasource
+++ b/packages/tinybird/datasources/dns_response__v0.datasource
@@ -1,7 +1,6 @@
SCHEMA >
- `assertions` Nullable(String) `json:$.assertions`,
- `timing` String `json:$.timing`,
+ `assertions` String `json:$.assertions`,
`cronTimestamp` Int64 `json:$.cronTimestamp`,
`error` Int16 `json:$.error`,
`errorMessage` String `json:$.errorMessage`,
diff --git a/packages/tinybird/datasources/external_status__v1.datasource b/packages/tinybird/datasources/external_status__v1.datasource
index 3dfdeb519..e72ca5b68 100644
--- a/packages/tinybird/datasources/external_status__v1.datasource
+++ b/packages/tinybird/datasources/external_status__v1.datasource
@@ -1,3 +1,4 @@
+
SCHEMA >
`id` String `json:$.id`,
`indicator` String `json:$.indicator`,
@@ -9,4 +10,4 @@ SCHEMA >
ENGINE "MergeTree"
ENGINE_SORTING_KEY "id, fetched_at"
-ENGINE_TTL "toDateTime(fromUnixTimestamp64Milli(fetched_at)) + INTERVAL 60 DAY"
+ENGINE_TTL "toDateTime(fromUnixTimestamp64Milli(fetched_at)) + toIntervalDay(60)"
diff --git a/packages/tinybird/datasources/external_status_component__v0.datasource b/packages/tinybird/datasources/external_status_component__v0.datasource
index 5b8f1ffae..2d6302f8c 100644
--- a/packages/tinybird/datasources/external_status_component__v0.datasource
+++ b/packages/tinybird/datasources/external_status_component__v0.datasource
@@ -1,6 +1,3 @@
-# `external_service_id` is denormalised for raw-row traceability only: in raw
-# rows `component_id` is an opaque PK, so this lets ops trace a snapshot back to
-# its service without a Turso join. Pipes/MV key on `component_id`.
SCHEMA >
`component_id` String `json:$.component_id`,
@@ -11,4 +8,4 @@ SCHEMA >
ENGINE "MergeTree"
ENGINE_SORTING_KEY "component_id, fetched_at"
-ENGINE_TTL "toDateTime(fromUnixTimestamp64Milli(fetched_at)) + INTERVAL 60 DAY"
+ENGINE_TTL "toDateTime(fromUnixTimestamp64Milli(fetched_at)) + toIntervalDay(60)"
diff --git a/packages/tinybird/datasources/mv__external_status_component_daily__v0.datasource b/packages/tinybird/datasources/mv__external_status_component_daily__v0.datasource
index bb1e4160f..d803f30cf 100644
--- a/packages/tinybird/datasources/mv__external_status_component_daily__v0.datasource
+++ b/packages/tinybird/datasources/mv__external_status_component_daily__v0.datasource
@@ -1,4 +1,4 @@
-# Data Source created from Pipe 'mv__external_status_component_daily__v0'
+# Data Source created from Pipe 'aggregate__external_status_component__daily__v0'
SCHEMA >
`day` Date,
diff --git a/packages/tinybird/datasources/mv__external_status_daily__v0.datasource b/packages/tinybird/datasources/mv__external_status_daily__v0.datasource
index 81d7a4150..558bfaf70 100644
--- a/packages/tinybird/datasources/mv__external_status_daily__v0.datasource
+++ b/packages/tinybird/datasources/mv__external_status_daily__v0.datasource
@@ -1,4 +1,3 @@
-# Data Source created from Pipe 'mv__external_status_daily__v0'
SCHEMA >
`day` Date,
diff --git a/packages/tinybird/datasources/mv__http_14d.datasource b/packages/tinybird/datasources/mv__http_14d.datasource
deleted file mode 100644
index 5195321a6..000000000
--- a/packages/tinybird/datasources/mv__http_14d.datasource
+++ /dev/null
@@ -1,19 +0,0 @@
-VERSION 0
-# Data Source created from Pipe 'aggregate__http_14d__v0'
-
-SCHEMA >
- `time` DateTime,
- `latency` Int64,
- `error` Int8,
- `region` LowCardinality(String),
- `trigger` Nullable(String),
- `statusCode` Nullable(Int16),
- `timestamp` Int64,
- `cronTimestamp` Int64,
- `monitorId` String,
- `workspaceId` String
-
-ENGINE "MergeTree"
-ENGINE_PARTITION_KEY "toYYYYMM(time)"
-ENGINE_SORTING_KEY "monitorId, time"
-ENGINE_TTL "time + toIntervalDay(14)"
diff --git a/packages/tinybird/datasources/mv__http_14d__v0.datasource b/packages/tinybird/datasources/mv__http_14d__v0.datasource
index 5195321a6..917f62308 100644
--- a/packages/tinybird/datasources/mv__http_14d__v0.datasource
+++ b/packages/tinybird/datasources/mv__http_14d__v0.datasource
@@ -1,4 +1,3 @@
-VERSION 0
# Data Source created from Pipe 'aggregate__http_14d__v0'
SCHEMA >
diff --git a/packages/tinybird/datasources/mv__http_1d__v0.datasource b/packages/tinybird/datasources/mv__http_1d__v0.datasource
index 764c43d4b..bdce0cd9d 100644
--- a/packages/tinybird/datasources/mv__http_1d__v0.datasource
+++ b/packages/tinybird/datasources/mv__http_1d__v0.datasource
@@ -1,4 +1,3 @@
-VERSION 0
# Data Source created from Pipe 'aggregate__http_1d__v0'
SCHEMA >
diff --git a/packages/tinybird/datasources/mv__http_1d__v1.datasource b/packages/tinybird/datasources/mv__http_1d__v1.datasource
index 243c2e281..9ea2fa46a 100644
--- a/packages/tinybird/datasources/mv__http_1d__v1.datasource
+++ b/packages/tinybird/datasources/mv__http_1d__v1.datasource
@@ -4,13 +4,13 @@ SCHEMA >
`time` DateTime,
`id` Nullable(String),
`latency` Int64,
- `requestStatus` Nullable(String),
`region` LowCardinality(String),
`trigger` Nullable(String),
`statusCode` Nullable(Int16),
`timestamp` Int64,
`cronTimestamp` Int64,
`monitorId` String,
+ `requestStatus` Nullable(String),
`timing` Nullable(String)
ENGINE "MergeTree"
diff --git a/packages/tinybird/datasources/mv__http_30d__v0.datasource b/packages/tinybird/datasources/mv__http_30d__v0.datasource
index 6c116f20c..820c4a857 100644
--- a/packages/tinybird/datasources/mv__http_30d__v0.datasource
+++ b/packages/tinybird/datasources/mv__http_30d__v0.datasource
@@ -1,4 +1,3 @@
-VERSION 0
# Data Source created from Pipe 'aggregate__http_30d__v0'
SCHEMA >
diff --git a/packages/tinybird/datasources/mv__http_7d__v0.datasource b/packages/tinybird/datasources/mv__http_7d__v0.datasource
index a45060c0f..c2d6588ca 100644
--- a/packages/tinybird/datasources/mv__http_7d__v0.datasource
+++ b/packages/tinybird/datasources/mv__http_7d__v0.datasource
@@ -1,4 +1,3 @@
-VERSION 0
# Data Source created from Pipe 'aggregate__http_7d__v0'
SCHEMA >
diff --git a/packages/tinybird/datasources/mv__http_full_14d__v0.datasource b/packages/tinybird/datasources/mv__http_full_14d__v0.datasource
index 95a905e1c..a095321ff 100644
--- a/packages/tinybird/datasources/mv__http_full_14d__v0.datasource
+++ b/packages/tinybird/datasources/mv__http_full_14d__v0.datasource
@@ -19,8 +19,7 @@ SCHEMA >
`trigger` Nullable(String),
`id` Nullable(String),
`requestStatus` Nullable(String),
- `method` Nullable(String)
-
+ `method` String
ENGINE "MergeTree"
ENGINE_PARTITION_KEY "toYYYYMM(time)"
diff --git a/packages/tinybird/datasources/mv__http_full_30d__v0.datasource b/packages/tinybird/datasources/mv__http_full_30d__v0.datasource
index fbf149752..76b172c72 100644
--- a/packages/tinybird/datasources/mv__http_full_30d__v0.datasource
+++ b/packages/tinybird/datasources/mv__http_full_30d__v0.datasource
@@ -19,8 +19,7 @@ SCHEMA >
`trigger` Nullable(String),
`id` Nullable(String),
`requestStatus` Nullable(String),
- `method` Nullable(String)
-
+ `method` String
ENGINE "MergeTree"
ENGINE_PARTITION_KEY "toYYYYMM(time)"
diff --git a/packages/tinybird/datasources/mv__http_status_45d__v0.datasource b/packages/tinybird/datasources/mv__http_status_45d__v0.datasource
index ca1b37996..67fdd6840 100644
--- a/packages/tinybird/datasources/mv__http_status_45d__v0.datasource
+++ b/packages/tinybird/datasources/mv__http_status_45d__v0.datasource
@@ -1,4 +1,3 @@
-VERSION 0
# Data Source created from Pipe 'aggregate__http_status_45d__v0'
SCHEMA >
diff --git a/packages/tinybird/datasources/mv__http_status_7d__v0.datasource b/packages/tinybird/datasources/mv__http_status_7d__v0.datasource
index 1c2e74fe7..cbbc48fe0 100644
--- a/packages/tinybird/datasources/mv__http_status_7d__v0.datasource
+++ b/packages/tinybird/datasources/mv__http_status_7d__v0.datasource
@@ -1,4 +1,3 @@
-VERSION 0
# Data Source created from Pipe 'aggregate__http_status_7d__v0'
SCHEMA >
diff --git a/packages/tinybird/datasources/mv__http_timing_phases_14d.datasource b/packages/tinybird/datasources/mv__http_timing_phases_14d.datasource
deleted file mode 100644
index b767183d9..000000000
--- a/packages/tinybird/datasources/mv__http_timing_phases_14d.datasource
+++ /dev/null
@@ -1,21 +0,0 @@
-# Data Source created from Pipe 'aggregate__http_timing_phases_14d__v1'
-
-SCHEMA >
- `time` DateTime,
- `latency` Int64,
- `region` LowCardinality(String),
- `trigger` Nullable(String),
- `statusCode` Nullable(Int16),
- `monitorId` String,
- `workspaceId` String,
- `requestStatus` Nullable(String),
- `dns` Nullable(Int64),
- `connect` Nullable(Int64),
- `tls` Nullable(Int64),
- `firstByte` Nullable(Int64),
- `transfer` Nullable(Int64)
-
-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_14d__v0.datasource b/packages/tinybird/datasources/mv__tcp_14d__v0.datasource
index 79098c67d..bf67d58a5 100644
--- a/packages/tinybird/datasources/mv__tcp_14d__v0.datasource
+++ b/packages/tinybird/datasources/mv__tcp_14d__v0.datasource
@@ -1,4 +1,3 @@
-VERSION 0
# Data Source created from Pipe 'aggregate__tcp_14d__v0'
SCHEMA >
diff --git a/packages/tinybird/datasources/mv__tcp_1d__v0.datasource b/packages/tinybird/datasources/mv__tcp_1d__v0.datasource
index 4621e547d..69c7b5178 100644
--- a/packages/tinybird/datasources/mv__tcp_1d__v0.datasource
+++ b/packages/tinybird/datasources/mv__tcp_1d__v0.datasource
@@ -1,4 +1,3 @@
-VERSION 0
# Data Source created from Pipe 'aggregate__tcp_1d__v0'
SCHEMA >
diff --git a/packages/tinybird/datasources/mv__tcp_30d__v0.datasource b/packages/tinybird/datasources/mv__tcp_30d__v0.datasource
index 5a6185506..63cb5ddfe 100644
--- a/packages/tinybird/datasources/mv__tcp_30d__v0.datasource
+++ b/packages/tinybird/datasources/mv__tcp_30d__v0.datasource
@@ -1,4 +1,3 @@
-VERSION 0
# Data Source created from Pipe 'aggregate__tcp_30d__v0'
SCHEMA >
diff --git a/packages/tinybird/datasources/mv__tcp_7d__v0.datasource b/packages/tinybird/datasources/mv__tcp_7d__v0.datasource
index 278da9741..4860c3ea5 100644
--- a/packages/tinybird/datasources/mv__tcp_7d__v0.datasource
+++ b/packages/tinybird/datasources/mv__tcp_7d__v0.datasource
@@ -1,4 +1,3 @@
-VERSION 0
# Data Source created from Pipe 'aggregate__tcp_7d__v0'
SCHEMA >
diff --git a/packages/tinybird/datasources/mv__tcp_status_45d__v0.datasource b/packages/tinybird/datasources/mv__tcp_status_45d__v0.datasource
index 3bb59b746..8cd11b1b6 100644
--- a/packages/tinybird/datasources/mv__tcp_status_45d__v0.datasource
+++ b/packages/tinybird/datasources/mv__tcp_status_45d__v0.datasource
@@ -1,4 +1,3 @@
-VERSION 0
# Data Source created from Pipe 'aggregate__tcp_status_45d__v0'
SCHEMA >
diff --git a/packages/tinybird/datasources/mv__tcp_status_7d__v0.datasource b/packages/tinybird/datasources/mv__tcp_status_7d__v0.datasource
index e3eea9c96..327ba349c 100644
--- a/packages/tinybird/datasources/mv__tcp_status_7d__v0.datasource
+++ b/packages/tinybird/datasources/mv__tcp_status_7d__v0.datasource
@@ -1,4 +1,3 @@
-VERSION 0
# Data Source created from Pipe 'aggregate__tcp_status_7d__v0'
SCHEMA >
diff --git a/packages/tinybird/datasources/mv_http_status_14d.datasource b/packages/tinybird/datasources/mv_http_status_14d.datasource
deleted file mode 100644
index ab57875b4..000000000
--- a/packages/tinybird/datasources/mv_http_status_14d.datasource
+++ /dev/null
@@ -1,15 +0,0 @@
-# Data Source created from Pipe 'aggregate__http_status_14d__v0'
-VERSION 0
-
-SCHEMA >
- `time` DateTime('UTC'),
- `monitorId` String,
- `total` AggregateFunction(count),
- `success` AggregateFunction(count, Nullable(UInt8)),
- `degraded` AggregateFunction(count, Nullable(UInt8)),
- `error` AggregateFunction(count, Nullable(UInt8))
-
-ENGINE "AggregatingMergeTree"
-ENGINE_PARTITION_KEY "toYYYYMM(time)"
-ENGINE_SORTING_KEY "monitorId, time"
-ENGINE_TTL "time + toIntervalDay(14)"
diff --git a/packages/tinybird/datasources/tcp_response.datasource b/packages/tinybird/datasources/tcp_response.datasource
deleted file mode 100644
index 35c6304d0..000000000
--- a/packages/tinybird/datasources/tcp_response.datasource
+++ /dev/null
@@ -1,19 +0,0 @@
-VERSION 0
-
-SCHEMA >
- `monitorId` Int32 `json:$.monitorId`,
- `region` String `json:$.region`,
- `timestamp` Int64 `json:$.timestamp`,
- `cronTimestamp` Int64 `json:$.timestamp`,
- `timing` String `json:$.timing`,
- `workspaceId` Int32 `json:$.workspaceId`,
- `latency` Int64 `json:$.latency`,
- `errorMessage` Nullable(String) `json:$.errorMessage`,
- `error` Int16 `json:$.error`,
- `trigger` Nullable(String) `json:$.trigger`,
- `uri` Nullable(String) `json:$.uri`
-
-
-ENGINE "MergeTree"
-ENGINE_PARTITION_KEY "toYYYYMM(fromUnixTimestamp64Milli(timestamp))"
-ENGINE_SORTING_KEY "monitorId, workspaceId"
diff --git a/packages/tinybird/endpoints/endpoint__audit_log.pipe b/packages/tinybird/endpoints/endpoint__audit_log.pipe
deleted file mode 100644
index 484e795b3..000000000
--- a/packages/tinybird/endpoints/endpoint__audit_log.pipe
+++ /dev/null
@@ -1,17 +0,0 @@
-VERSION 1
-
-TAGS endpoint
-
-
-NODE endpoint
-SQL >
-
- %
- SELECT action, id, metadata, timestamp
- FROM audit_log__v0
- WHERE
- id = {{String(monitorId, 'monitor:1', required=True)}}
- AND timestamp > toUnixTimestamp(now() - INTERVAL {{ Int64(interval, 30) }} day) * 1000
- ORDER BY timestamp DESC
-
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__audit_log__v1.pipe b/packages/tinybird/endpoints/endpoint__audit_log__v1.pipe
index 5ad399aca..f56e664a1 100644
--- a/packages/tinybird/endpoints/endpoint__audit_log__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__audit_log__v1.pipe
@@ -1,18 +1,16 @@
-VERSION 1
-
-TAGS endpoint
-
+TOKEN "endpoint__audit_log__v1_endpoint_read_0873" READ
NODE endpoint
SQL >
- %
- SELECT action, id, metadata, timestamp
- FROM audit_log__v0
- WHERE
- id = {{String(monitorId, 'monitor:1', required=True)}}
- AND timestamp > toUnixTimestamp(now() - INTERVAL {{ Int64(interval, 30) }} day) * 1000
- ORDER BY timestamp DESC
+%
+SELECT action, id, metadata, timestamp
+FROM audit_log__v0
+WHERE
+ id = {{String(monitorId, 'monitor:1', required=True)}}
+ AND timestamp > toUnixTimestamp(now() - INTERVAL {{ Int64(interval, 30) }} day) * 1000
+ORDER BY timestamp DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__dns_get_14d__v0.pipe b/packages/tinybird/endpoints/endpoint__dns_get_14d__v0.pipe
index 1edb0b5d8..82d2a2a2e 100644
--- a/packages/tinybird/endpoints/endpoint__dns_get_14d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__dns_get_14d__v0.pipe
@@ -1,15 +1,16 @@
-TAGS "dns"
+TOKEN "endpoint__dns_get_14d__v0_endpoint_read_7283" READ
NODE endpoint
SQL >
- %
- SELECT *
- FROM dns_response__v0
- WHERE
- monitorId = {{ String(monitorId, '7417', required=True) }}
- AND id = {{ String(id, '', required=True) }}
- ORDER BY timestamp DESC
+%
+ SELECT *
+ FROM dns_response__v0
+ WHERE
+ monitorId = {{ String(monitorId, '7417', required=True) }}
+ AND id = {{ String(id, '', required=True) }}
+ ORDER BY timestamp DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__dns_list_14d__v0.pipe b/packages/tinybird/endpoints/endpoint__dns_list_14d__v0.pipe
index fce5897d7..25a99dc1f 100644
--- a/packages/tinybird/endpoints/endpoint__dns_list_14d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__dns_list_14d__v0.pipe
@@ -1,16 +1,17 @@
-TAGS "dns"
+TOKEN "endpoint__dns_list_14d__v0_endpoint_read_1189" READ
NODE endpoint
SQL >
- %
- SELECT *
- FROM dns_response__v0
- WHERE
- monitorId = {{ String(monitorId, '7417', required=True) }}
- {% if defined(fromDate) %} AND timestamp >= toInt64({{ String(fromDate) }}) {% end %}
- {% if defined(toDate) %} AND timestamp <= toInt64({{ String(toDate) }}) {% end %}
- ORDER BY timestamp DESC
+%
+SELECT *
+FROM dns_response__v0
+WHERE
+monitorId = {{ String(monitorId, '7417', required=True) }}
+ {% if defined(fromDate) %} AND timestamp >= toInt64({{ String(fromDate) }}) {% end %}
+ {% if defined(toDate) %} AND timestamp <= toInt64({{ String(toDate) }}) {% end %}
+ORDER BY timestamp DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__dns_metrics_14d__v0.pipe b/packages/tinybird/endpoints/endpoint__dns_metrics_14d__v0.pipe
index 18385a356..2cf480c43 100644
--- a/packages/tinybird/endpoints/endpoint__dns_metrics_14d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__dns_metrics_14d__v0.pipe
@@ -1,43 +1,44 @@
-TAGS "dns"
+TOKEN "endpoint__dns_metrics_14d__v1_endpoint_read_5551" READ
NODE endpoint
SQL >
- %
- SELECT
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency,
- count() as count,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error,
- max(cronTimestamp) AS lastTimestamp
- FROM dns_response__v0
- WHERE
- monitorId = {{ String(monitorId, '7417', required=True) }}
- AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 14 DAY, 3))
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- UNION ALL
- SELECT
- round(quantile(0.50)(latency)) AS p50Latency,
- round(quantile(0.75)(latency)) AS p75Latency,
- round(quantile(0.90)(latency)) AS p90Latency,
- round(quantile(0.95)(latency)) AS p95Latency,
- round(quantile(0.99)(latency)) AS p99Latency,
- count() as count,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error,
- NULL as lastTimestamp -- no need to query the `lastTimestamp` as not relevant
- FROM dns_response__v0
- WHERE
- monitorId = {{ String(monitorId, '7417', required=True) }}
- AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 28 DAY, 3))
- AND timestamp < toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 14 DAY, 3))
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+%
+ SELECT
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency,
+ count() as count,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error,
+ max(cronTimestamp) AS lastTimestamp
+ FROM dns_response__v0
+ WHERE
+ monitorId = {{ String(monitorId, '7417', required=True) }}
+ AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 14 DAY, 3))
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+ UNION ALL
+ SELECT
+ round(quantile(0.50)(latency)) AS p50Latency,
+ round(quantile(0.75)(latency)) AS p75Latency,
+ round(quantile(0.90)(latency)) AS p90Latency,
+ round(quantile(0.95)(latency)) AS p95Latency,
+ round(quantile(0.99)(latency)) AS p99Latency,
+ count() as count,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error,
+ NULL as lastTimestamp -- no need to query the `lastTimestamp` as not relevant
+ FROM dns_response__v0
+ WHERE
+ monitorId = {{ String(monitorId, '7417', required=True) }}
+ AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 28 DAY, 3))
+ AND timestamp < toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 14 DAY, 3))
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__dns_metrics_1d__v0.pipe b/packages/tinybird/endpoints/endpoint__dns_metrics_1d__v0.pipe
index 7db3011dc..69a1d46bc 100644
--- a/packages/tinybird/endpoints/endpoint__dns_metrics_1d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__dns_metrics_1d__v0.pipe
@@ -1,43 +1,44 @@
-TAGS "dns"
+TOKEN "endpoint__dns_metrics_1d__v1_endpoint_read_8759" READ
NODE endpoint
SQL >
- %
- SELECT
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency,
- count() as count,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error,
- max(cronTimestamp) AS lastTimestamp
- FROM dns_response__v0
- WHERE
- monitorId = {{ String(monitorId, '7417', required=True) }}
- AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 1 DAY, 3))
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- UNION ALL
- SELECT
- round(quantile(0.50)(latency)) AS p50Latency,
- round(quantile(0.75)(latency)) AS p75Latency,
- round(quantile(0.90)(latency)) AS p90Latency,
- round(quantile(0.95)(latency)) AS p95Latency,
- round(quantile(0.99)(latency)) AS p99Latency,
- count() as count,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error,
- NULL as lastTimestamp -- no need to query the `lastTimestamp` as not relevant
- FROM dns_response__v0
- WHERE
- monitorId = {{ String(monitorId, '7417', required=True) }}
- AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 2 DAY, 3))
- AND timestamp < toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 1 DAY, 3))
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+%
+ SELECT
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency,
+ count() as count,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error,
+ max(cronTimestamp) AS lastTimestamp
+ FROM dns_response__v0
+ WHERE
+ monitorId = {{ String(monitorId, '7417', required=True) }}
+ AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 1 DAY, 3))
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+ UNION ALL
+ SELECT
+ round(quantile(0.50)(latency)) AS p50Latency,
+ round(quantile(0.75)(latency)) AS p75Latency,
+ round(quantile(0.90)(latency)) AS p90Latency,
+ round(quantile(0.95)(latency)) AS p95Latency,
+ round(quantile(0.99)(latency)) AS p99Latency,
+ count() as count,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error,
+ NULL as lastTimestamp -- no need to query the `lastTimestamp` as not relevant
+ FROM dns_response__v0
+ WHERE
+ monitorId = {{ String(monitorId, '7417', required=True) }}
+ AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 2 DAY, 3))
+ AND timestamp < toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 1 DAY, 3))
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__dns_metrics_30d__v0.pipe b/packages/tinybird/endpoints/endpoint__dns_metrics_30d__v0.pipe
index 368a32afc..08ea10663 100644
--- a/packages/tinybird/endpoints/endpoint__dns_metrics_30d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__dns_metrics_30d__v0.pipe
@@ -1,42 +1,44 @@
-TAGS "dns"
+TOKEN "endpoint__dns_metrics_30d__v0_endpoint_read_7067" READ
NODE endpoint
SQL >
- %
- SELECT
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency,
- count() as count,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error,
- max(cronTimestamp) AS lastTimestamp
- FROM dns_response__v0
- WHERE
- monitorId = {{ String(monitorId, '7417', required=True) }}
- AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 30 DAY, 3))
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- UNION ALL
- SELECT
- round(quantile(0.50)(latency)) AS p50Latency,
- round(quantile(0.75)(latency)) AS p75Latency,
- round(quantile(0.90)(latency)) AS p90Latency,
- round(quantile(0.95)(latency)) AS p95Latency,
- round(quantile(0.99)(latency)) AS p99Latency,
- count() as count,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error,
- NULL as lastTimestamp
- FROM dns_response__v0
- WHERE
- monitorId = {{ String(monitorId, '7417', required=True) }}
- AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 60 DAY, 3))
- AND timestamp < toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 30 DAY, 3))
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+%
+SELECT
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency,
+ count() as count,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error,
+ max(cronTimestamp) AS lastTimestamp
+FROM dns_response__v0
+WHERE
+ monitorId = {{ String(monitorId, '7417', required=True) }}
+ AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 30 DAY, 3))
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+UNION ALL
+SELECT
+ round(quantile(0.50)(latency)) AS p50Latency,
+ round(quantile(0.75)(latency)) AS p75Latency,
+ round(quantile(0.90)(latency)) AS p90Latency,
+ round(quantile(0.95)(latency)) AS p95Latency,
+ round(quantile(0.99)(latency)) AS p99Latency,
+ count() as count,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error,
+ NULL as lastTimestamp
+FROM dns_response__v0
+WHERE
+ monitorId = {{ String(monitorId, '7417', required=True) }}
+ AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 60 DAY, 3))
+ AND timestamp < toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 30 DAY, 3))
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__dns_metrics_7d__v0.pipe b/packages/tinybird/endpoints/endpoint__dns_metrics_7d__v0.pipe
index 731df660b..a3e601e95 100644
--- a/packages/tinybird/endpoints/endpoint__dns_metrics_7d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__dns_metrics_7d__v0.pipe
@@ -1,43 +1,44 @@
-TAGS "dns"
+TOKEN "endpoint__dns_metrics_7d__v1_endpoint_read_4418" READ
NODE endpoint
SQL >
- %
- SELECT
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency,
- count() as count,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error,
- max(cronTimestamp) AS lastTimestamp
- FROM dns_response__v0
- WHERE
- monitorId = {{ String(monitorId, '7417', required=True) }}
- AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 7 DAY, 3))
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- UNION ALL
- SELECT
- round(quantile(0.50)(latency)) AS p50Latency,
- round(quantile(0.75)(latency)) AS p75Latency,
- round(quantile(0.90)(latency)) AS p90Latency,
- round(quantile(0.95)(latency)) AS p95Latency,
- round(quantile(0.99)(latency)) AS p99Latency,
- count() as count,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error,
- NULL as lastTimestamp -- no need to query the `lastTimestamp` as not relevant
- FROM dns_response__v0
- WHERE
- monitorId = {{ String(monitorId, '7417', required=True) }}
- AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 14 DAY, 3))
- AND timestamp < toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 7 DAY, 3))
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+%
+ SELECT
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency,
+ count() as count,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error,
+ max(cronTimestamp) AS lastTimestamp
+ FROM dns_response__v0
+ WHERE
+ monitorId = {{ String(monitorId, '7417', required=True) }}
+ AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 7 DAY, 3))
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+ UNION ALL
+ SELECT
+ round(quantile(0.50)(latency)) AS p50Latency,
+ round(quantile(0.75)(latency)) AS p75Latency,
+ round(quantile(0.90)(latency)) AS p90Latency,
+ round(quantile(0.95)(latency)) AS p95Latency,
+ round(quantile(0.99)(latency)) AS p99Latency,
+ count() as count,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error,
+ NULL as lastTimestamp -- no need to query the `lastTimestamp` as not relevant
+ FROM dns_response__v0
+ WHERE
+ monitorId = {{ String(monitorId, '7417', required=True) }}
+ AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 14 DAY, 3))
+ AND timestamp < toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 7 DAY, 3))
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__dns_metrics_90d__v0.pipe b/packages/tinybird/endpoints/endpoint__dns_metrics_90d__v0.pipe
index 00f34c91b..4cab92a77 100644
--- a/packages/tinybird/endpoints/endpoint__dns_metrics_90d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__dns_metrics_90d__v0.pipe
@@ -1,38 +1,40 @@
-TAGS "dns"
+TOKEN "endpoint__dns_metrics_90d__v0_endpoint_read_3836" READ
NODE endpoint
SQL >
- %
- SELECT
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency,
- count() as count,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error,
- max(cronTimestamp) AS lastTimestamp
- FROM dns_response__v0
- WHERE
- monitorId = {{ String(monitorId, '7417', required=True) }}
- AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 90 DAY, 3))
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- UNION ALL
- -- no 90d comparison: emit an empty row to keep the 2-row contract; count 0
- -- makes the client suppress the trend badge (NaN). matches http/tcp 90d.
- SELECT
- 0 AS p50Latency,
- 0 AS p75Latency,
- 0 AS p90Latency,
- 0 AS p95Latency,
- 0 AS p99Latency,
- 0 AS count,
- 0 AS success,
- 0 AS degraded,
- 0 AS error,
- NULL AS lastTimestamp
+%
+SELECT
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency,
+ count() as count,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error,
+ max(cronTimestamp) AS lastTimestamp
+FROM dns_response__v0
+WHERE
+ monitorId = {{ String(monitorId, '7417', required=True) }}
+ AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 90 DAY, 3))
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+UNION ALL
+-- no 90d comparison: emit an empty row to keep the 2-row contract; count 0
+-- makes the client suppress the trend badge (NaN). matches http/tcp 90d.
+SELECT
+ 0 AS p50Latency,
+ 0 AS p75Latency,
+ 0 AS p90Latency,
+ 0 AS p95Latency,
+ 0 AS p99Latency,
+ 0 AS count,
+ 0 AS success,
+ 0 AS degraded,
+ 0 AS error,
+ NULL AS lastTimestamp
+
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__dns_metrics_global_1d__v0.pipe b/packages/tinybird/endpoints/endpoint__dns_metrics_global_1d__v0.pipe
index 70ede4091..851e6effe 100644
--- a/packages/tinybird/endpoints/endpoint__dns_metrics_global_1d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__dns_metrics_global_1d__v0.pipe
@@ -1,11 +1,9 @@
-VERSION 0
+TOKEN "endpoint__dns_metrics_global_1d__v0_endpoint_read_0694" READ
-TAGS "dns"
-
-NODE endpoint
+NODE endopint
SQL >
- %
+%
SELECT
round(min(latency), 0) as minLatency,
round(max(latency), 0) as maxLatency,
@@ -22,5 +20,6 @@ SQL >
AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 1 DAY, 3))
GROUP BY monitorId
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__dns_metrics_latency_1d_multi__v0.pipe b/packages/tinybird/endpoints/endpoint__dns_metrics_latency_1d_multi__v0.pipe
index 74968f620..d2f077d16 100644
--- a/packages/tinybird/endpoints/endpoint__dns_metrics_latency_1d_multi__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__dns_metrics_latency_1d_multi__v0.pipe
@@ -1,26 +1,27 @@
-TAGS "dns"
+TOKEN "endpoint__dns_metrics_latency_1d_multi__v0_endpoint_read_4781" READ
NODE endpoint
SQL >
- %
- SELECT
- toStartOfInterval(
- toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 30) }} MINUTE
- ) as h,
- monitorId,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency
- FROM dns_response__v0
- WHERE
- monitorId IN {{ Array(monitorIds, 'String', '7417') }}
- AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 1 DAY, 3))
- GROUP BY h, monitorId
- ORDER BY h ASC
+%
+SELECT
+ toStartOfInterval(
+ toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 30) }} MINUTE
+ ) as h,
+ monitorId,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency
+FROM dns_response__v0
+WHERE
+ monitorId IN {{ Array(monitorIds, 'String', '7417') }}
+ AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 1 DAY, 3))
+GROUP BY h, monitorId
+ORDER BY h ASC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__dns_metrics_latency_30d__v0.pipe b/packages/tinybird/endpoints/endpoint__dns_metrics_latency_30d__v0.pipe
index 94718c840..c08d8d684 100644
--- a/packages/tinybird/endpoints/endpoint__dns_metrics_latency_30d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__dns_metrics_latency_30d__v0.pipe
@@ -1,24 +1,26 @@
-TAGS "dns"
+TOKEN "endpoint__dns_metrics_latency_30d__v0_endpoint_read_4167" READ
NODE endpoint
SQL >
- %
- SELECT
- toStartOfInterval(
- toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 1440) }} MINUTE
- ) as h,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency
- FROM dns_response__v0
- WHERE
- monitorId = {{ String(monitorId, '7417', required=True) }}
- AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 30 DAY, 3))
- GROUP BY h
- ORDER BY h DESC
+%
+SELECT
+ toStartOfInterval(
+ toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 1440) }} MINUTE
+ ) as h,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency
+FROM dns_response__v0
+WHERE
+ monitorId = {{ String(monitorId, '7417', required=True) }}
+ AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 30 DAY, 3))
+GROUP BY h
+ORDER BY h DESC
+
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__dns_metrics_latency_7d__v0.pipe b/packages/tinybird/endpoints/endpoint__dns_metrics_latency_7d__v0.pipe
index d9e3e3db0..88b995aa0 100644
--- a/packages/tinybird/endpoints/endpoint__dns_metrics_latency_7d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__dns_metrics_latency_7d__v0.pipe
@@ -1,30 +1,31 @@
-TAGS "dns"
+TOKEN "endpoint__dns_metrics_latency_7d__v1_endpoint_read_2009" READ
NODE endpoint
SQL >
- %
- SELECT
- toStartOfInterval(
- toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 30) }} MINUTE
- ) as h,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency
- FROM dns_response__v0
- WHERE
- monitorId = {{ String(monitorId, '7417', required=True) }}
- {% if defined(fromDate) %}
- AND toDateTime(timestamp / 1000) >= parseDateTimeBestEffortOrNull({{ String(fromDate) }})
- {% end %}
- {% if defined(toDate) %}
- AND toDateTime(timestamp / 1000) <= parseDateTimeBestEffortOrNull({{ String(toDate) }})
- {% end %}
- GROUP BY h
- ORDER BY h DESC
+%
+SELECT
+ toStartOfInterval(
+ toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 30) }} MINUTE
+ ) as h,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency
+FROM dns_response__v0
+WHERE
+ monitorId = {{ String(monitorId, '7417', required=True) }}
+ {% if defined(fromDate) %}
+ AND toDateTime(timestamp / 1000) >= parseDateTimeBestEffortOrNull({{ String(fromDate) }})
+ {% end %}
+ {% if defined(toDate) %}
+ AND toDateTime(timestamp / 1000) <= parseDateTimeBestEffortOrNull({{ String(toDate) }})
+ {% end %}
+GROUP BY h
+ORDER BY h DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__dns_metrics_latency_90d__v0.pipe b/packages/tinybird/endpoints/endpoint__dns_metrics_latency_90d__v0.pipe
index 7f481e995..fb6b7c1ff 100644
--- a/packages/tinybird/endpoints/endpoint__dns_metrics_latency_90d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__dns_metrics_latency_90d__v0.pipe
@@ -1,24 +1,26 @@
-TAGS "dns"
+TOKEN "endpoint__dns_metrics_latency_90d__v0_endpoint_read_8223" READ
NODE endpoint
SQL >
- %
- SELECT
- toStartOfInterval(
- toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 1440) }} MINUTE
- ) as h,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency
- FROM dns_response__v0
- WHERE
- monitorId = {{ String(monitorId, '7417', required=True) }}
- AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 90 DAY, 3))
- GROUP BY h
- ORDER BY h DESC
+%
+SELECT
+ toStartOfInterval(
+ toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 1440) }} MINUTE
+ ) as h,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency
+FROM dns_response__v0
+WHERE
+ monitorId = {{ String(monitorId, '7417', required=True) }}
+ AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 90 DAY, 3))
+GROUP BY h
+ORDER BY h DESC
+
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__dns_metrics_regions_14d__v0.pipe b/packages/tinybird/endpoints/endpoint__dns_metrics_regions_14d__v0.pipe
index b34f37df0..d4c957cb9 100644
--- a/packages/tinybird/endpoints/endpoint__dns_metrics_regions_14d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__dns_metrics_regions_14d__v0.pipe
@@ -1,26 +1,35 @@
-TAGS "dns"
+TOKEN "endpoint__dns_metrics_regions_14d__v0_endpoint_read_2343" READ
NODE endpoint
SQL >
- %
- SELECT
- region,
- toStartOfInterval(
- toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 30) }} MINUTE
- ) as h,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency
- FROM dns_response__v0
- WHERE
- monitorId = {{ String(monitorId, '7417', required=True) }}
- {% if defined(regions) %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- GROUP BY h, region
- ORDER BY h DESC
+%
+SELECT
+ region,
+ toStartOfInterval(
+ toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 30) }} MINUTE
+ ) as h,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency
+FROM dns_response__v0
+WHERE
+ monitorId = {{ String(monitorId, '7417', required=True) }}
+ -- dns_response__v0 has no TTL; cap the window like the TTL-bound http/tcp uptime MVs
+ AND toDateTime(timestamp / 1000) >= now() - INTERVAL 14 DAY
+ {% if defined(fromDate) %}
+ AND toDateTime(timestamp / 1000) >= parseDateTimeBestEffortOrNull({{ String(fromDate) }})
+ {% end %}
+ {% if defined(toDate) %}
+ AND toDateTime(timestamp / 1000) <= parseDateTimeBestEffortOrNull({{ String(toDate) }})
+ {% end %}
+ {% if defined(regions) %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+GROUP BY h, region
+ORDER BY h DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__dns_metrics_regions_30d__v0.pipe b/packages/tinybird/endpoints/endpoint__dns_metrics_regions_30d__v0.pipe
index 51e02a67e..afd5d23ca 100644
--- a/packages/tinybird/endpoints/endpoint__dns_metrics_regions_30d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__dns_metrics_regions_30d__v0.pipe
@@ -1,26 +1,28 @@
-TAGS "dns"
+TOKEN "endpoint__dns_metrics_regions_30d__v0_endpoint_read_9332" READ
NODE endpoint
SQL >
- %
- SELECT
- region,
- toStartOfInterval(
- toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 1440) }} MINUTE
- ) as h,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency
- FROM dns_response__v0
- WHERE
- monitorId = {{ String(monitorId, '7417', required=True) }}
- AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 30 DAY, 3))
- {% if defined(regions) %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- GROUP BY h, region
- ORDER BY h DESC
+%
+SELECT
+ region,
+ toStartOfInterval(
+ toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 1440) }} MINUTE
+ ) as h,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency
+FROM dns_response__v0
+WHERE
+ monitorId = {{ String(monitorId, '7417', required=True) }}
+ AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 30 DAY, 3))
+ {% if defined(regions) %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+GROUP BY h, region
+ORDER BY h DESC
+
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__dns_metrics_regions_90d__v0.pipe b/packages/tinybird/endpoints/endpoint__dns_metrics_regions_90d__v0.pipe
index 49bb57f82..bc621f83f 100644
--- a/packages/tinybird/endpoints/endpoint__dns_metrics_regions_90d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__dns_metrics_regions_90d__v0.pipe
@@ -1,26 +1,28 @@
-TAGS "dns"
+TOKEN "endpoint__dns_metrics_regions_90d__v0_endpoint_read_7062" READ
NODE endpoint
SQL >
- %
- SELECT
- region,
- toStartOfInterval(
- toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 1440) }} MINUTE
- ) as h,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency
- FROM dns_response__v0
- WHERE
- monitorId = {{ String(monitorId, '7417', required=True) }}
- AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 90 DAY, 3))
- {% if defined(regions) %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- GROUP BY h, region
- ORDER BY h DESC
+%
+SELECT
+ region,
+ toStartOfInterval(
+ toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 1440) }} MINUTE
+ ) as h,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency
+FROM dns_response__v0
+WHERE
+ monitorId = {{ String(monitorId, '7417', required=True) }}
+ AND timestamp >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 90 DAY, 3))
+ {% if defined(regions) %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+GROUP BY h, region
+ORDER BY h DESC
+
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__dns_status_45d__v0.pipe b/packages/tinybird/endpoints/endpoint__dns_status_45d__v0.pipe
index 49376ca4f..09ecabf32 100644
--- a/packages/tinybird/endpoints/endpoint__dns_status_45d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__dns_status_45d__v0.pipe
@@ -1,20 +1,21 @@
-TAGS "dns"
+TOKEN "endpoint__dns_status_45d__v1_endpoint_read_7024" READ
NODE endpoint
SQL >
- %
- SELECT
- time as day,
- monitorId,
- countMerge(count) as count,
- countMerge(success) as ok,
- countMerge(error) as error,
- countMerge(degraded) as degraded
- FROM mv__dns_status_45d__v0
- WHERE monitorId IN {{ Array(monitorIds, 'String', '7417') }}
- GROUP BY day, monitorId
- ORDER BY day DESC
+%
+SELECT
+ time as day,
+ monitorId,
+ countMerge(count) as count,
+ countMerge(success) as ok,
+ countMerge(error) as error,
+ countMerge(degraded) as degraded
+FROM mv__dns_status_45d__v0
+WHERE monitorId IN {{ Array(monitorIds, 'String', '7417') }}
+GROUP BY day, monitorId
+ORDER BY day DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__dns_uptime_30d__v0.pipe b/packages/tinybird/endpoints/endpoint__dns_uptime_30d__v0.pipe
index 1a7b9fc61..352960a43 100644
--- a/packages/tinybird/endpoints/endpoint__dns_uptime_30d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__dns_uptime_30d__v0.pipe
@@ -1,30 +1,31 @@
-TAGS "dns"
+TOKEN "endpoint__dns_uptime_30d__v1_endpoint_read_4617" READ
NODE endpoint
SQL >
- %
- SELECT
- toStartOfInterval(
- toDateTime(timestamp / 1000), INTERVAL {{ String(interval, '30', required=True) }} minute
- ) AS interval,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error
- FROM dns_response__v0
- WHERE
- monitorId = {{ String(monitorId, '7417', required=True) }}
- -- dns_response__v0 has no TTL; cap the window like the TTL-bound http/tcp uptime MVs
- AND toDateTime(timestamp / 1000) >= now() - INTERVAL 30 DAY
- {% if defined(fromDate) %}
- AND toDateTime(timestamp / 1000) >= parseDateTimeBestEffortOrNull({{ String(fromDate) }})
- {% end %}
- {% if defined(toDate) %}
- AND toDateTime(timestamp / 1000) <= parseDateTimeBestEffortOrNull({{ String(toDate) }})
- {% end %}
- {% if defined(regions) %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- GROUP BY interval
- ORDER BY interval DESC
+%
+SELECT
+ toStartOfInterval(
+ toDateTime(timestamp / 1000), INTERVAL {{ String(interval, '30', required=True) }} minute
+ ) AS interval,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error
+FROM dns_response__v0
+WHERE
+ monitorId = {{ String(monitorId, '7417', required=True) }}
+ -- dns_response__v0 has no TTL; cap the window like the TTL-bound http/tcp uptime MVs
+ AND toDateTime(timestamp / 1000) >= now() - INTERVAL 30 DAY
+ {% if defined(fromDate) %}
+ AND toDateTime(timestamp / 1000) >= parseDateTimeBestEffortOrNull({{ String(fromDate) }})
+ {% end %}
+ {% if defined(toDate) %}
+ AND toDateTime(timestamp / 1000) <= parseDateTimeBestEffortOrNull({{ String(toDate) }})
+ {% end %}
+ {% if defined(regions) %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+GROUP BY interval
+ORDER BY interval DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__dns_uptime_90d__v0.pipe b/packages/tinybird/endpoints/endpoint__dns_uptime_90d__v0.pipe
index 8ea04645d..e3260abce 100644
--- a/packages/tinybird/endpoints/endpoint__dns_uptime_90d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__dns_uptime_90d__v0.pipe
@@ -1,29 +1,31 @@
-TAGS "dns"
+TOKEN "endpoint__dns_uptime_90d__v0_endpoint_read_3446" READ
NODE endpoint
SQL >
- %
- SELECT
- toStartOfInterval(
- toDateTime(timestamp / 1000), INTERVAL {{ String(interval, '1440', required=True) }} minute
- ) AS interval,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error
- FROM dns_response__v0
- WHERE
- monitorId = {{ String(monitorId, '7417', required=True) }}
- -- dns_response__v0 has no TTL; cap the window like the TTL-bound http/tcp uptime MVs
- AND toDateTime(timestamp / 1000) >= now() - INTERVAL 90 DAY
- {% if defined(fromDate) %}
- AND toDateTime(timestamp / 1000) >= parseDateTimeBestEffortOrNull({{ String(fromDate) }})
- {% end %}
- {% if defined(toDate) %}
- AND toDateTime(timestamp / 1000) <= parseDateTimeBestEffortOrNull({{ String(toDate) }})
- {% end %}
- {% if defined(regions) %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- GROUP BY interval
- ORDER BY interval DESC
+%
+SELECT
+ toStartOfInterval(
+ toDateTime(timestamp / 1000), INTERVAL {{ String(interval, '1440', required=True) }} minute
+ ) AS interval,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error
+FROM dns_response__v0
+WHERE
+ monitorId = {{ String(monitorId, '7417', required=True) }}
+ -- dns_response__v0 has no TTL; cap the window like the TTL-bound http/tcp uptime MVs
+ AND toDateTime(timestamp / 1000) >= now() - INTERVAL 90 DAY
+ {% if defined(fromDate) %}
+ AND toDateTime(timestamp / 1000) >= parseDateTimeBestEffortOrNull({{ String(fromDate) }})
+ {% end %}
+ {% if defined(toDate) %}
+ AND toDateTime(timestamp / 1000) <= parseDateTimeBestEffortOrNull({{ String(toDate) }})
+ {% end %}
+ {% if defined(regions) %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+GROUP BY interval
+ORDER BY interval DESC
+
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__external_status.pipe b/packages/tinybird/endpoints/endpoint__external_status.pipe
deleted file mode 100644
index 39f276fcb..000000000
--- a/packages/tinybird/endpoints/endpoint__external_status.pipe
+++ /dev/null
@@ -1,13 +0,0 @@
-VERSION 0
-NODE external_status_0
-SQL >
-
- %
- SELECT *
- FROM external_status
- WHERE name = {{ String(name, 'OpenAI') }}
- ORDER BY fetched_at DESC
- LIMIT {{ Int16(limit, 10000) }}
-
-
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__external_status_component_history__v0.pipe b/packages/tinybird/endpoints/endpoint__external_status_component_history__v0.pipe
index d7b092554..e7a61f52a 100644
--- a/packages/tinybird/endpoints/endpoint__external_status_component_history__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__external_status_component_history__v0.pipe
@@ -1,9 +1,9 @@
-TAGS "external_status"
+TOKEN "endpoint__external_status_component_history__v0_endpoint_read_4435" READ
-NODE history
+NODE endpoint
SQL >
- %
+%
SELECT
day,
component_id,
@@ -18,4 +18,6 @@ SQL >
GROUP BY day, component_id
ORDER BY day ASC
-TYPE ENDPOINT
+TYPE endpoint
+
+
diff --git a/packages/tinybird/endpoints/endpoint__external_status_component_latest__v0.pipe b/packages/tinybird/endpoints/endpoint__external_status_component_latest__v0.pipe
index 1b0f3afd5..ecda61dd1 100644
--- a/packages/tinybird/endpoints/endpoint__external_status_component_latest__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__external_status_component_latest__v0.pipe
@@ -1,16 +1,18 @@
-TAGS "external_status_component"
+TOKEN "endpoint__external_statuscomponent__latest__v0_endpoint_read_4246" READ
-NODE latest
+NODE endpoint
SQL >
- %
- SELECT
- component_id,
- argMax(indicator, fetched_at) AS indicator,
- argMax(status, fetched_at) AS status,
- max(fetched_at) AS last_fetched_at
- FROM external_status_component__v0
- WHERE component_id IN {{ Array(component_ids, 'String') }}
- GROUP BY component_id
+%
+SELECT
+ component_id,
+ argMax(indicator, fetched_at) AS indicator,
+ argMax(status, fetched_at) AS status,
+ max(fetched_at) AS last_fetched_at
+FROM external_status_component__v0
+WHERE component_id IN {{ Array(component_ids, 'String') }}
+GROUP BY component_id
+
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__external_status_history__v0.pipe b/packages/tinybird/endpoints/endpoint__external_status_history__v0.pipe
index adc9136fc..9c6a8925b 100644
--- a/packages/tinybird/endpoints/endpoint__external_status_history__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__external_status_history__v0.pipe
@@ -1,9 +1,9 @@
-TAGS "external_status"
+TOKEN "endpoint_external_status_history__v0_endpoint_read_3031" READ
-NODE history
+NODE endpoint
SQL >
- %
+%
SELECT
day,
id,
@@ -18,4 +18,6 @@ SQL >
GROUP BY day, id
ORDER BY day ASC
-TYPE ENDPOINT
+TYPE endpoint
+
+
diff --git a/packages/tinybird/endpoints/endpoint__external_status_latest__v1.pipe b/packages/tinybird/endpoints/endpoint__external_status_latest__v1.pipe
index dd2f3e185..d5db855fd 100644
--- a/packages/tinybird/endpoints/endpoint__external_status_latest__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__external_status_latest__v1.pipe
@@ -1,9 +1,9 @@
-TAGS "external_status"
+TOKEN "endpoint_external_status_latest__v1_endpoint_read_9973" READ
-NODE latest
+NODE endpoint
SQL >
- %
+%
SELECT
id,
argMax(indicator, fetched_at) AS indicator,
@@ -18,4 +18,6 @@ SQL >
{% end %}
GROUP BY id
-TYPE ENDPOINT
+TYPE endpoint
+
+
diff --git a/packages/tinybird/endpoints/endpoint__http_get_14d__v0.pipe b/packages/tinybird/endpoints/endpoint__http_get_14d__v0.pipe
index 51a913609..12a310207 100644
--- a/packages/tinybird/endpoints/endpoint__http_get_14d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_get_14d__v0.pipe
@@ -1,15 +1,16 @@
-TAGS "http"
+TOKEN "endpoint__http_get_14d__v0_endpoint_read_1831" READ
NODE endpoint
SQL >
- %
- SELECT *
- FROM mv__http_full_14d__v0
- WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
- AND id = {{ String(id, '', required=True) }}
- ORDER BY time DESC
+%
+SELECT *
+FROM mv__http_full_14d__v0
+WHERE
+ monitorId = {{ String(monitorId, '1', required=True) }}
+ AND id = {{ String(id, '', required=True) }}
+ORDER BY time DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_get_30d.pipe b/packages/tinybird/endpoints/endpoint__http_get_30d__v0.pipe
similarity index 88%
rename from packages/tinybird/endpoints/endpoint__http_get_30d.pipe
rename to packages/tinybird/endpoints/endpoint__http_get_30d__v0.pipe
index 2323a7e74..9ded3f7a4 100644
--- a/packages/tinybird/endpoints/endpoint__http_get_30d.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_get_30d__v0.pipe
@@ -1,11 +1,7 @@
-VERSION 0
-
-TAGS http
-
NODE endpoint
SQL >
- %
+%
SELECT *
FROM mv__http_full_30d__v0
WHERE
@@ -14,6 +10,6 @@ SQL >
AND region = {{ String(region, 'ams', required=True) }}
ORDER BY cronTimestamp DESC
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_list_14d.pipe b/packages/tinybird/endpoints/endpoint__http_list_14d__v0.pipe
similarity index 80%
rename from packages/tinybird/endpoints/endpoint__http_list_14d.pipe
rename to packages/tinybird/endpoints/endpoint__http_list_14d__v0.pipe
index 52040df31..73eb6593f 100644
--- a/packages/tinybird/endpoints/endpoint__http_list_14d.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_list_14d__v0.pipe
@@ -1,15 +1,12 @@
-VERSION 0
-
-TAGS http
-
NODE endpoint
SQL >
- %
+%
SELECT * FROM mv__http_14d__v0
WHERE
monitorId = {{ String(monitorId, '1', required=True) }}
ORDER BY cronTimestamp DESC
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_list_14d__v1.pipe b/packages/tinybird/endpoints/endpoint__http_list_14d__v1.pipe
index fa5313f20..f8157dd61 100644
--- a/packages/tinybird/endpoints/endpoint__http_list_14d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_list_14d__v1.pipe
@@ -1,23 +1,22 @@
-TAGS "http"
+TOKEN "endpoint__http_list_14d__v1_endpoint_read_5685" READ
NODE endpoint
SQL >
- %
- SELECT * FROM mv__http_14d__v1
- WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
- {% if defined(fromDate) %}
- AND time >= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(fromDate) }})))
- {% end %}
- {% if defined(toDate) %}
- AND time <= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(toDate) }})))
- {% end %}
- ORDER BY time DESC
- {% if defined(limit) %}
- LIMIT {{ Int32(limit) }}
- OFFSET {{ Int32(offset, 0) }}
- {% end %}
+%
+SELECT *
+FROM mv__http_14d__v1
+WHERE
+ monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if defined(fromDate) %}
+ AND time >= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(fromDate) }})))
+ {% end %}
+ {% if defined(toDate) %}
+ AND time <= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(toDate) }})))
+ {% end %}
+ORDER BY time DESC
+{% if defined(limit) %} LIMIT {{ Int32(limit) }} OFFSET {{ Int32(offset, 0) }} {% end %}
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_list_1d.pipe b/packages/tinybird/endpoints/endpoint__http_list_1d__v0.pipe
similarity index 80%
rename from packages/tinybird/endpoints/endpoint__http_list_1d.pipe
rename to packages/tinybird/endpoints/endpoint__http_list_1d__v0.pipe
index 195642841..f8b5066b2 100644
--- a/packages/tinybird/endpoints/endpoint__http_list_1d.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_list_1d__v0.pipe
@@ -1,15 +1,12 @@
-VERSION 0
-
-TAGS http
-
NODE endpoint
SQL >
- %
+%
SELECT * FROM mv__http_1d__v0
WHERE
monitorId = {{ String(monitorId, '1', required=True) }}
ORDER BY cronTimestamp DESC
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_list_1d__v1.pipe b/packages/tinybird/endpoints/endpoint__http_list_1d__v1.pipe
index 9537927d2..8c613ac76 100644
--- a/packages/tinybird/endpoints/endpoint__http_list_1d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_list_1d__v1.pipe
@@ -1,19 +1,17 @@
-TAGS "http"
+TOKEN "endpoint__http_list_1d__v1_endpoint_read_1903" READ
NODE endpoint
SQL >
- %
- SELECT * FROM mv__http_1d__v1
- WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
- {% if defined(fromDate) %}
- AND time >= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(fromDate) }})))
- {% end %}
- {% if defined(toDate) %}
- AND time <= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(toDate) }})))
- {% end %}
- ORDER BY time DESC
+%
+SELECT *
+FROM mv__http_1d__v1
+WHERE
+ monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if defined(fromDate) %} AND time >= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(fromDate) }}))) {% end %}
+ {% if defined(toDate) %} AND time <= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(toDate) }}))) {% end %}
+ORDER BY time DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_list_7d.pipe b/packages/tinybird/endpoints/endpoint__http_list_7d__v0.pipe
similarity index 80%
rename from packages/tinybird/endpoints/endpoint__http_list_7d.pipe
rename to packages/tinybird/endpoints/endpoint__http_list_7d__v0.pipe
index 827af3434..905cddd04 100644
--- a/packages/tinybird/endpoints/endpoint__http_list_7d.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_list_7d__v0.pipe
@@ -1,15 +1,12 @@
-VERSION 0
-
-TAGS http
-
NODE endpoint
SQL >
- %
+%
SELECT * FROM mv__http_7d__v0
WHERE
monitorId = {{ String(monitorId, '1', required=True) }}
ORDER BY cronTimestamp DESC
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_list_7d__v1.pipe b/packages/tinybird/endpoints/endpoint__http_list_7d__v1.pipe
index 934891dce..67dd0dbd8 100644
--- a/packages/tinybird/endpoints/endpoint__http_list_7d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_list_7d__v1.pipe
@@ -1,19 +1,17 @@
-TAGS "http"
+TOKEN "endpoint__http_list_7d__v1_endpoint_read_3587" READ
NODE endpoint
SQL >
- %
- SELECT * FROM mv__http_7d__v1
- WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
- {% if defined(fromDate) %}
- AND time >= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(fromDate) }})))
- {% end %}
- {% if defined(toDate) %}
- AND time <= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(toDate) }})))
- {% end %}
- ORDER BY time DESC
+%
+SELECT *
+FROM mv__http_7d__v1
+WHERE
+ monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if defined(fromDate) %} AND time >= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(fromDate) }}))) {% end %}
+ {% if defined(toDate) %} AND time <= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(toDate) }}))) {% end %}
+ORDER BY time DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_14d.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_14d__v0.pipe
similarity index 86%
rename from packages/tinybird/endpoints/endpoint__http_metrics_14d.pipe
rename to packages/tinybird/endpoints/endpoint__http_metrics_14d__v0.pipe
index f32a91a73..0fe9dd539 100644
--- a/packages/tinybird/endpoints/endpoint__http_metrics_14d.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_metrics_14d__v0.pipe
@@ -1,11 +1,7 @@
-VERSION 0
-
-TAGS http
-
NODE endpoint
SQL >
- %
+%
SELECT
round(quantile(0.50)(latency)) as p50Latency,
round(quantile(0.75)(latency)) as p75Latency,
@@ -18,6 +14,7 @@ SQL >
FROM mv__http_14d__v0
WHERE
monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
AND time >= toDateTime64(now() - INTERVAL 14 DAY, 3)
UNION ALL
SELECT
@@ -32,8 +29,10 @@ SQL >
FROM mv__http_30d__v0
WHERE
monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
AND time >= toDateTime64(now() - INTERVAL 28 DAY, 3)
AND time < toDateTime64(now() - INTERVAL 14 DAY, 3)
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_14d__v1.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_14d__v1.pipe
index f3e47727f..d5ea3ee7c 100644
--- a/packages/tinybird/endpoints/endpoint__http_metrics_14d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_metrics_14d__v1.pipe
@@ -1,42 +1,44 @@
-TAGS "http"
+TOKEN "endpoint__http_metrics_14d__v1_endpoint_read_3605" READ
NODE endpoint
SQL >
- %
- SELECT
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency,
- count() as count,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error,
- max(cronTimestamp) AS lastTimestamp
- FROM mv__http_14d__v1
- WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
- AND time >= toDateTime64(now() - INTERVAL 14 DAY, 3)
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- UNION ALL
- SELECT
- round(quantile(0.50)(latency)) AS p50Latency,
- round(quantile(0.75)(latency)) AS p75Latency,
- round(quantile(0.90)(latency)) AS p90Latency,
- round(quantile(0.95)(latency)) AS p95Latency,
- round(quantile(0.99)(latency)) AS p99Latency,
- count() as count,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error,
- NULL as lastTimestamp -- no need to query the `lastTimestamp` as not relevant
- FROM mv__http_30d__v1
- WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
- AND time >= toDateTime64(now() - INTERVAL 28 DAY, 3)
- AND time < toDateTime64(now() - INTERVAL 14 DAY, 3)
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+%
+ SELECT
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency,
+ count() as count,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error,
+ max(cronTimestamp) AS lastTimestamp
+ FROM mv__http_14d__v1
+ WHERE
+ monitorId = {{ String(monitorId, '1', required=True) }}
+ AND time >= toDateTime64(now() - INTERVAL 14 DAY, 3)
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+ UNION ALL
+ SELECT
+ round(quantile(0.50)(latency)) AS p50Latency,
+ round(quantile(0.75)(latency)) AS p75Latency,
+ round(quantile(0.90)(latency)) AS p90Latency,
+ round(quantile(0.95)(latency)) AS p95Latency,
+ round(quantile(0.99)(latency)) AS p99Latency,
+ count() as count,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error,
+ NULL as lastTimestamp -- no need to query the `lastTimestamp` as not relevant
+ FROM mv__http_30d__v1
+ WHERE
+ monitorId = {{ String(monitorId, '1', required=True) }}
+ AND time >= toDateTime64(now() - INTERVAL 28 DAY, 3)
+ AND time < toDateTime64(now() - INTERVAL 14 DAY, 3)
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_1d.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_1d__v0.pipe
similarity index 50%
rename from packages/tinybird/endpoints/endpoint__http_metrics_1d.pipe
rename to packages/tinybird/endpoints/endpoint__http_metrics_1d__v0.pipe
index cf79d736b..8d65d0596 100644
--- a/packages/tinybird/endpoints/endpoint__http_metrics_1d.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_metrics_1d__v0.pipe
@@ -1,39 +1,38 @@
-VERSION 0
-
-TAGS http
-
NODE endpoint
SQL >
- %
+%
SELECT
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency,
+ round(quantile(0.5)(latency), 0) as p50Latency,
+ round(quantile(0.75)(latency), 0) as p75Latency,
+ round(quantile(0.9)(latency), 0) as p90Latency,
+ round(quantile(0.95)(latency), 0) as p95Latency,
+ round(quantile(0.99)(latency), 0) as p99Latency,
count() as count,
count(if(error = 0, 1, NULL)) AS ok,
max(cronTimestamp) AS lastTimestamp
FROM mv__http_1d__v0
WHERE
monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
AND time >= toDateTime64(now() - INTERVAL 1 DAY, 3)
UNION ALL
SELECT
- round(quantile(0.50)(latency)) AS p50Latency,
- round(quantile(0.75)(latency)) AS p75Latency,
- round(quantile(0.90)(latency)) AS p90Latency,
- round(quantile(0.95)(latency)) AS p95Latency,
- round(quantile(0.99)(latency)) AS p99Latency,
+ round(quantile(0.5)(latency), 0) as p50Latency,
+ round(quantile(0.75)(latency), 0) as p75Latency,
+ round(quantile(0.9)(latency), 0) as p90Latency,
+ round(quantile(0.95)(latency), 0) as p95Latency,
+ round(quantile(0.99)(latency), 0) 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 mv__http_7d__v0 -- REMINDER: this will increase the processed data compared to 3d
WHERE
monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
AND time >= toDateTime64(now() - INTERVAL 2 DAY, 3)
AND time < toDateTime64(now() - INTERVAL 1 DAY, 3)
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_1d__v1.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_1d__v1.pipe
index db605bf16..7d9fca661 100644
--- a/packages/tinybird/endpoints/endpoint__http_metrics_1d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_metrics_1d__v1.pipe
@@ -1,43 +1,44 @@
-TAGS "http"
+TOKEN "endpoint__http_metrics_1d__v1_endpoint_read_2577" READ
NODE endpoint
SQL >
- %
- SELECT
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency,
- count() as count,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error,
- max(cronTimestamp) AS lastTimestamp
- FROM mv__http_1d__v1
- WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
- AND time >= toDateTime64(now() - INTERVAL 1 DAY, 3)
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- UNION ALL
- SELECT
- round(quantile(0.50)(latency)) AS p50Latency,
- round(quantile(0.75)(latency)) AS p75Latency,
- round(quantile(0.90)(latency)) AS p90Latency,
- round(quantile(0.95)(latency)) AS p95Latency,
- round(quantile(0.99)(latency)) AS p99Latency,
- count() as count,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error,
- NULL as lastTimestamp -- no need to query the `lastTimestamp` as not relevant
- FROM mv__http_7d__v1
- WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
- AND time >= toDateTime64(now() - INTERVAL 2 DAY, 3)
- AND time < toDateTime64(now() - INTERVAL 1 DAY, 3)
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+%
+ SELECT
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency,
+ count() as count,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error,
+ max(cronTimestamp) AS lastTimestamp
+ FROM mv__http_1d__v1
+ WHERE
+ monitorId = {{ String(monitorId, '1', required=True) }}
+ AND time >= toDateTime64(now() - INTERVAL 1 DAY, 3)
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+ UNION ALL
+ SELECT
+ round(quantile(0.50)(latency)) AS p50Latency,
+ round(quantile(0.75)(latency)) AS p75Latency,
+ round(quantile(0.90)(latency)) AS p90Latency,
+ round(quantile(0.95)(latency)) AS p95Latency,
+ round(quantile(0.99)(latency)) AS p99Latency,
+ count() as count,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error,
+ NULL as lastTimestamp -- no need to query the `lastTimestamp` as not relevant
+ FROM mv__http_7d__v1
+ WHERE
+ monitorId = {{ String(monitorId, '1', required=True) }}
+ AND time >= toDateTime64(now() - INTERVAL 2 DAY, 3)
+ AND time < toDateTime64(now() - INTERVAL 1 DAY, 3)
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_30d__v1.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_30d__v1.pipe
index 5e1b67d1f..7e338a650 100644
--- a/packages/tinybird/endpoints/endpoint__http_metrics_30d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_metrics_30d__v1.pipe
@@ -1,9 +1,9 @@
-TAGS "http"
+TOKEN "endpoint__http_metrics_30d__v1_endpoint_read_7611" READ
NODE endpoint
SQL >
- %
+%
SELECT
round(quantile(0.50)(latency)) as p50Latency,
round(quantile(0.75)(latency)) as p75Latency,
@@ -39,4 +39,6 @@ SQL >
AND time < toDateTime64(now() - INTERVAL 30 DAY, 3)
{% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
-TYPE ENDPOINT
+TYPE endpoint
+
+
diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_7d.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_7d__v0.pipe
similarity index 86%
rename from packages/tinybird/endpoints/endpoint__http_metrics_7d.pipe
rename to packages/tinybird/endpoints/endpoint__http_metrics_7d__v0.pipe
index fe7448e38..58eb8687b 100644
--- a/packages/tinybird/endpoints/endpoint__http_metrics_7d.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_metrics_7d__v0.pipe
@@ -1,11 +1,7 @@
-VERSION 0
-
-TAGS http
-
NODE endpoint
SQL >
- %
+%
SELECT
round(quantile(0.50)(latency)) as p50Latency,
round(quantile(0.75)(latency)) as p75Latency,
@@ -18,6 +14,7 @@ SQL >
FROM mv__http_7d__v0
WHERE
monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
AND time >= toDateTime64(now() - INTERVAL 7 DAY, 3)
UNION ALL
SELECT
@@ -32,8 +29,10 @@ SQL >
FROM mv__http_14d__v0
WHERE
monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
AND time >= toDateTime64(now() - INTERVAL 14 DAY, 3)
AND time < toDateTime64(now() - INTERVAL 7 DAY, 3)
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_7d__v1.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_7d__v1.pipe
index 06540408f..2785f5a2f 100644
--- a/packages/tinybird/endpoints/endpoint__http_metrics_7d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_metrics_7d__v1.pipe
@@ -1,42 +1,44 @@
-TAGS "http"
+TOKEN "endpoint__http_metrics_7d__v1_endpoint_read_5469" READ
NODE endpoint
SQL >
- %
- SELECT
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency,
- count() as count,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error,
- max(cronTimestamp) AS lastTimestamp
- FROM mv__http_7d__v1
- WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
- AND time >= toDateTime64(now() - INTERVAL 7 DAY, 3)
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- UNION ALL
- SELECT
- round(quantile(0.50)(latency)) AS p50Latency,
- round(quantile(0.75)(latency)) AS p75Latency,
- round(quantile(0.90)(latency)) AS p90Latency,
- round(quantile(0.95)(latency)) AS p95Latency,
- round(quantile(0.99)(latency)) AS p99Latency,
- count() as count,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error,
- NULL as lastTimestamp -- no need to query the `lastTimestamp` as not relevant
- FROM mv__http_14d__v1
- WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
- AND time >= toDateTime64(now() - INTERVAL 14 DAY, 3)
- AND time < toDateTime64(now() - INTERVAL 7 DAY, 3)
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+%
+ SELECT
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency,
+ count() as count,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error,
+ max(cronTimestamp) AS lastTimestamp
+ FROM mv__http_7d__v1
+ WHERE
+ monitorId = {{ String(monitorId, '1', required=True) }}
+ AND time >= toDateTime64(now() - INTERVAL 7 DAY, 3)
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+ UNION ALL
+ SELECT
+ round(quantile(0.50)(latency)) AS p50Latency,
+ round(quantile(0.75)(latency)) AS p75Latency,
+ round(quantile(0.90)(latency)) AS p90Latency,
+ round(quantile(0.95)(latency)) AS p95Latency,
+ round(quantile(0.99)(latency)) AS p99Latency,
+ count() as count,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error,
+ NULL as lastTimestamp -- no need to query the `lastTimestamp` as not relevant
+ FROM mv__http_14d__v1
+ WHERE
+ monitorId = {{ String(monitorId, '1', required=True) }}
+ AND time >= toDateTime64(now() - INTERVAL 14 DAY, 3)
+ AND time < toDateTime64(now() - INTERVAL 7 DAY, 3)
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_90d__v1.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_90d__v1.pipe
index af1364187..4af8b3467 100644
--- a/packages/tinybird/endpoints/endpoint__http_metrics_90d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_metrics_90d__v1.pipe
@@ -1,39 +1,41 @@
-TAGS "http"
+TOKEN "endpoint__http_metrics_90d__v1_endpoint_read_2698" READ
NODE endpoint
SQL >
- %
- SELECT
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency,
- count() as count,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error,
- max(cronTimestamp) AS lastTimestamp
- FROM mv__http_90d__v1
- WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
- AND time >= toDateTime64(now() - INTERVAL 90 DAY, 3)
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- UNION ALL
- -- the previous 90d window (90-180d ago) is past the 90d MV TTL, so there's no
- -- real comparison data. emit an empty row to keep the 2-row contract; count 0
- -- makes the client suppress the trend badge (NaN).
- SELECT
- 0 AS p50Latency,
- 0 AS p75Latency,
- 0 AS p90Latency,
- 0 AS p95Latency,
- 0 AS p99Latency,
- 0 AS count,
- 0 AS success,
- 0 AS degraded,
- 0 AS error,
- NULL AS lastTimestamp
+%
+SELECT
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency,
+ count() as count,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error,
+ max(cronTimestamp) AS lastTimestamp
+FROM mv__http_90d__v1
+WHERE
+ monitorId = {{ String(monitorId, '1', required=True) }}
+ AND time >= toDateTime64(now() - INTERVAL 90 DAY, 3)
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+UNION ALL
+-- the previous 90d window (90-180d ago) is past the 90d MV TTL, so there's no
+-- real comparison data. emit an empty row to keep the 2-row contract; count 0
+-- makes the client suppress the trend badge (NaN).
+SELECT
+ 0 AS p50Latency,
+ 0 AS p75Latency,
+ 0 AS p90Latency,
+ 0 AS p95Latency,
+ 0 AS p99Latency,
+ 0 AS count,
+ 0 AS success,
+ 0 AS degraded,
+ 0 AS error,
+ NULL AS lastTimestamp
+
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_by_interval_14d.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_by_interval_14d__v0.pipe
similarity index 87%
rename from packages/tinybird/endpoints/endpoint__http_metrics_by_interval_14d.pipe
rename to packages/tinybird/endpoints/endpoint__http_metrics_by_interval_14d__v0.pipe
index a738bbcba..5873b9f25 100644
--- a/packages/tinybird/endpoints/endpoint__http_metrics_by_interval_14d.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_metrics_by_interval_14d__v0.pipe
@@ -1,11 +1,7 @@
-VERSION 0
-
-TAGS http
-
NODE endpoint
SQL >
- %
+%
SELECT
region,
toStartOfInterval(
@@ -21,8 +17,10 @@ SQL >
FROM mv__http_14d__v0
WHERE
monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
GROUP BY h, region
ORDER BY h DESC
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_by_interval_1d.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_by_interval_1d__v0.pipe
similarity index 87%
rename from packages/tinybird/endpoints/endpoint__http_metrics_by_interval_1d.pipe
rename to packages/tinybird/endpoints/endpoint__http_metrics_by_interval_1d__v0.pipe
index 3ea88c6a3..78b7a28a6 100644
--- a/packages/tinybird/endpoints/endpoint__http_metrics_by_interval_1d.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_metrics_by_interval_1d__v0.pipe
@@ -1,11 +1,7 @@
-VERSION 0
-
-TAGS http
-
NODE endpoint
SQL >
- %
+%
SELECT
region,
toStartOfInterval(
@@ -21,8 +17,10 @@ SQL >
FROM mv__http_1d__v0
WHERE
monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
GROUP BY h, region
ORDER BY h DESC
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_by_interval_7d.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_by_interval_7d__v0.pipe
similarity index 94%
rename from packages/tinybird/endpoints/endpoint__http_metrics_by_interval_7d.pipe
rename to packages/tinybird/endpoints/endpoint__http_metrics_by_interval_7d__v0.pipe
index 342494b1a..1ba066ec1 100644
--- a/packages/tinybird/endpoints/endpoint__http_metrics_by_interval_7d.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_metrics_by_interval_7d__v0.pipe
@@ -1,11 +1,7 @@
-VERSION 0
-
-TAGS http
-
NODE endpoint
SQL >
- %
+%
SELECT
region,
toStartOfInterval(
@@ -24,5 +20,6 @@ SQL >
GROUP BY h, region
ORDER BY h DESC
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_by_region_14d.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_by_region_14d__v0.pipe
similarity index 82%
rename from packages/tinybird/endpoints/endpoint__http_metrics_by_region_14d.pipe
rename to packages/tinybird/endpoints/endpoint__http_metrics_by_region_14d__v0.pipe
index 2e985e4bd..0dbd1f295 100644
--- a/packages/tinybird/endpoints/endpoint__http_metrics_by_region_14d.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_metrics_by_region_14d__v0.pipe
@@ -1,11 +1,7 @@
-VERSION 0
-
-TAGS http
-
NODE endpoint
SQL >
- %
+%
SELECT
region,
round(quantile(0.5)(latency)) as p50Latency,
@@ -18,11 +14,9 @@ SQL >
FROM mv__http_14d__v0
WHERE
monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
GROUP BY region
+TYPE endpoint
-
-
-
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_by_region_1d.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_by_region_1d__v0.pipe
similarity index 82%
rename from packages/tinybird/endpoints/endpoint__http_metrics_by_region_1d.pipe
rename to packages/tinybird/endpoints/endpoint__http_metrics_by_region_1d__v0.pipe
index 28572163a..606a00e86 100644
--- a/packages/tinybird/endpoints/endpoint__http_metrics_by_region_1d.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_metrics_by_region_1d__v0.pipe
@@ -1,11 +1,7 @@
-VERSION 0
-
-TAGS http
-
NODE endpoint
SQL >
- %
+%
SELECT
region,
round(quantile(0.5)(latency)) as p50Latency,
@@ -18,8 +14,9 @@ SQL >
FROM mv__http_1d__v0
WHERE
monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
GROUP BY region
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_by_region_7d.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_by_region_7d__v0.pipe
similarity index 82%
rename from packages/tinybird/endpoints/endpoint__http_metrics_by_region_7d.pipe
rename to packages/tinybird/endpoints/endpoint__http_metrics_by_region_7d__v0.pipe
index dfe49ac29..17cbe0448 100644
--- a/packages/tinybird/endpoints/endpoint__http_metrics_by_region_7d.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_metrics_by_region_7d__v0.pipe
@@ -1,11 +1,7 @@
-VERSION 0
-
-TAGS http
-
NODE endpoint
SQL >
- %
+%
SELECT
region,
round(quantile(0.5)(latency)) as p50Latency,
@@ -18,8 +14,9 @@ SQL >
FROM mv__http_7d__v0
WHERE
monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
GROUP BY region
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_global_1d__v0.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_global_1d__v0.pipe
index d71390252..0b84fefa5 100644
--- a/packages/tinybird/endpoints/endpoint__http_metrics_global_1d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_metrics_global_1d__v0.pipe
@@ -1,25 +1,24 @@
-VERSION 0
-
-TAGS "http"
+TOKEN "endpoint__http_metrics_global_1d__v1_endpoint_read_4114" READ
NODE endpoint
SQL >
- %
- SELECT
- round(min(latency), 0) as minLatency,
- round(max(latency), 0) as maxLatency,
- round(quantile(0.5)(latency), 0) as p50Latency,
- round(quantile(0.75)(latency), 0) as p75Latency,
- round(quantile(0.9)(latency), 0) as p90Latency,
- round(quantile(0.95)(latency), 0) as p95Latency,
- round(quantile(0.99)(latency), 0) as p99Latency,
- max(cronTimestamp) as lastTimestamp,
- count() as count,
- monitorId
- FROM mv__http_1d__v1
- WHERE monitorId IN {{ Array(monitorIds, 'String', '1') }}
- GROUP BY monitorId
+%
+SELECT
+ round(min(latency), 0) as minLatency,
+ round(max(latency), 0) as maxLatency,
+ round(quantile(0.5)(latency), 0) as p50Latency,
+ round(quantile(0.75)(latency), 0) as p75Latency,
+ round(quantile(0.9)(latency), 0) as p90Latency,
+ round(quantile(0.95)(latency), 0) as p95Latency,
+ round(quantile(0.99)(latency), 0) as p99Latency,
+ max(cronTimestamp) as lastTimestamp,
+ count() as count,
+ monitorId
+FROM mv__http_1d__v0
+WHERE monitorId IN {{ Array(monitorIds, 'String', '1') }}
+GROUP BY monitorId
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_latency_1d__v1.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_latency_1d__v1.pipe
index d8288ac9c..cdc9de5f4 100644
--- a/packages/tinybird/endpoints/endpoint__http_metrics_latency_1d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_metrics_latency_1d__v1.pipe
@@ -1,24 +1,25 @@
-TAGS "tcp"
+TOKEN "endpoint__http_metrics_latency_1d__v1_endpoint_read_0329" READ
NODE endpoint
SQL >
- %
- SELECT
- toStartOfInterval(
- toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 30) }} MINUTE
- ) as h,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency
- FROM mv__http_1d__v1
- WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
- GROUP BY h
- ORDER BY h DESC
+%
+SELECT
+ toStartOfInterval(
+ toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 30) }} MINUTE
+ ) as h,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency
+FROM mv__http_1d__v0
+WHERE
+ monitorId = {{ String(monitorId, '1', required=True) }}
+GROUP BY h
+ORDER BY h DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_latency_1d_multi__v1.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_latency_1d_multi__v1.pipe
index 746c76ca9..176283d28 100644
--- a/packages/tinybird/endpoints/endpoint__http_metrics_latency_1d_multi__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_metrics_latency_1d_multi__v1.pipe
@@ -1,25 +1,26 @@
-TAGS "http"
+TOKEN "endpoint__http_metrics_latency_1d_multi__v1_endpoint_read_2067" READ
NODE endpoint
SQL >
- %
- SELECT
- toStartOfInterval(
- toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 30) }} MINUTE
- ) as h,
- monitorId,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency
- FROM mv__http_1d__v1
- WHERE
- monitorId IN {{ Array(monitorIds, 'String', '1,666') }}
- GROUP BY h, monitorId
- ORDER BY h ASC
+%
+SELECT
+ toStartOfInterval(
+ toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 30) }} MINUTE
+ ) as h,
+ monitorId,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency
+FROM mv__http_1d__v0
+WHERE
+ monitorId IN {{ Array(monitorIds, 'String', '1,666') }}
+GROUP BY h, monitorId
+ORDER BY h ASC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_latency_30d__v1.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_latency_30d__v1.pipe
index 7159a465a..cd51b62b2 100644
--- a/packages/tinybird/endpoints/endpoint__http_metrics_latency_30d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_metrics_latency_30d__v1.pipe
@@ -1,24 +1,26 @@
-TAGS "http"
+TOKEN "endpoint__http_metrics_latency_30d__v1_endpoint_read_9465" READ
NODE endpoint
SQL >
- %
- SELECT
- toStartOfInterval(
- toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 1440) }} MINUTE
- ) as h,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency
- FROM mv__http_30d__v1
- WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- GROUP BY h
- ORDER BY h DESC
+%
+SELECT
+ toStartOfInterval(
+ toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 1440) }} MINUTE
+ ) as h,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency
+FROM mv__http_30d__v1
+WHERE
+ monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+GROUP BY h
+ORDER BY h DESC
+
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_latency_7d__v1.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_latency_7d__v1.pipe
index 5631bb5dc..9dfd7f06b 100644
--- a/packages/tinybird/endpoints/endpoint__http_metrics_latency_7d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_metrics_latency_7d__v1.pipe
@@ -1,24 +1,25 @@
-TAGS "tcp"
+TOKEN "endpoint__http_metrics_latency_7d__v1_endpoint_read_5816" READ
NODE endpoint
SQL >
- %
- SELECT
- toStartOfInterval(
- toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 30) }} MINUTE
- ) as h,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency
- FROM mv__http_7d__v1
- WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
- GROUP BY h
- ORDER BY h DESC
+%
+SELECT
+ toStartOfInterval(
+ toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 30) }} MINUTE
+ ) as h,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency
+FROM mv__http_7d__v0
+WHERE
+ monitorId = {{ String(monitorId, '1', required=True) }}
+GROUP BY h
+ORDER BY h DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_latency_90d__v1.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_latency_90d__v1.pipe
index b7651b8f4..5bb519502 100644
--- a/packages/tinybird/endpoints/endpoint__http_metrics_latency_90d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_metrics_latency_90d__v1.pipe
@@ -1,24 +1,26 @@
-TAGS "http"
+TOKEN "endpoint__http_metrics_latency_90d__v1_endpoint_read_3285" READ
NODE endpoint
SQL >
- %
- SELECT
- toStartOfInterval(
- toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 1440) }} MINUTE
- ) as h,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency
- FROM mv__http_90d__v1
- WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- GROUP BY h
- ORDER BY h DESC
+%
+SELECT
+ toStartOfInterval(
+ toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 1440) }} MINUTE
+ ) as h,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency
+FROM mv__http_90d__v1
+WHERE
+ monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+GROUP BY h
+ORDER BY h DESC
+
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_regions_14d__v0.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_regions_14d__v0.pipe
index b3e70b58d..57cd926e2 100644
--- a/packages/tinybird/endpoints/endpoint__http_metrics_regions_14d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_metrics_regions_14d__v0.pipe
@@ -1,24 +1,27 @@
+TOKEN "endpoint__http_metrics_regions_14d__v0_endpoint_read_2934" READ
+
NODE endpoint
SQL >
- %
- SELECT
- region,
- toStartOfInterval(
- toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 30) }} MINUTE
- ) as h,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency
- FROM mv__http_14d__v1
- WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- GROUP BY h, region
- ORDER BY h DESC
+%
+SELECT
+ region,
+ toStartOfInterval(
+ toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 30) }} MINUTE
+ ) as h,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency
+FROM mv__http_14d__v0
+WHERE
+ monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+GROUP BY h, region
+ORDER BY h DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_regions_1d__v0.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_regions_1d__v0.pipe
index a65352bb9..980e4e456 100644
--- a/packages/tinybird/endpoints/endpoint__http_metrics_regions_1d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_metrics_regions_1d__v0.pipe
@@ -1,24 +1,27 @@
+TOKEN "endpoint_http_metrics_regions_1d__v0_endpoint_read_9756" READ
+
NODE endpoint
SQL >
- %
- SELECT
- region,
- toStartOfInterval(
- toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 30) }} MINUTE
- ) as h,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency
- FROM mv__http_1d__v1
- WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- GROUP BY h, region
- ORDER BY h DESC
+%
+SELECT
+ region,
+ toStartOfInterval(
+ toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 30) }} MINUTE
+ ) as h,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency
+FROM mv__http_1d__v0
+WHERE
+ monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+GROUP BY h, region
+ORDER BY h DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_regions_30d__v0.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_regions_30d__v0.pipe
index 2bcf3d7c6..81681f1bd 100644
--- a/packages/tinybird/endpoints/endpoint__http_metrics_regions_30d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_metrics_regions_30d__v0.pipe
@@ -1,25 +1,27 @@
-TAGS "http"
+TOKEN "endpoint__http_metrics_regions_30d__v0_endpoint_read_1538" READ
NODE endpoint
SQL >
- %
- SELECT
- region,
- toStartOfInterval(
- toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 1440) }} MINUTE
- ) as h,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency
- FROM mv__http_30d__v1
- WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- GROUP BY h, region
- ORDER BY h DESC
+%
+SELECT
+ region,
+ toStartOfInterval(
+ toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 1440) }} MINUTE
+ ) as h,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency
+FROM mv__http_30d__v1
+WHERE
+ monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+GROUP BY h, region
+ORDER BY h DESC
+
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_regions_7d__v0.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_regions_7d__v0.pipe
index 0b2a50e7a..2193b918c 100644
--- a/packages/tinybird/endpoints/endpoint__http_metrics_regions_7d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_metrics_regions_7d__v0.pipe
@@ -1,24 +1,27 @@
+TOKEN "endpoint__http_metrics_regions_7d__v0_endpoint_read_7523" READ
+
NODE endpoint
SQL >
- %
- SELECT
- region,
- toStartOfInterval(
- toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 30) }} MINUTE
- ) as h,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency
- FROM mv__http_7d__v1
- WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- GROUP BY h, region
- ORDER BY h DESC
+%
+SELECT
+ region,
+ toStartOfInterval(
+ toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 30) }} MINUTE
+ ) as h,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency
+FROM mv__http_7d__v0
+WHERE
+ monitorId = {{ String(monitorId, '1', required=True) }}
+{% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+GROUP BY h, region
+ORDER BY h DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_regions_90d__v0.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_regions_90d__v0.pipe
index 891fe3184..9554d710f 100644
--- a/packages/tinybird/endpoints/endpoint__http_metrics_regions_90d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_metrics_regions_90d__v0.pipe
@@ -1,25 +1,27 @@
-TAGS "http"
+TOKEN "endpoint__http_metrics_regions_90d__v0_endpoint_read_4964" READ
NODE endpoint
SQL >
- %
- SELECT
- region,
- toStartOfInterval(
- toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 1440) }} MINUTE
- ) as h,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency
- FROM mv__http_90d__v1
- WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- GROUP BY h, region
- ORDER BY h DESC
+%
+SELECT
+ region,
+ toStartOfInterval(
+ toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 1440) }} MINUTE
+ ) as h,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency
+FROM mv__http_90d__v1
+WHERE
+ monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+GROUP BY h, region
+ORDER BY h DESC
+
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_status_14d.pipe b/packages/tinybird/endpoints/endpoint__http_status_14d.pipe
deleted file mode 100644
index 4e18069aa..000000000
--- a/packages/tinybird/endpoints/endpoint__http_status_14d.pipe
+++ /dev/null
@@ -1,26 +0,0 @@
-VERSION 0
-
-TAGS "http"
-
-NODE endpoint
-SQL >
-
- %
- SELECT
- time as day,
- countMerge(total) as total,
- countMerge(success) as success,
- countMerge(error) as error,
- countMerge(degraded) as degraded
- FROM mv__http_status_14d__v0
- WHERE monitorId = {{ String(monitorId, '1', required=True) }}
- GROUP BY day
- ORDER BY day DESC
- WITH FILL
- FROM
- toStartOfDay(toStartOfDay(toTimeZone(now(), 'UTC')))
- TO toStartOfDay(date_sub(DAY, 14, now())) STEP INTERVAL -1 DAY
- LIMIT {{ Int16(days, 14) }}
-
-
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_status_14d__v0.pipe b/packages/tinybird/endpoints/endpoint__http_status_14d__v0.pipe
new file mode 100644
index 000000000..500ecd18a
--- /dev/null
+++ b/packages/tinybird/endpoints/endpoint__http_status_14d__v0.pipe
@@ -0,0 +1,25 @@
+TOKEN "endpoint__http_status_14d__v0_endpoint_read_8823" READ
+
+NODE endpoint
+SQL >
+
+%
+SELECT
+ time as day,
+ countMerge(total) as total,
+ countMerge(success) as success,
+ countMerge(error) as error,
+ countMerge(degraded) as degraded
+FROM mv__http_status_14d__v0
+WHERE monitorId = {{ String(monitorId, '1', required=True) }}
+GROUP BY day
+ORDER BY day DESC
+WITH FILL
+FROM
+ toStartOfDay(toStartOfDay(toTimeZone(now(), 'UTC')))
+ TO toStartOfDay(date_sub(DAY, 14, now())) STEP INTERVAL -1 DAY
+LIMIT {{ Int16(days, 14) }}
+
+TYPE endpoint
+
+
diff --git a/packages/tinybird/endpoints/endpoint__http_status_45d.pipe b/packages/tinybird/endpoints/endpoint__http_status_45d__v0.pipe
similarity index 91%
rename from packages/tinybird/endpoints/endpoint__http_status_45d.pipe
rename to packages/tinybird/endpoints/endpoint__http_status_45d__v0.pipe
index b297fdc5c..a6f260855 100644
--- a/packages/tinybird/endpoints/endpoint__http_status_45d.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_status_45d__v0.pipe
@@ -1,11 +1,7 @@
-VERSION 0
-
-TAGS http
-
NODE endpoint
SQL >
- %
+%
SELECT time as day, countMerge(count) as count, countMerge(ok) as ok
FROM mv__http_status_45d__v0
WHERE
@@ -20,5 +16,6 @@ SQL >
) STEP INTERVAL -1 DAY
LIMIT {{ Int16(days, 45) }}
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_status_45d__v1.pipe b/packages/tinybird/endpoints/endpoint__http_status_45d__v1.pipe
index c6cdcb1e9..5b9b99fd1 100644
--- a/packages/tinybird/endpoints/endpoint__http_status_45d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_status_45d__v1.pipe
@@ -1,20 +1,21 @@
-TAGS "http"
+TOKEN "endpoint__http_status_45d__v0_5279_dup_endpoint_read_1013" READ
NODE endpoint
SQL >
- %
- SELECT
- time as day,
- monitorId,
- countMerge(count) as count,
- countMerge(success) as ok,
- countMerge(error) as error,
- countMerge(degraded) as degraded
- FROM mv__http_status_45d__v1
- WHERE monitorId IN {{ Array(monitorIds, 'String', '1,666') }}
- GROUP BY day, monitorId
- ORDER BY day DESC
+%
+SELECT
+ time as day,
+ monitorId,
+ countMerge(count) as count,
+ countMerge(success) as ok,
+ countMerge(error) as error,
+ countMerge(degraded) as degraded
+FROM mv__http_status_45d__v1
+WHERE monitorId IN {{ Array(monitorIds, 'String', '1,666') }}
+GROUP BY day, monitorId
+ORDER BY day DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_status_7d.pipe b/packages/tinybird/endpoints/endpoint__http_status_7d__v0.pipe
similarity index 91%
rename from packages/tinybird/endpoints/endpoint__http_status_7d.pipe
rename to packages/tinybird/endpoints/endpoint__http_status_7d__v0.pipe
index 1f1c2a3fd..af25c5eed 100644
--- a/packages/tinybird/endpoints/endpoint__http_status_7d.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_status_7d__v0.pipe
@@ -1,11 +1,7 @@
-VERSION 0
-
-TAGS http
-
NODE endpoint
SQL >
- %
+%
SELECT time as day, countMerge(count) as count, countMerge(ok) as ok
FROM mv__http_status_7d__v0
WHERE
@@ -19,5 +15,6 @@ SQL >
date_sub(DAY, 7, now())
) STEP INTERVAL -1 DAY
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_timing_phases_14d__v1.pipe b/packages/tinybird/endpoints/endpoint__http_timing_phases_14d__v1.pipe
index 186b65e44..7dacb40c9 100644
--- a/packages/tinybird/endpoints/endpoint__http_timing_phases_14d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_timing_phases_14d__v1.pipe
@@ -1,39 +1,42 @@
-NODE endpoint__http_timing_phases_14d__v1_0
+TOKEN "endpoint__http_timing_phases_14d__v1_endpoint_read_2967" READ
+
+NODE endpoint
SQL >
- %
- SELECT
- toStartOfInterval(time, INTERVAL {{ Int64(interval, 30) }} MINUTE) as h,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.5)(dns)) as p50Dns,
- round(quantile(0.5)(firstByte)) as p50Ttfb,
- round(quantile(0.5)(transfer)) as p50Transfer,
- round(quantile(0.5)(connect)) as p50Connect,
- round(quantile(0.5)(tls)) as p50Tls,
- round(quantile(0.75)(dns)) as p75Dns,
- round(quantile(0.75)(firstByte)) as p75Ttfb,
- round(quantile(0.75)(transfer)) as p75Transfer,
- round(quantile(0.75)(connect)) as p75Connect,
- round(quantile(0.75)(tls)) as p75Tls,
- round(quantile(0.90)(dns)) as p90Dns,
- round(quantile(0.90)(firstByte)) as p90Ttfb,
- round(quantile(0.90)(transfer)) as p90Transfer,
- round(quantile(0.90)(connect)) as p90Connect,
- round(quantile(0.90)(tls)) as p90Tls,
- round(quantile(0.95)(dns)) as p95Dns,
- round(quantile(0.95)(firstByte)) as p95Ttfb,
- round(quantile(0.95)(transfer)) as p95Transfer,
- round(quantile(0.95)(connect)) as p95Connect,
- round(quantile(0.95)(tls)) as p95Tls,
- round(quantile(0.99)(dns)) as p99Dns,
- round(quantile(0.99)(firstByte)) as p99Ttfb,
- round(quantile(0.99)(transfer)) as p99Transfer,
- round(quantile(0.99)(connect)) as p99Connect,
- round(quantile(0.99)(tls)) as p99Tls
- FROM mv__http_timing_phases_14d__v1
- WHERE monitorId = {{ String(monitorId, '141', required=True) }}
- GROUP BY h
- ORDER BY h ASC
+%
+SELECT
+ toStartOfInterval(time, INTERVAL {{ Int64(interval, 30) }} MINUTE) as h,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.5)(dns)) as p50Dns,
+ round(quantile(0.5)(firstByte)) as p50Ttfb,
+ round(quantile(0.5)(transfer)) as p50Transfer,
+ round(quantile(0.5)(connect)) as p50Connect,
+ round(quantile(0.5)(tls)) as p50Tls,
+ round(quantile(0.75)(dns)) as p75Dns,
+ round(quantile(0.75)(firstByte)) as p75Ttfb,
+ round(quantile(0.75)(transfer)) as p75Transfer,
+ round(quantile(0.75)(connect)) as p75Connect,
+ round(quantile(0.75)(tls)) as p75Tls,
+ round(quantile(0.90)(dns)) as p90Dns,
+ round(quantile(0.90)(firstByte)) as p90Ttfb,
+ round(quantile(0.90)(transfer)) as p90Transfer,
+ round(quantile(0.90)(connect)) as p90Connect,
+ round(quantile(0.90)(tls)) as p90Tls,
+ round(quantile(0.95)(dns)) as p95Dns,
+ round(quantile(0.95)(firstByte)) as p95Ttfb,
+ round(quantile(0.95)(transfer)) as p95Transfer,
+ round(quantile(0.95)(connect)) as p95Connect,
+ round(quantile(0.95)(tls)) as p95Tls,
+ round(quantile(0.99)(dns)) as p99Dns,
+ round(quantile(0.99)(firstByte)) as p99Ttfb,
+ round(quantile(0.99)(transfer)) as p99Transfer,
+ round(quantile(0.99)(connect)) as p99Connect,
+ round(quantile(0.99)(tls)) as p99Tls
+FROM mv__http_timing_phases_14d__v1
+WHERE monitorId = {{ String(monitorId, '141', required=True) }}
+GROUP BY h
+ORDER BY h ASC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_timing_phases_30d__v1.pipe b/packages/tinybird/endpoints/endpoint__http_timing_phases_30d__v1.pipe
index b44386cd5..d86a115d0 100644
--- a/packages/tinybird/endpoints/endpoint__http_timing_phases_30d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_timing_phases_30d__v1.pipe
@@ -1,40 +1,44 @@
+TOKEN "endpoint__http_timing_phases_30d__v1_endpoint_read_9641" READ
+
NODE endpoint
SQL >
- %
- SELECT
- toStartOfInterval(time, INTERVAL {{ Int64(interval, 1440) }} MINUTE) as h,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.5)(dns)) as p50Dns,
- round(quantile(0.5)(firstByte)) as p50Ttfb,
- round(quantile(0.5)(transfer)) as p50Transfer,
- round(quantile(0.5)(connect)) as p50Connect,
- round(quantile(0.5)(tls)) as p50Tls,
- round(quantile(0.75)(dns)) as p75Dns,
- round(quantile(0.75)(firstByte)) as p75Ttfb,
- round(quantile(0.75)(transfer)) as p75Transfer,
- round(quantile(0.75)(connect)) as p75Connect,
- round(quantile(0.75)(tls)) as p75Tls,
- round(quantile(0.90)(dns)) as p90Dns,
- round(quantile(0.90)(firstByte)) as p90Ttfb,
- round(quantile(0.90)(transfer)) as p90Transfer,
- round(quantile(0.90)(connect)) as p90Connect,
- round(quantile(0.90)(tls)) as p90Tls,
- round(quantile(0.95)(dns)) as p95Dns,
- round(quantile(0.95)(firstByte)) as p95Ttfb,
- round(quantile(0.95)(transfer)) as p95Transfer,
- round(quantile(0.95)(connect)) as p95Connect,
- round(quantile(0.95)(tls)) as p95Tls,
- round(quantile(0.99)(dns)) as p99Dns,
- round(quantile(0.99)(firstByte)) as p99Ttfb,
- round(quantile(0.99)(transfer)) as p99Transfer,
- round(quantile(0.99)(connect)) as p99Connect,
- round(quantile(0.99)(tls)) as p99Tls
- FROM mv__http_timing_phases_90d__v1
- WHERE
- monitorId = {{ String(monitorId, '141', required=True) }}
- AND time >= toDateTime64(now() - INTERVAL 30 DAY, 3)
- GROUP BY h
- ORDER BY h ASC
+%
+SELECT
+ toStartOfInterval(time, INTERVAL {{ Int64(interval, 1440) }} MINUTE) as h,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.5)(dns)) as p50Dns,
+ round(quantile(0.5)(firstByte)) as p50Ttfb,
+ round(quantile(0.5)(transfer)) as p50Transfer,
+ round(quantile(0.5)(connect)) as p50Connect,
+ round(quantile(0.5)(tls)) as p50Tls,
+ round(quantile(0.75)(dns)) as p75Dns,
+ round(quantile(0.75)(firstByte)) as p75Ttfb,
+ round(quantile(0.75)(transfer)) as p75Transfer,
+ round(quantile(0.75)(connect)) as p75Connect,
+ round(quantile(0.75)(tls)) as p75Tls,
+ round(quantile(0.90)(dns)) as p90Dns,
+ round(quantile(0.90)(firstByte)) as p90Ttfb,
+ round(quantile(0.90)(transfer)) as p90Transfer,
+ round(quantile(0.90)(connect)) as p90Connect,
+ round(quantile(0.90)(tls)) as p90Tls,
+ round(quantile(0.95)(dns)) as p95Dns,
+ round(quantile(0.95)(firstByte)) as p95Ttfb,
+ round(quantile(0.95)(transfer)) as p95Transfer,
+ round(quantile(0.95)(connect)) as p95Connect,
+ round(quantile(0.95)(tls)) as p95Tls,
+ round(quantile(0.99)(dns)) as p99Dns,
+ round(quantile(0.99)(firstByte)) as p99Ttfb,
+ round(quantile(0.99)(transfer)) as p99Transfer,
+ round(quantile(0.99)(connect)) as p99Connect,
+ round(quantile(0.99)(tls)) as p99Tls
+FROM mv__http_timing_phases_90d__v1
+WHERE
+ monitorId = {{ String(monitorId, '141', required=True) }}
+ AND time >= toDateTime64(now() - INTERVAL 30 DAY, 3)
+GROUP BY h
+ORDER BY h ASC
+
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_timing_phases_90d__v1.pipe b/packages/tinybird/endpoints/endpoint__http_timing_phases_90d__v1.pipe
index e6209ffff..643981ce9 100644
--- a/packages/tinybird/endpoints/endpoint__http_timing_phases_90d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_timing_phases_90d__v1.pipe
@@ -1,38 +1,42 @@
+TOKEN "endpoint__http_timing_phases_90d__v1_endpoint_read_7261" READ
+
NODE endpoint
SQL >
- %
- SELECT
- toStartOfInterval(time, INTERVAL {{ Int64(interval, 1440) }} MINUTE) as h,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.5)(dns)) as p50Dns,
- round(quantile(0.5)(firstByte)) as p50Ttfb,
- round(quantile(0.5)(transfer)) as p50Transfer,
- round(quantile(0.5)(connect)) as p50Connect,
- round(quantile(0.5)(tls)) as p50Tls,
- round(quantile(0.75)(dns)) as p75Dns,
- round(quantile(0.75)(firstByte)) as p75Ttfb,
- round(quantile(0.75)(transfer)) as p75Transfer,
- round(quantile(0.75)(connect)) as p75Connect,
- round(quantile(0.75)(tls)) as p75Tls,
- round(quantile(0.90)(dns)) as p90Dns,
- round(quantile(0.90)(firstByte)) as p90Ttfb,
- round(quantile(0.90)(transfer)) as p90Transfer,
- round(quantile(0.90)(connect)) as p90Connect,
- round(quantile(0.90)(tls)) as p90Tls,
- round(quantile(0.95)(dns)) as p95Dns,
- round(quantile(0.95)(firstByte)) as p95Ttfb,
- round(quantile(0.95)(transfer)) as p95Transfer,
- round(quantile(0.95)(connect)) as p95Connect,
- round(quantile(0.95)(tls)) as p95Tls,
- round(quantile(0.99)(dns)) as p99Dns,
- round(quantile(0.99)(firstByte)) as p99Ttfb,
- round(quantile(0.99)(transfer)) as p99Transfer,
- round(quantile(0.99)(connect)) as p99Connect,
- round(quantile(0.99)(tls)) as p99Tls
- FROM mv__http_timing_phases_90d__v1
- WHERE monitorId = {{ String(monitorId, '141', required=True) }}
- GROUP BY h
- ORDER BY h ASC
+%
+SELECT
+ toStartOfInterval(time, INTERVAL {{ Int64(interval, 1440) }} MINUTE) as h,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.5)(dns)) as p50Dns,
+ round(quantile(0.5)(firstByte)) as p50Ttfb,
+ round(quantile(0.5)(transfer)) as p50Transfer,
+ round(quantile(0.5)(connect)) as p50Connect,
+ round(quantile(0.5)(tls)) as p50Tls,
+ round(quantile(0.75)(dns)) as p75Dns,
+ round(quantile(0.75)(firstByte)) as p75Ttfb,
+ round(quantile(0.75)(transfer)) as p75Transfer,
+ round(quantile(0.75)(connect)) as p75Connect,
+ round(quantile(0.75)(tls)) as p75Tls,
+ round(quantile(0.90)(dns)) as p90Dns,
+ round(quantile(0.90)(firstByte)) as p90Ttfb,
+ round(quantile(0.90)(transfer)) as p90Transfer,
+ round(quantile(0.90)(connect)) as p90Connect,
+ round(quantile(0.90)(tls)) as p90Tls,
+ round(quantile(0.95)(dns)) as p95Dns,
+ round(quantile(0.95)(firstByte)) as p95Ttfb,
+ round(quantile(0.95)(transfer)) as p95Transfer,
+ round(quantile(0.95)(connect)) as p95Connect,
+ round(quantile(0.95)(tls)) as p95Tls,
+ round(quantile(0.99)(dns)) as p99Dns,
+ round(quantile(0.99)(firstByte)) as p99Ttfb,
+ round(quantile(0.99)(transfer)) as p99Transfer,
+ round(quantile(0.99)(connect)) as p99Connect,
+ round(quantile(0.99)(tls)) as p99Tls
+FROM mv__http_timing_phases_90d__v1
+WHERE monitorId = {{ String(monitorId, '141', required=True) }}
+GROUP BY h
+ORDER BY h ASC
+
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_uptime_30d__v1.pipe b/packages/tinybird/endpoints/endpoint__http_uptime_30d__v1.pipe
index 44cf82611..0fcd8c174 100644
--- a/packages/tinybird/endpoints/endpoint__http_uptime_30d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_uptime_30d__v1.pipe
@@ -1,22 +1,23 @@
-TAGS "http"
+TOKEN "endpoint__http_uptime_30d__v1_endpoint_read_2714" READ
NODE endpoint
SQL >
- %
- SELECT
- toStartOfInterval(time, INTERVAL {{ String(interval, '30', required=True) }} minute) AS interval,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error
- FROM mv__http_uptime_30d__v1
- WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
- {% if fromDate %} AND time >= parseDateTimeBestEffortOrNull({{ String(fromDate) }}) {% end %}
- {% if toDate %} AND time <= parseDateTimeBestEffortOrNull({{ String(toDate) }}) {% end %}
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- GROUP BY interval
- ORDER BY interval DESC
+%
+SELECT
+ toStartOfInterval(time, INTERVAL {{ String(interval, '30', required=True) }} minute) AS interval,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error
+FROM mv__http_uptime_30d__v1
+WHERE
+ monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if fromDate %} AND time >= parseDateTimeBestEffortOrNull({{ String(fromDate) }}) {% end %}
+ {% if toDate %} AND time <= parseDateTimeBestEffortOrNull({{ String(toDate) }}) {% end %}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+GROUP BY interval
+ORDER BY interval DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_uptime_7d__v1.pipe b/packages/tinybird/endpoints/endpoint__http_uptime_7d__v1.pipe
index 357de6661..ce04a188f 100644
--- a/packages/tinybird/endpoints/endpoint__http_uptime_7d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_uptime_7d__v1.pipe
@@ -1,22 +1,23 @@
-TAGS "http"
+TOKEN "endpoint__http_uptime_7d__v1_endpoint_read_4195" READ
NODE endpoint
SQL >
- %
- SELECT
- toStartOfInterval(time, INTERVAL {{ String(interval, '30', required=True) }} minute) AS interval,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error
- FROM mv__http_uptime_7d__v1
- WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
- {% if fromDate %} AND time >= parseDateTimeBestEffortOrNull({{ String(fromDate) }}) {% end %}
- {% if toDate %} AND time <= parseDateTimeBestEffortOrNull({{ String(toDate) }}) {% end %}
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- GROUP BY interval
- ORDER BY interval DESC
+%
+SELECT
+ toStartOfInterval(time, INTERVAL {{ String(interval, '30', required=True) }} minute) AS interval,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error
+FROM mv__http_uptime_7d__v1
+WHERE
+ monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if fromDate %} AND time >= parseDateTimeBestEffortOrNull({{ String(fromDate) }}) {% end %}
+ {% if toDate %} AND time <= parseDateTimeBestEffortOrNull({{ String(toDate) }}) {% end %}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+GROUP BY interval
+ORDER BY interval DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_uptime_90d__v1.pipe b/packages/tinybird/endpoints/endpoint__http_uptime_90d__v1.pipe
index fec0e098e..b3151b3db 100644
--- a/packages/tinybird/endpoints/endpoint__http_uptime_90d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_uptime_90d__v1.pipe
@@ -1,21 +1,25 @@
-TAGS "http"
+TOKEN "endpoint__http_uptime_90d__v1_endpoint_read_2593" READ
NODE endpoint
SQL >
- %
- SELECT
- toStartOfInterval(time, INTERVAL {{ String(interval, '1440', required=True) }} minute) AS interval,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error
- FROM mv__http_uptime_90d__v1
- WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
- {% if fromDate %} AND time >= parseDateTimeBestEffortOrNull({{ String(fromDate) }}) {% end %}
- {% if toDate %} AND time <= parseDateTimeBestEffortOrNull({{ String(toDate) }}) {% end %}
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- GROUP BY interval
- ORDER BY interval DESC
+%
+SELECT
+ toStartOfInterval(
+ time, INTERVAL {{ String(interval, '1440', required=True) }} minute
+ ) AS interval,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error
+FROM mv__http_uptime_90d__v1
+WHERE
+ monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if fromDate %} AND time >= parseDateTimeBestEffortOrNull({{ String(fromDate) }}) {% end %}
+ {% if toDate %} AND time <= parseDateTimeBestEffortOrNull({{ String(toDate) }}) {% end %}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+GROUP BY interval
+ORDER BY interval DESC
+
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__http_workspace_30d__v0.pipe b/packages/tinybird/endpoints/endpoint__http_workspace_30d__v0.pipe
index 028cbd22d..7c603987f 100644
--- a/packages/tinybird/endpoints/endpoint__http_workspace_30d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__http_workspace_30d__v0.pipe
@@ -1,16 +1,17 @@
-TAGS "http"
+TOKEN "endpoint__http_workspace_30d__v0_endpoint_read_9286" READ
NODE endpoint
SQL >
- %
- SELECT
- time as day,
- countMerge(count_state) as count
- FROM mv__http_workspace_30d__v0
- WHERE workspaceId = {{ String(workspaceId, '1', required=True) }}
- GROUP BY day
- ORDER BY day DESC
+%
+SELECT
+ time as day,
+ countMerge(count_state) as count
+FROM mv__http_workspace_30d__v0
+WHERE workspaceId = {{ String(workspaceId, '1', required=True) }}
+GROUP BY day
+ORDER BY day DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__stats_global.pipe b/packages/tinybird/endpoints/endpoint__stats_global.pipe
deleted file mode 100644
index 4e68659ea..000000000
--- a/packages/tinybird/endpoints/endpoint__stats_global.pipe
+++ /dev/null
@@ -1,25 +0,0 @@
-VERSION 0
-
-NODE endpoint
-SQL >
-
- %
- SELECT COUNT(*) as count
- FROM ping_response__v8
- {% if defined(period) %}
- {% if String(period) == "1h" %}
- WHERE cronTimestamp > toUnixTimestamp(now() - INTERVAL 1 HOUR) * 1000
- {% elif String(period) == "10m" %}
- WHERE cronTimestamp > toUnixTimestamp(now() - INTERVAL 10 MINUTE) * 1000
- {% elif String(period) == "1d" %}
- WHERE cronTimestamp > toUnixTimestamp(now() - INTERVAL 1 DAY) * 1000
- {% elif String(period) == "1w" %}
- WHERE cronTimestamp > toUnixTimestamp(now() - INTERVAL 7 DAY) * 1000
- {% elif String(period) == "1m" %}
- WHERE cronTimestamp > toUnixTimestamp(now() - INTERVAL 1 MONTH) * 1000
- {% else %}
- WHERE cronTimestamp > 0
- {% end %}
- {% end %}
-
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__stats_global__v0.pipe b/packages/tinybird/endpoints/endpoint__stats_global__v0.pipe
new file mode 100644
index 000000000..20dd37b79
--- /dev/null
+++ b/packages/tinybird/endpoints/endpoint__stats_global__v0.pipe
@@ -0,0 +1,24 @@
+NODE endpoint
+SQL >
+
+%
+SELECT COUNT(*) as count
+FROM ping_response__v8
+{% if defined(period) %}
+ {% if String(period) == "1h" %}
+ WHERE cronTimestamp > toUnixTimestamp(now() - INTERVAL 1 HOUR) * 1000
+ {% elif String(period) == "10m" %}
+ WHERE cronTimestamp > toUnixTimestamp(now() - INTERVAL 10 MINUTE) * 1000
+ {% elif String(period) == "1d" %}
+ WHERE cronTimestamp > toUnixTimestamp(now() - INTERVAL 1 DAY) * 1000
+ {% elif String(period) == "1w" %}
+ WHERE cronTimestamp > toUnixTimestamp(now() - INTERVAL 7 DAY) * 1000
+ {% elif String(period) == "1m" %}
+ WHERE cronTimestamp > toUnixTimestamp(now() - INTERVAL 1 MONTH) * 1000
+ {% else %} WHERE cronTimestamp > 0
+ {% end %}
+{% end %}
+
+TYPE endpoint
+
+
diff --git a/packages/tinybird/endpoints/endpoint__tcp_get_14d__v0.pipe b/packages/tinybird/endpoints/endpoint__tcp_get_14d__v0.pipe
index 9f012b53f..96eda6c1b 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_get_14d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_get_14d__v0.pipe
@@ -1,15 +1,16 @@
-TAGS "tcp"
+TOKEN "endpoint__tcp_get_14d__v0_endpoint_read_3805" READ
NODE endpoint
SQL >
- %
- SELECT *
- FROM mv__tcp_full_14d__v0
- WHERE
- monitorId = {{ String(monitorId, '4433', required=True) }}
- AND id = {{ String(id, '', required=True) }}
- ORDER BY time DESC
+%
+ SELECT *
+ FROM mv__tcp_full_14d__v0
+ WHERE
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+ AND id = {{ String(id, '', required=True) }}
+ ORDER BY time DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_get_30d.pipe b/packages/tinybird/endpoints/endpoint__tcp_get_30d__v0.pipe
similarity index 71%
rename from packages/tinybird/endpoints/endpoint__tcp_get_30d.pipe
rename to packages/tinybird/endpoints/endpoint__tcp_get_30d__v0.pipe
index a3812df14..09dce649c 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_get_30d.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_get_30d__v0.pipe
@@ -1,19 +1,15 @@
-VERSION 0
-
-TAGS tcp
-
NODE endpoint
SQL >
- %
+%
SELECT *
FROM mv__tcp_full_30d__v0
WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
+ monitorId = {{ String(monitorId, '4433', required=True) }}
AND cronTimestamp = {{ Int64(cronTimestamp, 1709477432205, required=True) }}
AND region = {{ String(region, 'ams', required=True) }}
ORDER BY cronTimestamp DESC
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_list_14d.pipe b/packages/tinybird/endpoints/endpoint__tcp_list_14d__v0.pipe
similarity index 80%
rename from packages/tinybird/endpoints/endpoint__tcp_list_14d.pipe
rename to packages/tinybird/endpoints/endpoint__tcp_list_14d__v0.pipe
index c3f42e52f..ad92409f1 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_list_14d.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_list_14d__v0.pipe
@@ -1,15 +1,12 @@
-VERSION 0
-
-TAGS tcp
-
NODE endpoint
SQL >
- %
+%
SELECT * FROM mv__tcp_14d__v0
WHERE
monitorId = {{ String(monitorId, '1', required=True) }}
ORDER BY cronTimestamp DESC
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_list_14d__v1.pipe b/packages/tinybird/endpoints/endpoint__tcp_list_14d__v1.pipe
index 36b1f34ec..88a9ec746 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_list_14d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_list_14d__v1.pipe
@@ -1,19 +1,21 @@
-TAGS "tcp"
+TOKEN "endpoint__tcp_list_14d__v1_endpoint_read_9213" READ
NODE endpoint
SQL >
- %
- SELECT * FROM mv__tcp_14d__v1
- WHERE
- monitorId = {{ String(monitorId, '4433', required=True) }}
- {% if defined(fromDate) %}
- AND time >= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(fromDate) }})))
- {% end %}
- {% if defined(toDate) %}
- AND time <= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(toDate) }})))
- {% end %}
- ORDER BY time DESC
+%
+SELECT *
+FROM mv__tcp_14d__v1
+WHERE
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+ {% if defined(fromDate) %}
+ AND time >= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(fromDate) }})))
+ {% end %}
+ {% if defined(toDate) %}
+ AND time <= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(toDate) }})))
+ {% end %}
+ORDER BY time DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_list_1d.pipe b/packages/tinybird/endpoints/endpoint__tcp_list_1d.pipe
deleted file mode 100644
index 2d38ba1dc..000000000
--- a/packages/tinybird/endpoints/endpoint__tcp_list_1d.pipe
+++ /dev/null
@@ -1,15 +0,0 @@
-VERSION 0
-
-TAGS tcp
-
-NODE endpoint
-SQL >
-
- %
- SELECT * FROM mv__tcp_1d__v0
- WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
- ORDER BY cronTimestamp DESC
-
-
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_list_1d__v0.pipe b/packages/tinybird/endpoints/endpoint__tcp_list_1d__v0.pipe
new file mode 100644
index 000000000..cb154d143
--- /dev/null
+++ b/packages/tinybird/endpoints/endpoint__tcp_list_1d__v0.pipe
@@ -0,0 +1,12 @@
+NODE endpoint
+SQL >
+
+%
+ SELECT * FROM mv__tcp_1d__v0
+ WHERE
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+ ORDER BY cronTimestamp DESC
+
+TYPE endpoint
+
+
diff --git a/packages/tinybird/endpoints/endpoint__tcp_list_1d__v1.pipe b/packages/tinybird/endpoints/endpoint__tcp_list_1d__v1.pipe
index fd1f5c2e7..2f4f7fb62 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_list_1d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_list_1d__v1.pipe
@@ -1,19 +1,21 @@
-TAGS "tcp"
+TOKEN "endpoint__tcp_list_1d__v1_endpoint_read_6247" READ
NODE endpoint
SQL >
- %
- SELECT * FROM mv__tcp_1d__v1
- WHERE
- monitorId = {{ String(monitorId, '4433', required=True) }}
- {% if defined(fromDate) %}
- AND time >= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(fromDate) }})))
- {% end %}
- {% if defined(toDate) %}
- AND time <= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(toDate) }})))
- {% end %}
- ORDER BY time DESC
+%
+SELECT *
+FROM mv__tcp_1d__v1
+WHERE
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+ {% if defined(fromDate) %}
+ AND time >= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(fromDate) }})))
+ {% end %}
+ {% if defined(toDate) %}
+ AND time <= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(toDate) }})))
+ {% end %}
+ORDER BY time DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_list_7d.pipe b/packages/tinybird/endpoints/endpoint__tcp_list_7d__v0.pipe
similarity index 80%
rename from packages/tinybird/endpoints/endpoint__tcp_list_7d.pipe
rename to packages/tinybird/endpoints/endpoint__tcp_list_7d__v0.pipe
index a11c24330..4240d224c 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_list_7d.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_list_7d__v0.pipe
@@ -1,15 +1,12 @@
-VERSION 0
-
-TAGS tcp
-
NODE endpoint
SQL >
- %
+%
SELECT * FROM mv__tcp_7d__v0
WHERE
monitorId = {{ String(monitorId, '1', required=True) }}
ORDER BY cronTimestamp DESC
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_list_7d__v1.pipe b/packages/tinybird/endpoints/endpoint__tcp_list_7d__v1.pipe
index def193866..ff2028231 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_list_7d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_list_7d__v1.pipe
@@ -1,19 +1,21 @@
-TAGS "tcp"
+TOKEN "endpoint__tcp_list_7d__v1_endpoint_read_7786" READ
NODE endpoint
SQL >
- %
- SELECT * FROM mv__tcp_7d__v1
- WHERE
- monitorId = {{ String(monitorId, '4433', required=True) }}
- {% if defined(fromDate) %}
- AND time >= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(fromDate) }})))
- {% end %}
- {% if defined(toDate) %}
- AND time <= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(toDate) }})))
- {% end %}
- ORDER BY time DESC
+%
+SELECT *
+FROM mv__tcp_7d__v1
+WHERE
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+ {% if defined(fromDate) %}
+ AND time >= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(fromDate) }})))
+ {% end %}
+ {% if defined(toDate) %}
+ AND time <= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(toDate) }})))
+ {% end %}
+ORDER BY time DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_metrics_14d.pipe b/packages/tinybird/endpoints/endpoint__tcp_metrics_14d__v0.pipe
similarity index 88%
rename from packages/tinybird/endpoints/endpoint__tcp_metrics_14d.pipe
rename to packages/tinybird/endpoints/endpoint__tcp_metrics_14d__v0.pipe
index 6eb070952..dd0a94ecb 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_metrics_14d.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_metrics_14d__v0.pipe
@@ -1,11 +1,7 @@
-VERSION 0
-
-TAGS tcp
-
NODE endpoint
SQL >
- %
+%
SELECT
round(quantile(0.50)(latency)) as p50Latency,
round(quantile(0.75)(latency)) as p75Latency,
@@ -18,6 +14,7 @@ SQL >
FROM mv__tcp_14d__v0
WHERE
monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
-- FIXME: we can reduce the data processed by using removing it entirely
-- because the query is useless as we are in the 14d context
-- TODO: check where we can reduce the data processed
@@ -35,8 +32,10 @@ SQL >
FROM mv__tcp_30d__v0 -- REMINDER: this will increase the processed data compared to 3d
WHERE
monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
AND time >= toDateTime64(now() - INTERVAL 28 DAY, 3)
AND time < toDateTime64(now() - INTERVAL 14 DAY, 3)
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_metrics_14d__v1.pipe b/packages/tinybird/endpoints/endpoint__tcp_metrics_14d__v1.pipe
index 948a2e60d..0aaa3dfb4 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_metrics_14d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_metrics_14d__v1.pipe
@@ -1,43 +1,49 @@
-TAGS "tcp"
+TOKEN "endpoint__tcp_metrics_14d__v1_endpoint_read_5043" READ
NODE endpoint
SQL >
- %
- SELECT
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency,
- count() as count,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error,
- max(cronTimestamp) AS lastTimestamp
- FROM mv__tcp_14d__v1
- WHERE
- monitorId = {{ String(monitorId, '4433', required=True) }}
- AND time >= toDateTime64(now() - INTERVAL 14 DAY, 3)
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- UNION ALL
- SELECT
- round(quantile(0.50)(latency)) AS p50Latency,
- round(quantile(0.75)(latency)) AS p75Latency,
- round(quantile(0.90)(latency)) AS p90Latency,
- round(quantile(0.95)(latency)) AS p95Latency,
- round(quantile(0.99)(latency)) AS p99Latency,
- count() as count,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error,
- NULL as lastTimestamp -- no need to query the `lastTimestamp` as not relevant
- FROM mv__tcp_30d__v1
- WHERE
- monitorId = {{ String(monitorId, '4433', required=True) }}
- AND time >= toDateTime64(now() - INTERVAL 28 DAY, 3)
- AND time < toDateTime64(now() - INTERVAL 14 DAY, 3)
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
-
-
-TYPE ENDPOINT
+%
+ SELECT
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency,
+ count() as count,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error,
+ max(cronTimestamp) AS lastTimestamp
+ FROM mv__tcp_14d__v1
+ WHERE
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+ AND time >= toDateTime64(now() - INTERVAL 14 DAY, 3)
+ UNION ALL
+ SELECT
+ round(quantile(0.50)(latency)) AS p50Latency,
+ round(quantile(0.75)(latency)) AS p75Latency,
+ round(quantile(0.90)(latency)) AS p90Latency,
+ round(quantile(0.95)(latency)) AS p95Latency,
+ round(quantile(0.99)(latency)) AS p99Latency,
+ count() as count,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error,
+ NULL as lastTimestamp -- no need to query the `lastTimestamp` as not relevant
+ FROM mv__tcp_30d__v1
+ WHERE
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+ AND time >= toDateTime64(now() - INTERVAL 28 DAY, 3)
+ AND time < toDateTime64(now() - INTERVAL 14 DAY, 3)
+
+TYPE endpoint
+
+
+
+NODE endpoint__tcp_metrics_14d__v1_1
+SQL >
+
+ SELECT * FROM endpoint
+
+
diff --git a/packages/tinybird/endpoints/endpoint__tcp_metrics_1d.pipe b/packages/tinybird/endpoints/endpoint__tcp_metrics_1d__v0.pipe
similarity index 78%
rename from packages/tinybird/endpoints/endpoint__tcp_metrics_1d.pipe
rename to packages/tinybird/endpoints/endpoint__tcp_metrics_1d__v0.pipe
index 6eaeac95d..b849de74c 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_metrics_1d.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_metrics_1d__v0.pipe
@@ -1,11 +1,7 @@
-VERSION 0
-
-TAGS tcp
-
NODE endpoint
SQL >
- %
+%
SELECT
round(quantile(0.50)(latency)) as p50Latency,
round(quantile(0.75)(latency)) as p75Latency,
@@ -17,7 +13,8 @@ SQL >
max(cronTimestamp) AS lastTimestamp
FROM mv__tcp_1d__v0
WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
AND time >= toDateTime64(now() - INTERVAL 1 DAY, 3)
UNION ALL
SELECT
@@ -31,9 +28,11 @@ SQL >
NULL as lastTimestamp -- no need to query the `lastTimestamp` as not relevant
FROM mv__tcp_7d__v0 -- REMINDER: this will increase the processed data compared to 3d
WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
AND time >= toDateTime64(now() - INTERVAL 2 DAY, 3)
AND time < toDateTime64(now() - INTERVAL 1 DAY, 3)
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_metrics_1d__v1.pipe b/packages/tinybird/endpoints/endpoint__tcp_metrics_1d__v1.pipe
index adc2c9a94..779b4d89a 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_metrics_1d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_metrics_1d__v1.pipe
@@ -1,43 +1,44 @@
-TAGS "tcp"
+TOKEN "endpoint__tcp_metrics_1d__v1_endpoint_read_8831" READ
NODE endpoint
SQL >
- %
- SELECT
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency,
- count() as count,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error,
- max(cronTimestamp) AS lastTimestamp
- FROM mv__tcp_1d__v1
- WHERE
- monitorId = {{ String(monitorId, '4433', required=True) }}
- AND time >= toDateTime64(now() - INTERVAL 1 DAY, 3)
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- UNION ALL
- SELECT
- round(quantile(0.50)(latency)) AS p50Latency,
- round(quantile(0.75)(latency)) AS p75Latency,
- round(quantile(0.90)(latency)) AS p90Latency,
- round(quantile(0.95)(latency)) AS p95Latency,
- round(quantile(0.99)(latency)) AS p99Latency,
- count() as count,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error,
- NULL as lastTimestamp -- no need to query the `lastTimestamp` as not relevant
- FROM mv__tcp_7d__v1
- WHERE
- monitorId = {{ String(monitorId, '4433', required=True) }}
- AND time >= toDateTime64(now() - INTERVAL 2 DAY, 3)
- AND time < toDateTime64(now() - INTERVAL 1 DAY, 3)
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+%
+ SELECT
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency,
+ count() as count,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error,
+ max(cronTimestamp) AS lastTimestamp
+ FROM mv__tcp_1d__v1
+ WHERE
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+ AND time >= toDateTime64(now() - INTERVAL 1 DAY, 3)
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+ UNION ALL
+ SELECT
+ round(quantile(0.50)(latency)) AS p50Latency,
+ round(quantile(0.75)(latency)) AS p75Latency,
+ round(quantile(0.90)(latency)) AS p90Latency,
+ round(quantile(0.95)(latency)) AS p95Latency,
+ round(quantile(0.99)(latency)) AS p99Latency,
+ count() as count,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error,
+ NULL as lastTimestamp -- no need to query the `lastTimestamp` as not relevant
+ FROM mv__tcp_7d__v1
+ WHERE
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+ AND time >= toDateTime64(now() - INTERVAL 2 DAY, 3)
+ AND time < toDateTime64(now() - INTERVAL 1 DAY, 3)
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_metrics_30d__v1.pipe b/packages/tinybird/endpoints/endpoint__tcp_metrics_30d__v1.pipe
index 7c74e8199..6ee03eed0 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_metrics_30d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_metrics_30d__v1.pipe
@@ -1,42 +1,44 @@
-TAGS "tcp"
+TOKEN "endpoint__tcp_metrics_30d__v1_endpoint_read_2713" READ
NODE endpoint
SQL >
- %
- SELECT
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency,
- count() as count,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error,
- max(cronTimestamp) AS lastTimestamp
- FROM mv__tcp_30d__v1
- WHERE
- monitorId = {{ String(monitorId, '4433', required=True) }}
- AND time >= toDateTime64(now() - INTERVAL 30 DAY, 3)
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- UNION ALL
- SELECT
- round(quantile(0.50)(latency)) AS p50Latency,
- round(quantile(0.75)(latency)) AS p75Latency,
- round(quantile(0.90)(latency)) AS p90Latency,
- round(quantile(0.95)(latency)) AS p95Latency,
- round(quantile(0.99)(latency)) AS p99Latency,
- count() as count,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error,
- NULL as lastTimestamp
- FROM mv__tcp_90d__v1
- WHERE
- monitorId = {{ String(monitorId, '4433', required=True) }}
- AND time >= toDateTime64(now() - INTERVAL 60 DAY, 3)
- AND time < toDateTime64(now() - INTERVAL 30 DAY, 3)
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+%
+SELECT
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency,
+ count() as count,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error,
+ max(cronTimestamp) AS lastTimestamp
+FROM mv__tcp_30d__v1
+WHERE
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+ AND time >= toDateTime64(now() - INTERVAL 30 DAY, 3)
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+UNION ALL
+SELECT
+ round(quantile(0.50)(latency)) AS p50Latency,
+ round(quantile(0.75)(latency)) AS p75Latency,
+ round(quantile(0.90)(latency)) AS p90Latency,
+ round(quantile(0.95)(latency)) AS p95Latency,
+ round(quantile(0.99)(latency)) AS p99Latency,
+ count() as count,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error,
+ NULL as lastTimestamp
+FROM mv__tcp_90d__v1
+WHERE
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+ AND time >= toDateTime64(now() - INTERVAL 60 DAY, 3)
+ AND time < toDateTime64(now() - INTERVAL 30 DAY, 3)
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_metrics_7d.pipe b/packages/tinybird/endpoints/endpoint__tcp_metrics_7d__v0.pipe
similarity index 78%
rename from packages/tinybird/endpoints/endpoint__tcp_metrics_7d.pipe
rename to packages/tinybird/endpoints/endpoint__tcp_metrics_7d__v0.pipe
index 061bb0222..37ae7408d 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_metrics_7d.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_metrics_7d__v0.pipe
@@ -1,11 +1,7 @@
-VERSION 0
-
-TAGS tcp
-
NODE endpoint
SQL >
- %
+%
SELECT
round(quantile(0.50)(latency)) as p50Latency,
round(quantile(0.75)(latency)) as p75Latency,
@@ -17,7 +13,8 @@ SQL >
max(cronTimestamp) AS lastTimestamp
FROM mv__tcp_7d__v0
WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
AND time >= toDateTime64(now() - INTERVAL 7 DAY, 3)
UNION ALL
SELECT
@@ -31,9 +28,11 @@ SQL >
NULL as lastTimestamp -- no need to query the `lastTimestamp` as not relevant
FROM mv__tcp_14d__v0 -- REMINDER: this will increase the processed data compared to 3d
WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
AND time >= toDateTime64(now() - INTERVAL 14 DAY, 3)
AND time < toDateTime64(now() - INTERVAL 7 DAY, 3)
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_metrics_7d__v1.pipe b/packages/tinybird/endpoints/endpoint__tcp_metrics_7d__v1.pipe
index e5193ad40..4a589d076 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_metrics_7d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_metrics_7d__v1.pipe
@@ -1,43 +1,44 @@
-TAGS "tcp"
+TOKEN "endpoint__tcp_metrics_7d__v1_endpoint_read_9306" READ
NODE endpoint
SQL >
- %
- SELECT
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency,
- count() as count,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error,
- max(cronTimestamp) AS lastTimestamp
- FROM mv__tcp_7d__v1
- WHERE
- monitorId = {{ String(monitorId, '4433', required=True) }}
- AND time >= toDateTime64(now() - INTERVAL 7 DAY, 3)
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- UNION ALL
- SELECT
- round(quantile(0.50)(latency)) AS p50Latency,
- round(quantile(0.75)(latency)) AS p75Latency,
- round(quantile(0.90)(latency)) AS p90Latency,
- round(quantile(0.95)(latency)) AS p95Latency,
- round(quantile(0.99)(latency)) AS p99Latency,
- count() as count,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error,
- NULL as lastTimestamp -- no need to query the `lastTimestamp` as not relevant
- FROM mv__tcp_14d__v1
- WHERE
- monitorId = {{ String(monitorId, '4433', required=True) }}
- AND time >= toDateTime64(now() - INTERVAL 14 DAY, 3)
- AND time < toDateTime64(now() - INTERVAL 7 DAY, 3)
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+%
+ SELECT
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency,
+ count() as count,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error,
+ max(cronTimestamp) AS lastTimestamp
+ FROM mv__tcp_7d__v1
+ WHERE
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+ AND time >= toDateTime64(now() - INTERVAL 7 DAY, 3)
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+ UNION ALL
+ SELECT
+ round(quantile(0.50)(latency)) AS p50Latency,
+ round(quantile(0.75)(latency)) AS p75Latency,
+ round(quantile(0.90)(latency)) AS p90Latency,
+ round(quantile(0.95)(latency)) AS p95Latency,
+ round(quantile(0.99)(latency)) AS p99Latency,
+ count() as count,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error,
+ NULL as lastTimestamp -- no need to query the `lastTimestamp` as not relevant
+ FROM mv__tcp_14d__v1
+ WHERE
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+ AND time >= toDateTime64(now() - INTERVAL 14 DAY, 3)
+ AND time < toDateTime64(now() - INTERVAL 7 DAY, 3)
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_metrics_90d__v1.pipe b/packages/tinybird/endpoints/endpoint__tcp_metrics_90d__v1.pipe
index d705347eb..646aeacbc 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_metrics_90d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_metrics_90d__v1.pipe
@@ -1,39 +1,41 @@
-TAGS "tcp"
+TOKEN "endpoint__tcp_metrics_90d__v1_endpoint_read_1571" READ
NODE endpoint
SQL >
- %
- SELECT
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency,
- count() as count,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error,
- max(cronTimestamp) AS lastTimestamp
- FROM mv__tcp_90d__v1
- WHERE
- monitorId = {{ String(monitorId, '4433', required=True) }}
- AND time >= toDateTime64(now() - INTERVAL 90 DAY, 3)
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- UNION ALL
- -- the previous 90d window (90-180d ago) is past the 90d MV TTL, so there's no
- -- real comparison data. emit an empty row to keep the 2-row contract; count 0
- -- makes the client suppress the trend badge (NaN).
- SELECT
- 0 AS p50Latency,
- 0 AS p75Latency,
- 0 AS p90Latency,
- 0 AS p95Latency,
- 0 AS p99Latency,
- 0 AS count,
- 0 AS success,
- 0 AS degraded,
- 0 AS error,
- NULL AS lastTimestamp
+%
+SELECT
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency,
+ count() as count,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error,
+ max(cronTimestamp) AS lastTimestamp
+FROM mv__tcp_90d__v1
+WHERE
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+ AND time >= toDateTime64(now() - INTERVAL 90 DAY, 3)
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+UNION ALL
+-- the previous 90d window (90-180d ago) is past the 90d MV TTL, so there's no
+-- real comparison data. emit an empty row to keep the 2-row contract; count 0
+-- makes the client suppress the trend badge (NaN).
+SELECT
+ 0 AS p50Latency,
+ 0 AS p75Latency,
+ 0 AS p90Latency,
+ 0 AS p95Latency,
+ 0 AS p99Latency,
+ 0 AS count,
+ 0 AS success,
+ 0 AS degraded,
+ 0 AS error,
+ NULL AS lastTimestamp
+
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_metrics_by_interval_14d__v0.pipe b/packages/tinybird/endpoints/endpoint__tcp_metrics_by_interval_14d__v0.pipe
index a49a2629d..48bc9d971 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_metrics_by_interval_14d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_metrics_by_interval_14d__v0.pipe
@@ -1,11 +1,7 @@
-VERSION 0
-
-TAGS tcp
-
NODE endpoint
SQL >
- %
+%
SELECT
region,
toStartOfInterval(
@@ -20,9 +16,11 @@ SQL >
round(quantile(0.99)(latency)) as p99Latency
FROM mv__tcp_14d__v0
WHERE
- monitorId = {{ String(monitorId, '4433', required=True) }}
+ monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
GROUP BY h, region
ORDER BY h DESC
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_metrics_by_interval_1d__v0.pipe b/packages/tinybird/endpoints/endpoint__tcp_metrics_by_interval_1d__v0.pipe
index 11e8771bc..395dbc2f7 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_metrics_by_interval_1d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_metrics_by_interval_1d__v0.pipe
@@ -1,11 +1,7 @@
-VERSION 0
-
-TAGS tcp
-
NODE endpoint
SQL >
- %
+%
SELECT
region,
toStartOfInterval(
@@ -20,9 +16,11 @@ SQL >
round(quantile(0.99)(latency)) as p99Latency
FROM mv__tcp_1d__v0
WHERE
- monitorId = {{ String(monitorId, '4433', required=True) }}
+ monitorId = {{ String(monitorId, '1', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
GROUP BY h, region
ORDER BY h DESC
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_metrics_by_interval_30d__v0.pipe b/packages/tinybird/endpoints/endpoint__tcp_metrics_by_interval_30d__v0.pipe
index 637d31844..8884a0e37 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_metrics_by_interval_30d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_metrics_by_interval_30d__v0.pipe
@@ -1,26 +1,25 @@
-VERSION 0
-
-TAGS tcp
+TOKEN "endpoint__tcp_metrics_by_interval_30d__v0_endpoint_read_8017" READ
NODE endpoint
SQL >
- %
- SELECT
- region,
- toStartOfInterval(
- toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 1440) }} MINUTE
- ) as h,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency
- FROM mv__tcp_30d__v1
- WHERE
- monitorId = {{ String(monitorId, '4433', required=True) }}
- GROUP BY h, region
- ORDER BY h DESC
+%
+SELECT
+ region,
+ toStartOfInterval(
+ toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 1440) }} MINUTE
+ ) as h,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency
+FROM mv__tcp_30d__v1
+WHERE monitorId = {{ String(monitorId, '4433', required=True) }}
+GROUP BY h, region
+ORDER BY h DESC
+
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_metrics_by_interval_7d__v0.pipe b/packages/tinybird/endpoints/endpoint__tcp_metrics_by_interval_7d__v0.pipe
index d6e469f2c..afbb97f2d 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_metrics_by_interval_7d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_metrics_by_interval_7d__v0.pipe
@@ -1,11 +1,7 @@
-VERSION 0
-
-TAGS tcp
-
NODE endpoint
SQL >
- %
+%
SELECT
region,
toStartOfInterval(
@@ -18,11 +14,13 @@ SQL >
round(quantile(0.90)(latency)) as p90Latency,
round(quantile(0.95)(latency)) as p95Latency,
round(quantile(0.99)(latency)) as p99Latency
- FROM mv__tcp_7d__v1
+ FROM mv__tcp_7d__v0
WHERE
monitorId = {{ String(monitorId, '4433', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
GROUP BY h, region
ORDER BY h DESC
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_metrics_by_interval_90d__v0.pipe b/packages/tinybird/endpoints/endpoint__tcp_metrics_by_interval_90d__v0.pipe
index b5882f9a1..11c47946c 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_metrics_by_interval_90d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_metrics_by_interval_90d__v0.pipe
@@ -1,26 +1,25 @@
-VERSION 0
-
-TAGS tcp
+TOKEN "endpoint__tcp_metrics_by_interval_90d__v0_endpoint_read_0954" READ
NODE endpoint
SQL >
- %
- SELECT
- region,
- toStartOfInterval(
- toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 1440) }} MINUTE
- ) as h,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency
- FROM mv__tcp_90d__v1
- WHERE
- monitorId = {{ String(monitorId, '4433', required=True) }}
- GROUP BY h, region
- ORDER BY h DESC
+%
+SELECT
+ region,
+ toStartOfInterval(
+ toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 1440) }} MINUTE
+ ) as h,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency
+FROM mv__tcp_90d__v1
+WHERE monitorId = {{ String(monitorId, '4433', required=True) }}
+GROUP BY h, region
+ORDER BY h DESC
+
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_metrics_by_region_14d.pipe b/packages/tinybird/endpoints/endpoint__tcp_metrics_by_region_14d__v0.pipe
similarity index 71%
rename from packages/tinybird/endpoints/endpoint__tcp_metrics_by_region_14d.pipe
rename to packages/tinybird/endpoints/endpoint__tcp_metrics_by_region_14d__v0.pipe
index 493ecd846..32c7efb6d 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_metrics_by_region_14d.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_metrics_by_region_14d__v0.pipe
@@ -1,11 +1,7 @@
-VERSION 0
-
-TAGS tcp
-
NODE endpoint
SQL >
- %
+%
SELECT
region,
round(quantile(0.5)(latency)) as p50Latency,
@@ -17,9 +13,10 @@ SQL >
count(if(error = 0, 1, NULL)) AS ok
FROM mv__tcp_14d__v0
WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
GROUP BY region
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_metrics_by_region_1d.pipe b/packages/tinybird/endpoints/endpoint__tcp_metrics_by_region_1d__v0.pipe
similarity index 71%
rename from packages/tinybird/endpoints/endpoint__tcp_metrics_by_region_1d.pipe
rename to packages/tinybird/endpoints/endpoint__tcp_metrics_by_region_1d__v0.pipe
index 392f6f604..705aeeb80 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_metrics_by_region_1d.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_metrics_by_region_1d__v0.pipe
@@ -1,11 +1,7 @@
-VERSION 0
-
-TAGS tcp
-
NODE endpoint
SQL >
- %
+%
SELECT
region,
round(quantile(0.5)(latency)) as p50Latency,
@@ -17,9 +13,10 @@ SQL >
count(if(error = 0, 1, NULL)) AS ok
FROM mv__tcp_1d__v0
WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
GROUP BY region
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_metrics_by_region_7d.pipe b/packages/tinybird/endpoints/endpoint__tcp_metrics_by_region_7d__v0.pipe
similarity index 71%
rename from packages/tinybird/endpoints/endpoint__tcp_metrics_by_region_7d.pipe
rename to packages/tinybird/endpoints/endpoint__tcp_metrics_by_region_7d__v0.pipe
index 3b1cbaf03..e862d1674 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_metrics_by_region_7d.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_metrics_by_region_7d__v0.pipe
@@ -1,11 +1,7 @@
-VERSION 0
-
-TAGS tcp
-
NODE endpoint
SQL >
- %
+%
SELECT
region,
round(quantile(0.5)(latency)) as p50Latency,
@@ -17,9 +13,10 @@ SQL >
count(if(error = 0, 1, NULL)) AS ok
FROM mv__tcp_7d__v0
WHERE
- monitorId = {{ String(monitorId, '1', required=True) }}
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
GROUP BY region
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_metrics_global_1d__v0.pipe b/packages/tinybird/endpoints/endpoint__tcp_metrics_global_1d__v0.pipe
index 2f65ff43c..90cef2ea8 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_metrics_global_1d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_metrics_global_1d__v0.pipe
@@ -1,25 +1,24 @@
-VERSION 0
-
-TAGS "tcp"
+TOKEN "endpoint__tcp_metrics_global_1d__v0_endpoint_read_1387" READ
NODE endpoint
SQL >
- %
- SELECT
- round(min(latency), 0) as minLatency,
- round(max(latency), 0) as maxLatency,
- round(quantile(0.5)(latency), 0) as p50Latency,
- round(quantile(0.75)(latency), 0) as p75Latency,
- round(quantile(0.9)(latency), 0) as p90Latency,
- round(quantile(0.95)(latency), 0) as p95Latency,
- round(quantile(0.99)(latency), 0) as p99Latency,
- max(cronTimestamp) as lastTimestamp,
- count() as count,
- monitorId
- FROM mv__tcp_1d__v0
- WHERE monitorId IN {{ Array(monitorIds, 'String', '4433') }}
- GROUP BY monitorId
+%
+SELECT
+ round(min(latency), 0) as minLatency,
+ round(max(latency), 0) as maxLatency,
+ round(quantile(0.5)(latency), 0) as p50Latency,
+ round(quantile(0.75)(latency), 0) as p75Latency,
+ round(quantile(0.9)(latency), 0) as p90Latency,
+ round(quantile(0.95)(latency), 0) as p95Latency,
+ round(quantile(0.99)(latency), 0) as p99Latency,
+ max(cronTimestamp) as lastTimestamp,
+ count() as count,
+ monitorId
+FROM mv__tcp_1d__v0
+WHERE monitorId IN {{ Array(monitorIds, 'String', '4433') }}
+GROUP BY monitorId
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_metrics_latency_1d__v1.pipe b/packages/tinybird/endpoints/endpoint__tcp_metrics_latency_1d__v1.pipe
index 10d81b996..1ca170aca 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_metrics_latency_1d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_metrics_latency_1d__v1.pipe
@@ -1,24 +1,25 @@
-TAGS "tcp"
+TOKEN "endpoint__tcp_metrics_latency_1d__v1_endpoint_read_1576" READ
NODE endpoint
SQL >
- %
- SELECT
- toStartOfInterval(
- toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 30) }} MINUTE
- ) as h,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency
- FROM mv__tcp_1d__v1
- WHERE
- monitorId = {{ String(monitorId, '4433', required=True) }}
- GROUP BY h
- ORDER BY h DESC
+%
+SELECT
+ toStartOfInterval(
+ toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 30) }} MINUTE
+ ) as h,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency
+FROM mv__tcp_1d__v0
+WHERE
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+GROUP BY h
+ORDER BY h DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_metrics_latency_1d_multi__v1.pipe b/packages/tinybird/endpoints/endpoint__tcp_metrics_latency_1d_multi__v1.pipe
index 2f3b5e27c..c7700060b 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_metrics_latency_1d_multi__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_metrics_latency_1d_multi__v1.pipe
@@ -1,25 +1,26 @@
-TAGS "tcp"
+TOKEN "endpoint__tcp_metrics_latency_1d_multi__v1_endpoint_read_4714" READ
NODE endpoint
SQL >
- %
- SELECT
- toStartOfInterval(
- toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 30) }} MINUTE
- ) as h,
- monitorId,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency
- FROM mv__tcp_1d__v1
- WHERE
- monitorId IN {{ Array(monitorIds, 'String', '4433') }}
- GROUP BY h, monitorId
- ORDER BY h DESC
+%
+SELECT
+ toStartOfInterval(
+ toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 30) }} MINUTE
+ ) as h,
+ monitorId,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency
+FROM mv__tcp_1d__v0
+WHERE
+ monitorId IN {{ Array(monitorIds, 'String', '4433') }}
+GROUP BY h, monitorId
+ORDER BY h DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_metrics_latency_30d__v1.pipe b/packages/tinybird/endpoints/endpoint__tcp_metrics_latency_30d__v1.pipe
index 84430f4fd..18cbf09da 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_metrics_latency_30d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_metrics_latency_30d__v1.pipe
@@ -1,23 +1,24 @@
-TAGS "tcp"
+TOKEN "endpoint__tcp_metrics_latency_30d__v1_endpoint_read_0676" READ
NODE endpoint
SQL >
- %
- SELECT
- toStartOfInterval(
- toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 1440) }} MINUTE
- ) as h,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency
- FROM mv__tcp_30d__v1
- WHERE
- monitorId = {{ String(monitorId, '4433', required=True) }}
- GROUP BY h
- ORDER BY h DESC
+%
+SELECT
+ toStartOfInterval(
+ toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 1440) }} MINUTE
+ ) as h,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency
+FROM mv__tcp_30d__v1
+WHERE monitorId = {{ String(monitorId, '4433', required=True) }}
+GROUP BY h
+ORDER BY h DESC
+
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_metrics_latency_7d__v1.pipe b/packages/tinybird/endpoints/endpoint__tcp_metrics_latency_7d__v1.pipe
index b8b418124..f30e3c7ea 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_metrics_latency_7d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_metrics_latency_7d__v1.pipe
@@ -1,24 +1,25 @@
-TAGS "tcp"
+TOKEN "endpoint__tcp_metrics_latency_7d__v1_endpoint_read_6349" READ
NODE endpoint
SQL >
- %
- SELECT
- toStartOfInterval(
- toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 30) }} MINUTE
- ) as h,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency
- FROM mv__tcp_7d__v1
- WHERE
- monitorId = {{ String(monitorId, '4433', required=True) }}
- GROUP BY h
- ORDER BY h DESC
+%
+SELECT
+ toStartOfInterval(
+ toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 30) }} MINUTE
+ ) as h,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency
+FROM mv__tcp_7d__v1
+WHERE
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+GROUP BY h
+ORDER BY h DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_metrics_latency_90d__v1.pipe b/packages/tinybird/endpoints/endpoint__tcp_metrics_latency_90d__v1.pipe
index 912d4f498..1e4ce0ead 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_metrics_latency_90d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_metrics_latency_90d__v1.pipe
@@ -1,23 +1,24 @@
-TAGS "tcp"
+TOKEN "endpoint__tcp_metrics_latency_90d__v1_endpoint_read_2637" READ
NODE endpoint
SQL >
- %
- SELECT
- toStartOfInterval(
- toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 1440) }} MINUTE
- ) as h,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(quantile(0.50)(latency)) as p50Latency,
- round(quantile(0.75)(latency)) as p75Latency,
- round(quantile(0.90)(latency)) as p90Latency,
- round(quantile(0.95)(latency)) as p95Latency,
- round(quantile(0.99)(latency)) as p99Latency
- FROM mv__tcp_90d__v1
- WHERE
- monitorId = {{ String(monitorId, '4433', required=True) }}
- GROUP BY h
- ORDER BY h DESC
+%
+SELECT
+ toStartOfInterval(
+ toDateTime(cronTimestamp / 1000), INTERVAL {{ Int64(interval, 1440) }} MINUTE
+ ) as h,
+ toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
+ round(quantile(0.50)(latency)) as p50Latency,
+ round(quantile(0.75)(latency)) as p75Latency,
+ round(quantile(0.90)(latency)) as p90Latency,
+ round(quantile(0.95)(latency)) as p95Latency,
+ round(quantile(0.99)(latency)) as p99Latency
+FROM mv__tcp_90d__v1
+WHERE monitorId = {{ String(monitorId, '4433', required=True) }}
+GROUP BY h
+ORDER BY h DESC
+
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_status_45d.pipe b/packages/tinybird/endpoints/endpoint__tcp_status_45d__v0.pipe
similarity index 91%
rename from packages/tinybird/endpoints/endpoint__tcp_status_45d.pipe
rename to packages/tinybird/endpoints/endpoint__tcp_status_45d__v0.pipe
index 3f2f0b22c..6f2929a4b 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_status_45d.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_status_45d__v0.pipe
@@ -1,11 +1,7 @@
-VERSION 0
-
-TAGS tcp
-
NODE endpoint
SQL >
- %
+%
SELECT time as day, countMerge(count) as count, countMerge(ok) as ok
FROM mv__tcp_status_45d__v0
WHERE
@@ -20,5 +16,6 @@ SQL >
) STEP INTERVAL -1 DAY
LIMIT {{ Int16(days, 45) }}
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_status_45d__v1.pipe b/packages/tinybird/endpoints/endpoint__tcp_status_45d__v1.pipe
index 5d1b35d1e..3258aabba 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_status_45d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_status_45d__v1.pipe
@@ -1,20 +1,21 @@
-TAGS "tcp"
+TOKEN "endpoint__tcp_status_45d__v1_endpoint_read_8911" READ
NODE endpoint
SQL >
- %
- SELECT
- time as day,
- monitorId,
- countMerge(count) as count,
- countMerge(success) as ok,
- countMerge(error) as error,
- countMerge(degraded) as degraded
- FROM mv__tcp_status_45d__v1
- WHERE monitorId IN {{ Array(monitorIds, 'String', '4433') }}
- GROUP BY day, monitorId
- ORDER BY day DESC
+%
+SELECT
+ time as day,
+ monitorId,
+ countMerge(count) as count,
+ countMerge(success) as ok,
+ countMerge(error) as error,
+ countMerge(degraded) as degraded
+FROM mv__tcp_status_45d__v1
+WHERE monitorId IN {{ Array(monitorIds, 'String', '4433') }}
+GROUP BY day, monitorId
+ORDER BY day DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_status_7d.pipe b/packages/tinybird/endpoints/endpoint__tcp_status_7d__v0.pipe
similarity index 91%
rename from packages/tinybird/endpoints/endpoint__tcp_status_7d.pipe
rename to packages/tinybird/endpoints/endpoint__tcp_status_7d__v0.pipe
index 10169d50e..f0bf349c3 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_status_7d.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_status_7d__v0.pipe
@@ -1,11 +1,7 @@
-VERSION 0
-
-TAGS tcp
-
NODE endpoint
SQL >
- %
+%
SELECT time as day, countMerge(count) as count, countMerge(ok) as ok
FROM mv__tcp_status_7d__v0
WHERE
@@ -19,5 +15,6 @@ SQL >
date_sub(DAY, 7, now())
) STEP INTERVAL -1 DAY
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_uptime_30d__v1.pipe b/packages/tinybird/endpoints/endpoint__tcp_uptime_30d__v1.pipe
index 8218a8bad..d10b95fa4 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_uptime_30d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_uptime_30d__v1.pipe
@@ -1,22 +1,23 @@
-TAGS "http"
+TOKEN "endpoint__tcp_uptime_30d__v1_endpoint_read_7238" READ
NODE endpoint
SQL >
- %
- SELECT
- toStartOfInterval(time, INTERVAL {{ String(interval, '30', required=True) }} minute) AS interval,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error
- FROM mv__tcp_uptime_30d__v1
- WHERE
- monitorId = {{ String(monitorId, '4433', required=True) }}
- {% if fromDate %} AND time >= parseDateTimeBestEffortOrNull({{ String(fromDate) }}) {% end %}
- {% if toDate %} AND time <= parseDateTimeBestEffortOrNull({{ String(toDate) }}) {% end %}
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- GROUP BY interval
- ORDER BY interval DESC
+%
+SELECT
+ toStartOfInterval(time, INTERVAL {{ String(interval, '30', required=True) }} minute) AS interval,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error
+FROM mv__tcp_uptime_30d__v1
+WHERE
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+ {% if fromDate %} AND time >= parseDateTimeBestEffortOrNull({{ String(fromDate) }}) {% end %}
+ {% if toDate %} AND time <= parseDateTimeBestEffortOrNull({{ String(toDate) }}) {% end %}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+GROUP BY interval
+ORDER BY interval DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_uptime_7d__v1.pipe b/packages/tinybird/endpoints/endpoint__tcp_uptime_7d__v1.pipe
index 146ad31d7..69004b327 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_uptime_7d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_uptime_7d__v1.pipe
@@ -1,22 +1,23 @@
-TAGS "http"
+TOKEN "endpoint__tcp_uptime_7d__v1_endpoint_read_5726" READ
NODE endpoint
SQL >
- %
- SELECT
- toStartOfInterval(time, INTERVAL {{ String(interval, '30', required=True) }} minute) AS interval,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error
- FROM mv__tcp_uptime_7d__v1
- WHERE
- monitorId = {{ String(monitorId, '4433', required=True) }}
- {% if fromDate %} AND time >= parseDateTimeBestEffortOrNull({{ String(fromDate) }}) {% end %}
- {% if toDate %} AND time <= parseDateTimeBestEffortOrNull({{ String(toDate) }}) {% end %}
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- GROUP BY interval
- ORDER BY interval DESC
+%
+SELECT
+ toStartOfInterval(time, INTERVAL {{ String(interval, '30', required=True) }} minute) AS interval,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error
+FROM mv__tcp_uptime_7d__v1
+WHERE
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+ {% if fromDate %} AND time >= parseDateTimeBestEffortOrNull({{ String(fromDate) }}) {% end %}
+ {% if toDate %} AND time <= parseDateTimeBestEffortOrNull({{ String(toDate) }}) {% end %}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+GROUP BY interval
+ORDER BY interval DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_uptime_90d__v1.pipe b/packages/tinybird/endpoints/endpoint__tcp_uptime_90d__v1.pipe
index 3eb0e49a1..c06654b0f 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_uptime_90d__v1.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_uptime_90d__v1.pipe
@@ -1,21 +1,23 @@
-TAGS "tcp"
+TOKEN "endpoint__tcp_uptime_90d__v1_endpoint_read_5414" READ
NODE endpoint
SQL >
- %
- SELECT
- toStartOfInterval(time, INTERVAL {{ String(interval, '1440', required=True) }} minute) AS interval,
- countIf(requestStatus = 'success') AS success,
- countIf(requestStatus = 'degraded') AS degraded,
- countIf(requestStatus = 'error') AS error
- FROM mv__tcp_uptime_90d__v1
- WHERE
- monitorId = {{ String(monitorId, '4433', required=True) }}
- {% if fromDate %} AND time >= parseDateTimeBestEffortOrNull({{ String(fromDate) }}) {% end %}
- {% if toDate %} AND time <= parseDateTimeBestEffortOrNull({{ String(toDate) }}) {% end %}
- {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
- GROUP BY interval
- ORDER BY interval DESC
+%
+SELECT
+ toStartOfInterval(time, INTERVAL {{ String(interval, '30', required=True) }} minute) AS interval,
+ countIf(requestStatus = 'success') AS success,
+ countIf(requestStatus = 'degraded') AS degraded,
+ countIf(requestStatus = 'error') AS error
+FROM mv__tcp_uptime_90d__v1
+WHERE
+ monitorId = {{ String(monitorId, '4433', required=True) }}
+ {% if fromDate %} AND time >= parseDateTimeBestEffortOrNull({{ String(fromDate) }}) {% end %}
+ {% if toDate %} AND time <= parseDateTimeBestEffortOrNull({{ String(toDate) }}) {% end %}
+ {% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}
+GROUP BY interval
+ORDER BY interval DESC
+
+TYPE endpoint
+
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint__tcp_workspace_30d__v0.pipe b/packages/tinybird/endpoints/endpoint__tcp_workspace_30d__v0.pipe
index 27568470c..db128d63f 100644
--- a/packages/tinybird/endpoints/endpoint__tcp_workspace_30d__v0.pipe
+++ b/packages/tinybird/endpoints/endpoint__tcp_workspace_30d__v0.pipe
@@ -1,16 +1,17 @@
-TAGS "tcp"
+TOKEN "endpoint__tcp_workspace_30d__v0_endpoint_read_0686" READ
NODE endpoint
SQL >
- %
- SELECT
- time as day,
- countMerge(count_state) as count
- FROM mv__tcp_workspace_30d__v0
- WHERE workspaceId = {{ Int32(workspaceId, 1, required=True) }}
- GROUP BY day
- ORDER BY day DESC
+%
+SELECT
+ time as day,
+ countMerge(count_state) as count
+FROM mv__tcp_workspace_30d__v0
+WHERE workspaceId = {{ Int32(workspaceId, 1, required=True) }}
+GROUP BY day
+ORDER BY day DESC
+
+TYPE endpoint
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint_audit_log.pipe b/packages/tinybird/endpoints/endpoint_audit_log.pipe
deleted file mode 100644
index 4d42b16b2..000000000
--- a/packages/tinybird/endpoints/endpoint_audit_log.pipe
+++ /dev/null
@@ -1,9 +0,0 @@
-VERSION 0
-
-NODE endpoint_audit_pipe_0
-SQL >
-
- % SELECT * FROM audit_log__v0 WHERE id = {{ String(event_id, 1) }} ORDER BY timestamp DESC
-
-
-TYPE ENDPOINT
diff --git a/packages/tinybird/endpoints/endpoint_audit_log__v0.pipe b/packages/tinybird/endpoints/endpoint_audit_log__v0.pipe
new file mode 100644
index 000000000..48c4e1cdb
--- /dev/null
+++ b/packages/tinybird/endpoints/endpoint_audit_log__v0.pipe
@@ -0,0 +1,8 @@
+NODE endpoint_audit_pipe_0
+SQL >
+
+% SELECT * FROM audit_log__v0 WHERE id = {{ String(eventId, 'monitor:2089') }} ORDER BY timestamp DESC
+
+TYPE endpoint
+
+
diff --git a/packages/tinybird/endpoints/get_result_for_on_demand_check_http.pipe b/packages/tinybird/endpoints/get_result_for_on_demand_check_http.pipe
new file mode 100644
index 000000000..79b0eecb3
--- /dev/null
+++ b/packages/tinybird/endpoints/get_result_for_on_demand_check_http.pipe
@@ -0,0 +1,27 @@
+TOKEN "getResultForOnDemandCheck_endpoint_read_7832" READ
+
+NODE get_result_for_on_demand_check_http_0
+SQL >
+
+%
+SELECT
+ latency,
+ monitorId,
+ error,
+ region,
+ statusCode,
+ timestamp,
+ url,
+ workspaceId,
+ timing,
+ cronTimestamp
+FROM mv__http_full_30d__v0
+where
+ cronTimestamp = {{ String(timestamp, '1729871694536') }} and
+ monitorId = {{ String(monitorId, '2260') }}
+ and url = {{ String(url , 'https://www.openstatus.dev/api/ping/edge') }}
+ order by cronTimestamp desc
+
+TYPE endpoint
+
+
diff --git a/packages/tinybird/pipes/aggregate__dns_status_45d__v1.pipe b/packages/tinybird/materializations/aggregate__dns_status_45d__v1.pipe
similarity index 95%
rename from packages/tinybird/pipes/aggregate__dns_status_45d__v1.pipe
rename to packages/tinybird/materializations/aggregate__dns_status_45d__v1.pipe
index d74825f07..004bec544 100644
--- a/packages/tinybird/pipes/aggregate__dns_status_45d__v1.pipe
+++ b/packages/tinybird/materializations/aggregate__dns_status_45d__v1.pipe
@@ -1,5 +1,3 @@
-TAGS "statuspage, dns"
-
NODE aggregate
SQL >
diff --git a/packages/tinybird/pipes/aggregate__external_status_component_daily__v0.pipe b/packages/tinybird/materializations/aggregate__external_status_component__daily__v0.pipe
similarity index 55%
rename from packages/tinybird/pipes/aggregate__external_status_component_daily__v0.pipe
rename to packages/tinybird/materializations/aggregate__external_status_component__daily__v0.pipe
index 46dfdf2fa..a50abf3c7 100644
--- a/packages/tinybird/pipes/aggregate__external_status_component_daily__v0.pipe
+++ b/packages/tinybird/materializations/aggregate__external_status_component__daily__v0.pipe
@@ -1,22 +1,10 @@
-TAGS "external_status"
-
NODE aggregate
SQL >
SELECT
toDate(toTimeZone(fromUnixTimestamp64Milli(fetched_at), 'UTC')) AS day,
component_id,
- argMaxState(
- indicator,
- toUInt8(
- multiIf(
- indicator = 'critical', 3,
- indicator = 'major', 2,
- indicator = 'minor', 1,
- 0
- )
- )
- ) AS worst_indicator,
+ argMaxState(indicator, toUInt8(multiIf(indicator = 'critical', 3, indicator = 'major', 2, indicator = 'minor', 1, 0))) AS worst_indicator,
maxState(toUInt8(status = 'under_maintenance')) AS had_maintenance,
sumState(toUInt32(1)) AS snapshot_count
FROM external_status_component__v0
@@ -26,3 +14,5 @@ SQL >
TYPE materialized
DATASOURCE mv__external_status_component_daily__v0
+
+
diff --git a/packages/tinybird/materializations/aggregate__external_status_daily__v0.pipe b/packages/tinybird/materializations/aggregate__external_status_daily__v0.pipe
new file mode 100644
index 000000000..6c0696bcf
--- /dev/null
+++ b/packages/tinybird/materializations/aggregate__external_status_daily__v0.pipe
@@ -0,0 +1,28 @@
+NODE aggregate
+SQL >
+
+ SELECT
+ toDate(toTimeZone(fromUnixTimestamp64Milli(fetched_at), 'UTC')) AS day,
+ id,
+ argMaxState(
+ indicator,
+ toUInt8(
+ multiIf(
+ indicator = 'critical', 3,
+ indicator = 'major', 2,
+ indicator = 'minor', 1,
+ 0
+ )
+ )
+ ) AS worst_indicator,
+ maxState(toUInt8(status = 'under_maintenance')) AS had_maintenance,
+ sumState(toUInt32(1)) AS snapshot_count
+ FROM external_status__v1
+ GROUP BY
+ day,
+ id
+
+TYPE materialized
+DATASOURCE mv__external_status_daily__v0
+
+
diff --git a/packages/tinybird/materializations/aggregate__http_14d__v0.pipe b/packages/tinybird/materializations/aggregate__http_14d__v0.pipe
new file mode 100644
index 000000000..3c3e547d2
--- /dev/null
+++ b/packages/tinybird/materializations/aggregate__http_14d__v0.pipe
@@ -0,0 +1,20 @@
+NODE aggregate
+SQL >
+
+ SELECT
+ toDateTime(fromUnixTimestamp64Milli(cronTimestamp)) AS time,
+ latency,
+ error,
+ region,
+ trigger,
+ statusCode,
+ timestamp,
+ cronTimestamp,
+ monitorId,
+ workspaceId
+ FROM ping_response__v8
+
+TYPE materialized
+DATASOURCE mv__http_14d__v0
+
+
diff --git a/packages/tinybird/pipes/aggregate__http_14d__v1.pipe b/packages/tinybird/materializations/aggregate__http_14d__v1.pipe
similarity index 96%
rename from packages/tinybird/pipes/aggregate__http_14d__v1.pipe
rename to packages/tinybird/materializations/aggregate__http_14d__v1.pipe
index 5fc61ca84..1e9d24382 100644
--- a/packages/tinybird/pipes/aggregate__http_14d__v1.pipe
+++ b/packages/tinybird/materializations/aggregate__http_14d__v1.pipe
@@ -1,5 +1,3 @@
-TAGS "http"
-
NODE aggregate
SQL >
diff --git a/packages/tinybird/materializations/aggregate__http_1d__v0.pipe b/packages/tinybird/materializations/aggregate__http_1d__v0.pipe
new file mode 100644
index 000000000..7c995fb62
--- /dev/null
+++ b/packages/tinybird/materializations/aggregate__http_1d__v0.pipe
@@ -0,0 +1,20 @@
+NODE aggregate
+SQL >
+
+ SELECT
+ toDateTime(fromUnixTimestamp64Milli(cronTimestamp)) AS time,
+ latency,
+ error,
+ region,
+ trigger,
+ statusCode,
+ timestamp,
+ cronTimestamp,
+ monitorId,
+ workspaceId
+ FROM ping_response__v8
+
+TYPE materialized
+DATASOURCE mv__http_1d__v0
+
+
diff --git a/packages/tinybird/pipes/aggregate__http_1d__v1.pipe b/packages/tinybird/materializations/aggregate__http_1d__v1.pipe
similarity index 96%
rename from packages/tinybird/pipes/aggregate__http_1d__v1.pipe
rename to packages/tinybird/materializations/aggregate__http_1d__v1.pipe
index ef054ccd6..8facbd464 100644
--- a/packages/tinybird/pipes/aggregate__http_1d__v1.pipe
+++ b/packages/tinybird/materializations/aggregate__http_1d__v1.pipe
@@ -1,5 +1,3 @@
-TAGS "http"
-
NODE aggregate
SQL >
diff --git a/packages/tinybird/materializations/aggregate__http_30d__v0.pipe b/packages/tinybird/materializations/aggregate__http_30d__v0.pipe
new file mode 100644
index 000000000..ffc98d098
--- /dev/null
+++ b/packages/tinybird/materializations/aggregate__http_30d__v0.pipe
@@ -0,0 +1,20 @@
+NODE aggregate
+SQL >
+
+ SELECT
+ toDateTime(fromUnixTimestamp64Milli(cronTimestamp)) AS time,
+ latency,
+ error,
+ region,
+ trigger,
+ statusCode,
+ timestamp,
+ cronTimestamp,
+ monitorId,
+ workspaceId
+ FROM ping_response__v8
+
+TYPE materialized
+DATASOURCE mv__http_30d__v0
+
+
diff --git a/packages/tinybird/pipes/aggregate__http_30d__v1.pipe b/packages/tinybird/materializations/aggregate__http_30d__v1.pipe
similarity index 100%
rename from packages/tinybird/pipes/aggregate__http_30d__v1.pipe
rename to packages/tinybird/materializations/aggregate__http_30d__v1.pipe
diff --git a/packages/tinybird/materializations/aggregate__http_7d__v0.pipe b/packages/tinybird/materializations/aggregate__http_7d__v0.pipe
new file mode 100644
index 000000000..0421cafe7
--- /dev/null
+++ b/packages/tinybird/materializations/aggregate__http_7d__v0.pipe
@@ -0,0 +1,20 @@
+NODE aggregate
+SQL >
+
+ SELECT
+ toDateTime(fromUnixTimestamp64Milli(cronTimestamp)) AS time,
+ latency,
+ error,
+ region,
+ trigger,
+ statusCode,
+ timestamp,
+ cronTimestamp,
+ monitorId,
+ workspaceId
+ FROM ping_response__v8
+
+TYPE materialized
+DATASOURCE mv__http_7d__v0
+
+
diff --git a/packages/tinybird/pipes/aggregate__http_7d__v1.pipe b/packages/tinybird/materializations/aggregate__http_7d__v1.pipe
similarity index 100%
rename from packages/tinybird/pipes/aggregate__http_7d__v1.pipe
rename to packages/tinybird/materializations/aggregate__http_7d__v1.pipe
diff --git a/packages/tinybird/pipes/aggregate__http_90d__v1.pipe b/packages/tinybird/materializations/aggregate__http_90d__v1.pipe
similarity index 99%
rename from packages/tinybird/pipes/aggregate__http_90d__v1.pipe
rename to packages/tinybird/materializations/aggregate__http_90d__v1.pipe
index a184aed13..a92ea8171 100644
--- a/packages/tinybird/pipes/aggregate__http_90d__v1.pipe
+++ b/packages/tinybird/materializations/aggregate__http_90d__v1.pipe
@@ -17,3 +17,5 @@ SQL >
TYPE materialized
DATASOURCE mv__http_90d__v1
+
+
diff --git a/packages/tinybird/pipes/aggregate__http_full_14d__v0.pipe b/packages/tinybird/materializations/aggregate__http_full_14d__v0.pipe
similarity index 50%
rename from packages/tinybird/pipes/aggregate__http_full_14d__v0.pipe
rename to packages/tinybird/materializations/aggregate__http_full_14d__v0.pipe
index b4272edaf..cfee2aaaf 100644
--- a/packages/tinybird/pipes/aggregate__http_full_14d__v0.pipe
+++ b/packages/tinybird/materializations/aggregate__http_full_14d__v0.pipe
@@ -2,14 +2,29 @@ DESCRIPTION >
Stores all the data from the http_response table for the last 30 days, mainly used for accessing the data details.
-TAGS "http, full"
-
NODE aggregate
SQL >
SELECT
toDateTime(fromUnixTimestamp64Milli(cronTimestamp)) AS time,
- *
+ latency,
+ monitorId,
+ region,
+ statusCode,
+ error,
+ timestamp,
+ url,
+ workspaceId,
+ cronTimestamp,
+ message,
+ timing,
+ headers,
+ assertions,
+ body,
+ trigger,
+ id,
+ requestStatus,
+ method
FROM ping_response__v8
TYPE materialized
diff --git a/packages/tinybird/pipes/aggregate__http_full_30d__v0.pipe b/packages/tinybird/materializations/aggregate__http_full_30d__v0.pipe
similarity index 50%
rename from packages/tinybird/pipes/aggregate__http_full_30d__v0.pipe
rename to packages/tinybird/materializations/aggregate__http_full_30d__v0.pipe
index 1402cda07..ed4c1815b 100644
--- a/packages/tinybird/pipes/aggregate__http_full_30d__v0.pipe
+++ b/packages/tinybird/materializations/aggregate__http_full_30d__v0.pipe
@@ -2,14 +2,29 @@ DESCRIPTION >
Stores all the data from the http_response table for the last 30 days, mainly used for accessing the data details.
-TAGS "http, full"
-
NODE aggregate
SQL >
SELECT
toDateTime(fromUnixTimestamp64Milli(cronTimestamp)) AS time,
- *
+ latency,
+ monitorId,
+ region,
+ statusCode,
+ error,
+ timestamp,
+ url,
+ workspaceId,
+ cronTimestamp,
+ message,
+ timing,
+ headers,
+ assertions,
+ body,
+ trigger,
+ id,
+ requestStatus,
+ method
FROM ping_response__v8
TYPE materialized
diff --git a/packages/tinybird/pipes/aggregate__http_status_14d.pipe b/packages/tinybird/materializations/aggregate__http_status_14d__v0.pipe
similarity index 94%
rename from packages/tinybird/pipes/aggregate__http_status_14d.pipe
rename to packages/tinybird/materializations/aggregate__http_status_14d__v0.pipe
index b9b48dbaa..7c0e42145 100644
--- a/packages/tinybird/pipes/aggregate__http_status_14d.pipe
+++ b/packages/tinybird/materializations/aggregate__http_status_14d__v0.pipe
@@ -1,7 +1,3 @@
-VERSION 0
-
-TAGS "http, statuspage"
-
NODE aggregate
SQL >
@@ -23,3 +19,5 @@ SQL >
TYPE materialized
DATASOURCE mv__http_status_14d__v0
+
+
diff --git a/packages/tinybird/pipes/aggregate__http_status_45d.pipe b/packages/tinybird/materializations/aggregate__http_status_45d__v0.pipe
similarity index 91%
rename from packages/tinybird/pipes/aggregate__http_status_45d.pipe
rename to packages/tinybird/materializations/aggregate__http_status_45d__v0.pipe
index f502cc3e6..c96b272a1 100644
--- a/packages/tinybird/pipes/aggregate__http_status_45d.pipe
+++ b/packages/tinybird/materializations/aggregate__http_status_45d__v0.pipe
@@ -1,7 +1,3 @@
-VERSION 0
-
-TAGS http, statuspage
-
NODE aggregate
SQL >
@@ -17,3 +13,5 @@ SQL >
TYPE materialized
DATASOURCE mv__http_status_45d__v0
+
+
diff --git a/packages/tinybird/pipes/aggregate__http_status_45d__v1.pipe b/packages/tinybird/materializations/aggregate__http_status_45d__v1.pipe
similarity index 95%
rename from packages/tinybird/pipes/aggregate__http_status_45d__v1.pipe
rename to packages/tinybird/materializations/aggregate__http_status_45d__v1.pipe
index 3b3905ac0..9be3e1f5d 100644
--- a/packages/tinybird/pipes/aggregate__http_status_45d__v1.pipe
+++ b/packages/tinybird/materializations/aggregate__http_status_45d__v1.pipe
@@ -1,5 +1,3 @@
-TAGS "http, statuspage"
-
NODE aggregate
SQL >
diff --git a/packages/tinybird/pipes/aggregate__http_status_7d.pipe b/packages/tinybird/materializations/aggregate__http_status_7d__v0.pipe
similarity index 91%
rename from packages/tinybird/pipes/aggregate__http_status_7d.pipe
rename to packages/tinybird/materializations/aggregate__http_status_7d__v0.pipe
index f2e769959..140ae2cf3 100644
--- a/packages/tinybird/pipes/aggregate__http_status_7d.pipe
+++ b/packages/tinybird/materializations/aggregate__http_status_7d__v0.pipe
@@ -1,7 +1,3 @@
-VERSION 0
-
-TAGS http, statuspage
-
NODE aggregate
SQL >
@@ -17,3 +13,5 @@ SQL >
TYPE materialized
DATASOURCE mv__http_status_7d__v0
+
+
diff --git a/packages/tinybird/pipes/aggregate__http_timing_phases_14d.pipe b/packages/tinybird/materializations/aggregate__http_timing_phases_14d__v1.pipe
similarity index 100%
rename from packages/tinybird/pipes/aggregate__http_timing_phases_14d.pipe
rename to packages/tinybird/materializations/aggregate__http_timing_phases_14d__v1.pipe
diff --git a/packages/tinybird/materializations/aggregate__http_timing_phases_90d__v1.pipe b/packages/tinybird/materializations/aggregate__http_timing_phases_90d__v1.pipe
new file mode 100644
index 000000000..ca070ac4f
--- /dev/null
+++ b/packages/tinybird/materializations/aggregate__http_timing_phases_90d__v1.pipe
@@ -0,0 +1,54 @@
+NODE aggregate
+SQL >
+
+ SELECT
+ toDateTime(fromUnixTimestamp64Milli(cronTimestamp)) AS time,
+ latency,
+ region,
+ trigger,
+ statusCode,
+ monitorId,
+ workspaceId,
+ requestStatus,
+
+ -- Compute actual durations from timing phases
+ if(
+ isNull (JSONExtractInt(timing, 'dnsStart')) OR isNull (JSONExtractInt(timing, 'dnsDone')),
+ NULL,
+ JSONExtractInt(timing, 'dnsDone') - JSONExtractInt(timing, 'dnsStart')
+ ) AS dns,
+
+ if(
+ isNull (JSONExtractInt(timing, 'connectStart'))
+ OR isNull (JSONExtractInt(timing, 'connectDone')),
+ NULL,
+ JSONExtractInt(timing, 'connectDone') - JSONExtractInt(timing, 'connectStart')
+ ) AS connect,
+
+ if(
+ isNull (JSONExtractInt(timing, 'tlsHandshakeStart'))
+ OR isNull (JSONExtractInt(timing, 'tlsHandshakeDone')),
+ NULL,
+ JSONExtractInt(timing, 'tlsHandshakeDone') - JSONExtractInt(timing, 'tlsHandshakeStart')
+ ) AS tls,
+
+ if(
+ isNull (JSONExtractInt(timing, 'firstByteStart'))
+ OR isNull (JSONExtractInt(timing, 'firstByteDone')),
+ NULL,
+ JSONExtractInt(timing, 'firstByteDone') - JSONExtractInt(timing, 'firstByteStart')
+ ) AS firstByte,
+
+ if(
+ isNull (JSONExtractInt(timing, 'transferStart'))
+ OR isNull (JSONExtractInt(timing, 'transferDone')),
+ NULL,
+ JSONExtractInt(timing, 'transferDone') - JSONExtractInt(timing, 'transferStart')
+ ) AS transfer
+
+ FROM ping_response__v8
+
+TYPE materialized
+DATASOURCE mv__http_timing_phases_90d__v1
+
+
diff --git a/packages/tinybird/pipes/aggregate__http_uptime_30d.pipe b/packages/tinybird/materializations/aggregate__http_uptime_30d__v1.pipe
similarity index 92%
rename from packages/tinybird/pipes/aggregate__http_uptime_30d.pipe
rename to packages/tinybird/materializations/aggregate__http_uptime_30d__v1.pipe
index f00cf372a..7761f78b7 100644
--- a/packages/tinybird/pipes/aggregate__http_uptime_30d.pipe
+++ b/packages/tinybird/materializations/aggregate__http_uptime_30d__v1.pipe
@@ -1,7 +1,3 @@
-VERSION 1
-
-TAGS http
-
NODE aggregate
SQL >
diff --git a/packages/tinybird/pipes/aggregate__http_uptime_7d__v1.pipe b/packages/tinybird/materializations/aggregate__http_uptime_7d__v1.pipe
similarity index 100%
rename from packages/tinybird/pipes/aggregate__http_uptime_7d__v1.pipe
rename to packages/tinybird/materializations/aggregate__http_uptime_7d__v1.pipe
diff --git a/packages/tinybird/materializations/aggregate__http_uptime_90d__v1.pipe b/packages/tinybird/materializations/aggregate__http_uptime_90d__v1.pipe
new file mode 100644
index 000000000..fe2213701
--- /dev/null
+++ b/packages/tinybird/materializations/aggregate__http_uptime_90d__v1.pipe
@@ -0,0 +1,15 @@
+NODE aggregate
+SQL >
+
+ SELECT
+ toDateTime(fromUnixTimestamp64Milli(cronTimestamp)) AS time,
+ region,
+ requestStatus,
+ monitorId,
+ workspaceId
+ FROM ping_response__v8
+
+TYPE materialized
+DATASOURCE mv__http_uptime_90d__v1
+
+
diff --git a/packages/tinybird/pipes/aggregate__http_workspace_30d__v0.pipe b/packages/tinybird/materializations/aggregate__http_workspace_30d__v0.pipe
similarity index 86%
rename from packages/tinybird/pipes/aggregate__http_workspace_30d__v0.pipe
rename to packages/tinybird/materializations/aggregate__http_workspace_30d__v0.pipe
index 17f7f5907..b1b5fa931 100644
--- a/packages/tinybird/pipes/aggregate__http_workspace_30d__v0.pipe
+++ b/packages/tinybird/materializations/aggregate__http_workspace_30d__v0.pipe
@@ -1,4 +1,4 @@
-TAGS "http"
+TOKEN "aggregate__requests_30d__v0_endpoint_read_7187" READ
NODE aggregate
SQL >
diff --git a/packages/tinybird/pipes/aggregate__tcp_14d.pipe b/packages/tinybird/materializations/aggregate__tcp_14d__v0.pipe
similarity index 94%
rename from packages/tinybird/pipes/aggregate__tcp_14d.pipe
rename to packages/tinybird/materializations/aggregate__tcp_14d__v0.pipe
index f1db16e55..6a9c0c812 100644
--- a/packages/tinybird/pipes/aggregate__tcp_14d.pipe
+++ b/packages/tinybird/materializations/aggregate__tcp_14d__v0.pipe
@@ -1,7 +1,3 @@
-VERSION 0
-
-TAGS tcp
-
NODE aggregate
SQL >
@@ -19,3 +15,5 @@ SQL >
TYPE materialized
DATASOURCE mv__tcp_14d__v0
+
+
diff --git a/packages/tinybird/pipes/aggregate__tcp_14d__v1.pipe b/packages/tinybird/materializations/aggregate__tcp_14d__v1.pipe
similarity index 96%
rename from packages/tinybird/pipes/aggregate__tcp_14d__v1.pipe
rename to packages/tinybird/materializations/aggregate__tcp_14d__v1.pipe
index 0e6eea1a2..49fc644fd 100644
--- a/packages/tinybird/pipes/aggregate__tcp_14d__v1.pipe
+++ b/packages/tinybird/materializations/aggregate__tcp_14d__v1.pipe
@@ -1,5 +1,3 @@
-TAGS "tcp"
-
NODE aggregate
SQL >
diff --git a/packages/tinybird/pipes/aggregate__tcp_1d.pipe b/packages/tinybird/materializations/aggregate__tcp_1d__v0.pipe
similarity index 94%
rename from packages/tinybird/pipes/aggregate__tcp_1d.pipe
rename to packages/tinybird/materializations/aggregate__tcp_1d__v0.pipe
index 4d1356a57..a3c5cb0f7 100644
--- a/packages/tinybird/pipes/aggregate__tcp_1d.pipe
+++ b/packages/tinybird/materializations/aggregate__tcp_1d__v0.pipe
@@ -1,7 +1,3 @@
-VERSION 0
-
-TAGS tcp
-
NODE aggregate
SQL >
@@ -19,3 +15,5 @@ SQL >
TYPE materialized
DATASOURCE mv__tcp_1d__v0
+
+
diff --git a/packages/tinybird/pipes/aggregate__tcp_1d__v1.pipe b/packages/tinybird/materializations/aggregate__tcp_1d__v1.pipe
similarity index 96%
rename from packages/tinybird/pipes/aggregate__tcp_1d__v1.pipe
rename to packages/tinybird/materializations/aggregate__tcp_1d__v1.pipe
index 8440427c2..7dfdb4a50 100644
--- a/packages/tinybird/pipes/aggregate__tcp_1d__v1.pipe
+++ b/packages/tinybird/materializations/aggregate__tcp_1d__v1.pipe
@@ -1,5 +1,3 @@
-TAGS "tcp"
-
NODE aggregate
SQL >
diff --git a/packages/tinybird/pipes/aggregate__tcp_30d.pipe b/packages/tinybird/materializations/aggregate__tcp_30d__v0.pipe
similarity index 94%
rename from packages/tinybird/pipes/aggregate__tcp_30d.pipe
rename to packages/tinybird/materializations/aggregate__tcp_30d__v0.pipe
index deb04b5ed..97f735627 100644
--- a/packages/tinybird/pipes/aggregate__tcp_30d.pipe
+++ b/packages/tinybird/materializations/aggregate__tcp_30d__v0.pipe
@@ -1,7 +1,3 @@
-VERSION 0
-
-TAGS tcp
-
NODE aggregate
SQL >
@@ -19,3 +15,5 @@ SQL >
TYPE materialized
DATASOURCE mv__tcp_30d__v0
+
+
diff --git a/packages/tinybird/pipes/aggregate__tcp_30d__v1.pipe b/packages/tinybird/materializations/aggregate__tcp_30d__v1.pipe
similarity index 96%
rename from packages/tinybird/pipes/aggregate__tcp_30d__v1.pipe
rename to packages/tinybird/materializations/aggregate__tcp_30d__v1.pipe
index 563f961a5..f36c7e0ea 100644
--- a/packages/tinybird/pipes/aggregate__tcp_30d__v1.pipe
+++ b/packages/tinybird/materializations/aggregate__tcp_30d__v1.pipe
@@ -1,5 +1,3 @@
-TAGS "tcp"
-
NODE aggregate
SQL >
diff --git a/packages/tinybird/pipes/aggregate__tcp_7d.pipe b/packages/tinybird/materializations/aggregate__tcp_7d__v0.pipe
similarity index 94%
rename from packages/tinybird/pipes/aggregate__tcp_7d.pipe
rename to packages/tinybird/materializations/aggregate__tcp_7d__v0.pipe
index 5270ab1c9..687584df4 100644
--- a/packages/tinybird/pipes/aggregate__tcp_7d.pipe
+++ b/packages/tinybird/materializations/aggregate__tcp_7d__v0.pipe
@@ -1,7 +1,3 @@
-VERSION 0
-
-TAGS tcp
-
NODE aggregate
SQL >
@@ -19,3 +15,5 @@ SQL >
TYPE materialized
DATASOURCE mv__tcp_7d__v0
+
+
diff --git a/packages/tinybird/pipes/aggregate__tcp_7d__v1.pipe b/packages/tinybird/materializations/aggregate__tcp_7d__v1.pipe
similarity index 96%
rename from packages/tinybird/pipes/aggregate__tcp_7d__v1.pipe
rename to packages/tinybird/materializations/aggregate__tcp_7d__v1.pipe
index f762815c1..c7c62d4bb 100644
--- a/packages/tinybird/pipes/aggregate__tcp_7d__v1.pipe
+++ b/packages/tinybird/materializations/aggregate__tcp_7d__v1.pipe
@@ -1,5 +1,3 @@
-TAGS "tcp"
-
NODE aggregate
SQL >
diff --git a/packages/tinybird/pipes/aggregate__tcp_90d__v1.pipe b/packages/tinybird/materializations/aggregate__tcp_90d__v1.pipe
similarity index 96%
rename from packages/tinybird/pipes/aggregate__tcp_90d__v1.pipe
rename to packages/tinybird/materializations/aggregate__tcp_90d__v1.pipe
index 4a0a126e1..f4db908cb 100644
--- a/packages/tinybird/pipes/aggregate__tcp_90d__v1.pipe
+++ b/packages/tinybird/materializations/aggregate__tcp_90d__v1.pipe
@@ -1,5 +1,3 @@
-TAGS "tcp"
-
NODE aggregate
SQL >
@@ -18,3 +16,5 @@ SQL >
TYPE materialized
DATASOURCE mv__tcp_90d__v1
+
+
diff --git a/packages/tinybird/pipes/aggregate__tcp_full_14d__v0.pipe b/packages/tinybird/materializations/aggregate__tcp_full_14d__v0.pipe
similarity index 57%
rename from packages/tinybird/pipes/aggregate__tcp_full_14d__v0.pipe
rename to packages/tinybird/materializations/aggregate__tcp_full_14d__v0.pipe
index ca9c70f57..7331d328d 100644
--- a/packages/tinybird/pipes/aggregate__tcp_full_14d__v0.pipe
+++ b/packages/tinybird/materializations/aggregate__tcp_full_14d__v0.pipe
@@ -2,14 +2,24 @@ DESCRIPTION >
Stores all the data from the http_response table for the last 30 days, mainly used for accessing the data details.
-TAGS "tcp, full"
-
NODE aggregate
SQL >
SELECT
toDateTime(fromUnixTimestamp64Milli(cronTimestamp)) AS time,
- *
+ monitorId,
+ region,
+ timestamp,
+ cronTimestamp,
+ timing,
+ workspaceId,
+ latency,
+ errorMessage,
+ error,
+ trigger,
+ uri,
+ id,
+ requestStatus
FROM tcp_response__v0
TYPE materialized
diff --git a/packages/tinybird/materializations/aggregate__tcp_full_30d__v0.pipe b/packages/tinybird/materializations/aggregate__tcp_full_30d__v0.pipe
new file mode 100644
index 000000000..535e4f070
--- /dev/null
+++ b/packages/tinybird/materializations/aggregate__tcp_full_30d__v0.pipe
@@ -0,0 +1,28 @@
+DESCRIPTION >
+ Stores all the data from the http_response table for the last 30 days, mainly used for accessing the data details.
+
+
+NODE aggregate
+SQL >
+
+ SELECT
+ toDateTime(fromUnixTimestamp64Milli(cronTimestamp)) AS time,
+ monitorId,
+ region,
+ timestamp,
+ cronTimestamp,
+ timing,
+ workspaceId,
+ latency,
+ errorMessage,
+ error,
+ trigger,
+ uri,
+ id,
+ requestStatus
+ FROM tcp_response__v0
+
+TYPE materialized
+DATASOURCE mv__tcp_full_30d__v0
+
+
diff --git a/packages/tinybird/pipes/aggregate__tcp_status_45d.pipe b/packages/tinybird/materializations/aggregate__tcp_status_45d__v0.pipe
similarity index 91%
rename from packages/tinybird/pipes/aggregate__tcp_status_45d.pipe
rename to packages/tinybird/materializations/aggregate__tcp_status_45d__v0.pipe
index c3389940f..e7d27a7d9 100644
--- a/packages/tinybird/pipes/aggregate__tcp_status_45d.pipe
+++ b/packages/tinybird/materializations/aggregate__tcp_status_45d__v0.pipe
@@ -1,7 +1,3 @@
-VERSION 0
-
-TAGS tcp, statuspage
-
NODE aggregate
SQL >
@@ -17,3 +13,5 @@ SQL >
TYPE materialized
DATASOURCE mv__tcp_status_45d__v0
+
+
diff --git a/packages/tinybird/pipes/aggregate__tcp_status_45d__v1.pipe b/packages/tinybird/materializations/aggregate__tcp_status_45d__v1.pipe
similarity index 95%
rename from packages/tinybird/pipes/aggregate__tcp_status_45d__v1.pipe
rename to packages/tinybird/materializations/aggregate__tcp_status_45d__v1.pipe
index 2b2107c89..2a6364847 100644
--- a/packages/tinybird/pipes/aggregate__tcp_status_45d__v1.pipe
+++ b/packages/tinybird/materializations/aggregate__tcp_status_45d__v1.pipe
@@ -1,5 +1,3 @@
-TAGS "tcp, statuspage"
-
NODE aggregate
SQL >
diff --git a/packages/tinybird/pipes/aggregate__tcp_status_7d.pipe b/packages/tinybird/materializations/aggregate__tcp_status_7d__v0.pipe
similarity index 91%
rename from packages/tinybird/pipes/aggregate__tcp_status_7d.pipe
rename to packages/tinybird/materializations/aggregate__tcp_status_7d__v0.pipe
index 777126266..6f71bf85a 100644
--- a/packages/tinybird/pipes/aggregate__tcp_status_7d.pipe
+++ b/packages/tinybird/materializations/aggregate__tcp_status_7d__v0.pipe
@@ -1,7 +1,3 @@
-VERSION 0
-
-TAGS tcp, statuspage
-
NODE aggregate
SQL >
@@ -17,3 +13,5 @@ SQL >
TYPE materialized
DATASOURCE mv__tcp_status_7d__v0
+
+
diff --git a/packages/tinybird/pipes/aggregate__tcp_uptime_30d__v1.pipe b/packages/tinybird/materializations/aggregate__tcp_uptime_30d__v1.pipe
similarity index 100%
rename from packages/tinybird/pipes/aggregate__tcp_uptime_30d__v1.pipe
rename to packages/tinybird/materializations/aggregate__tcp_uptime_30d__v1.pipe
diff --git a/packages/tinybird/pipes/aggregate__tcp_uptime_7d__v1.pipe b/packages/tinybird/materializations/aggregate__tcp_uptime_7d__v1.pipe
similarity index 100%
rename from packages/tinybird/pipes/aggregate__tcp_uptime_7d__v1.pipe
rename to packages/tinybird/materializations/aggregate__tcp_uptime_7d__v1.pipe
diff --git a/packages/tinybird/materializations/aggregate__tcp_uptime_90d__v1.pipe b/packages/tinybird/materializations/aggregate__tcp_uptime_90d__v1.pipe
new file mode 100644
index 000000000..179056e69
--- /dev/null
+++ b/packages/tinybird/materializations/aggregate__tcp_uptime_90d__v1.pipe
@@ -0,0 +1,15 @@
+NODE aggregate
+SQL >
+
+ SELECT
+ toDateTime(fromUnixTimestamp64Milli(cronTimestamp)) AS time,
+ region,
+ requestStatus,
+ monitorId,
+ workspaceId
+ FROM tcp_response__v0
+
+TYPE materialized
+DATASOURCE mv__tcp_uptime_90d__v1
+
+
diff --git a/packages/tinybird/pipes/aggregate__tcp_workspace_30d__v0.pipe b/packages/tinybird/materializations/aggregate__tcp_workspace_30d__v0.pipe
similarity index 96%
rename from packages/tinybird/pipes/aggregate__tcp_workspace_30d__v0.pipe
rename to packages/tinybird/materializations/aggregate__tcp_workspace_30d__v0.pipe
index 8430c9e33..258f0b6df 100644
--- a/packages/tinybird/pipes/aggregate__tcp_workspace_30d__v0.pipe
+++ b/packages/tinybird/materializations/aggregate__tcp_workspace_30d__v0.pipe
@@ -1,5 +1,3 @@
-TAGS "tcp"
-
NODE aggregate
SQL >
diff --git a/packages/tinybird/pipes/__ttl_45d_count_utc_get.pipe b/packages/tinybird/pipes/__ttl_45d_count_utc_get.pipe
deleted file mode 100644
index d91fd4a25..000000000
--- a/packages/tinybird/pipes/__ttl_45d_count_utc_get.pipe
+++ /dev/null
@@ -1,19 +0,0 @@
-VERSION 1
-TOKEN "__ttl_45d_count_utc_get__v1_endpoint_read_7956" READ
-
-NODE __ttl_45d_count_utc_get_0
-SQL >
-
- %
- SELECT time as day, countMerge(count) as count, countMerge(ok) as ok
- FROM mv__http_status_45d__v0
- 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, 45, now())
- ) STEP INTERVAL -1 DAY
diff --git a/packages/tinybird/pipes/aggregate__external_status_daily__v0.pipe b/packages/tinybird/pipes/aggregate__external_status_daily__v0.pipe
deleted file mode 100644
index e716dde4c..000000000
--- a/packages/tinybird/pipes/aggregate__external_status_daily__v0.pipe
+++ /dev/null
@@ -1,28 +0,0 @@
-TAGS "external_status"
-
-NODE aggregate
-SQL >
-
- SELECT
- toDate(toTimeZone(fromUnixTimestamp64Milli(fetched_at), 'UTC')) AS day,
- id,
- argMaxState(
- indicator,
- toUInt8(
- multiIf(
- indicator = 'critical', 3,
- indicator = 'major', 2,
- indicator = 'minor', 1,
- 0
- )
- )
- ) AS worst_indicator,
- maxState(toUInt8(status = 'under_maintenance')) AS had_maintenance,
- sumState(toUInt32(1)) AS snapshot_count
- FROM external_status__v1
- GROUP BY
- day,
- id
-
-TYPE materialized
-DATASOURCE mv__external_status_daily__v0
diff --git a/packages/tinybird/pipes/aggregate__http_timing_phases_90d__v1.pipe b/packages/tinybird/pipes/aggregate__http_timing_phases_90d__v1.pipe
deleted file mode 100644
index f2d58c3cd..000000000
--- a/packages/tinybird/pipes/aggregate__http_timing_phases_90d__v1.pipe
+++ /dev/null
@@ -1,33 +0,0 @@
-NODE aggregate
-SQL >
-
- SELECT
- toDateTime(fromUnixTimestamp64Milli(cronTimestamp)) AS time,
- latency,
- region,
- trigger,
- statusCode,
- monitorId,
- workspaceId,
- requestStatus,
-
- -- Compute actual durations from timing phases
- if(isNull(JSONExtractInt(timing, 'dnsStart')) OR isNull(JSONExtractInt(timing, 'dnsDone')), NULL,
- JSONExtractInt(timing, 'dnsDone') - JSONExtractInt(timing, 'dnsStart')) AS dns,
-
- if(isNull(JSONExtractInt(timing, 'connectStart')) OR isNull(JSONExtractInt(timing, 'connectDone')), NULL,
- JSONExtractInt(timing, 'connectDone') - JSONExtractInt(timing, 'connectStart')) AS connect,
-
- if(isNull(JSONExtractInt(timing, 'tlsHandshakeStart')) OR isNull(JSONExtractInt(timing, 'tlsHandshakeDone')), NULL,
- JSONExtractInt(timing, 'tlsHandshakeDone') - JSONExtractInt(timing, 'tlsHandshakeStart')) AS tls,
-
- if(isNull(JSONExtractInt(timing, 'firstByteStart')) OR isNull(JSONExtractInt(timing, 'firstByteDone')), NULL,
- JSONExtractInt(timing, 'firstByteDone') - JSONExtractInt(timing, 'firstByteStart')) AS firstByte,
-
- if(isNull(JSONExtractInt(timing, 'transferStart')) OR isNull(JSONExtractInt(timing, 'transferDone')), NULL,
- JSONExtractInt(timing, 'transferDone') - JSONExtractInt(timing, 'transferStart')) AS transfer
-
- FROM ping_response__v8
-
-TYPE materialized
-DATASOURCE mv__http_timing_phases_90d__v1
diff --git a/packages/tinybird/pipes/aggregate__http_uptime_90d__v1.pipe b/packages/tinybird/pipes/aggregate__http_uptime_90d__v1.pipe
deleted file mode 100644
index 10e064a6e..000000000
--- a/packages/tinybird/pipes/aggregate__http_uptime_90d__v1.pipe
+++ /dev/null
@@ -1,17 +0,0 @@
-VERSION 1
-
-TAGS http
-
-NODE aggregate
-SQL >
-
- SELECT
- toDateTime(fromUnixTimestamp64Milli(cronTimestamp)) AS time,
- region,
- requestStatus,
- monitorId,
- workspaceId
- FROM ping_response__v8
-
-TYPE materialized
-DATASOURCE mv__http_uptime_90d__v1
diff --git a/packages/tinybird/pipes/aggregate__tcp_full_30d__v0.pipe b/packages/tinybird/pipes/aggregate__tcp_full_30d__v0.pipe
deleted file mode 100644
index e1fdc260f..000000000
--- a/packages/tinybird/pipes/aggregate__tcp_full_30d__v0.pipe
+++ /dev/null
@@ -1,16 +0,0 @@
-DESCRIPTION >
- Stores all the data from the http_response table for the last 30 days, mainly used for accessing the data details.
-
-
-TAGS "tcp, full"
-
-NODE aggregate
-SQL >
-
- SELECT
- toDateTime(fromUnixTimestamp64Milli(tcp_response__v0.cronTimestamp)) AS time,
- *
- FROM tcp_response__v0
-
-TYPE materialized
-DATASOURCE mv__tcp_full_30d__v0
diff --git a/packages/tinybird/pipes/aggregate__tcp_uptime_90d__v1.pipe b/packages/tinybird/pipes/aggregate__tcp_uptime_90d__v1.pipe
deleted file mode 100644
index 71676f326..000000000
--- a/packages/tinybird/pipes/aggregate__tcp_uptime_90d__v1.pipe
+++ /dev/null
@@ -1,13 +0,0 @@
-NODE aggregate
-SQL >
-
- SELECT
- toDateTime(fromUnixTimestamp64Milli(cronTimestamp)) AS time,
- region,
- requestStatus,
- monitorId,
- workspaceId
- FROM tcp_response__v0
-
-TYPE materialized
-DATASOURCE mv__tcp_uptime_90d__v1
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.pipe
deleted file mode 100644
index 4053b4cfa..000000000
--- a/packages/tinybird/pipes/get_result_for_on_demand_check_http.pipe
+++ /dev/null
@@ -1,23 +0,0 @@
-VERSION 0
-
-NODE endpoint
-SQL >
-
- %
- SELECT
- latency,
- monitorId,
- error,
- region,
- statusCode,
- timestamp,
- url,
- workspaceId,
- timing,
- cronTimestamp
- FROM mv__http_full_30d__v0
- where
- cronTimestamp = {{ String(timestamp, '1729871694536') }} and
- monitorId = {{ String(monitorId, '2260') }}
- and url = {{ String(url , 'https://www.openstatus.dev/api/ping/edge') }}
- order by cronTimestamp desc
diff --git a/packages/tinybird/pipes/public_status.pipe b/packages/tinybird/pipes/public_status.pipe
deleted file mode 100644
index 88f9c7cbe..000000000
--- a/packages/tinybird/pipes/public_status.pipe
+++ /dev/null
@@ -1,22 +0,0 @@
-VERSION 0
-
-DESCRIPTION >
- last 5 cron timestamps within last 3 hours
-
-NODE group_by_cronTimestamp
-SQL >
-
- %
- SELECT
- cronTimestamp,
- count() AS count,
- count(multiIf((statusCode >= 200) AND (statusCode <= 299), 1, NULL)) AS ok
- FROM ping_response__v8
- WHERE
- monitorId = {{ String(monitorId, '1') }}
- {% if defined(url) %} AND url = {{ String(url) }} {% end %}
- AND cronTimestamp
- >= toUnixTimestamp64Milli(toDateTime64(now() - INTERVAL 3 HOUR, 3))
- GROUP BY cronTimestamp, monitorId
- ORDER BY cronTimestamp DESC
- LIMIT {{ Int16(limit, 5)}}
diff --git a/packages/tinybird/pipes/response_details.pipe b/packages/tinybird/pipes/response_details.pipe
deleted file mode 100644
index 80d062cf4..000000000
--- a/packages/tinybird/pipes/response_details.pipe
+++ /dev/null
@@ -1,13 +0,0 @@
-VERSION 0
-
-NODE response_graph_0
-SQL >
-
- %
- SELECT *
- FROM ping_response__v8
- WHERE
- monitorId = {{ String(monitorId, '1') }}
- {% if defined(url) %} AND url = {{ String(url) }} {% end %}
- AND cronTimestamp = {{ Int64(cronTimestamp, 1706467215188) }}
- AND region = {{ String(region, 'ams') }}
diff --git a/packages/tinybird/pipes/response_graph.pipe b/packages/tinybird/pipes/response_graph.pipe
deleted file mode 100644
index 34f9c0ff3..000000000
--- a/packages/tinybird/pipes/response_graph.pipe
+++ /dev/null
@@ -1,26 +0,0 @@
-VERSION 0
-
-NODE response_graph_0
-SQL >
-
- %
- SELECT
- region,
- toStartOfInterval(
- toDateTime(cronTimestamp / 1000),
- INTERVAL {{ Int64(interval, 30) }} MINUTE
- ) as h,
- toUnixTimestamp64Milli(toDateTime64(h, 3)) as timestamp,
- round(avg(latency)) as avgLatency,
- 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 ping_response__v8
- WHERE
- monitorId = {{ String(monitorId, '1') }}
- {% if defined(url) %} AND url = {{ String(url) }} {% end %}
- {% if defined(fromDate) %} AND timestamp >= {{ Int64(fromDate) }} {% end %}
- {% if defined(toDate) %} AND timestamp <= {{ Int64(toDate) }} {% end %}
- GROUP BY h, region
- ORDER BY h DESC
diff --git a/packages/tinybird/pipes/response_list.pipe b/packages/tinybird/pipes/response_list.pipe
deleted file mode 100644
index e194e4ecb..000000000
--- a/packages/tinybird/pipes/response_list.pipe
+++ /dev/null
@@ -1,24 +0,0 @@
-VERSION 2
-
-NODE response_list_0
-SQL >
-
- %
- SELECT latency, monitorId, region, statusCode, timestamp, url, workspaceId, cronTimestamp, message
- FROM ping_response__v8
- WHERE monitorId = {{ String(monitorId, 'openstatusPing') }}
- {% if defined(url) %} AND url = {{ String(url) }} {% end %}
- {% if defined(region) %}
- AND region = {{ String(region) }}
- {% end %}
- {% if defined(cronTimestamp) %}
- AND cronTimestamp = {{ Int64(cronTimestamp) }}
- {% end %}
- {% if defined(fromDate) %}
- AND cronTimestamp >= {{ Int64(fromDate) }}
- {% end %}
- {% if defined(toDate) %}
- AND cronTimestamp <= {{ Int64(toDate) }}
- {% end %}
- ORDER BY timestamp DESC
- LIMIT {{Int32(limit, 100)}}
diff --git a/packages/tinybird/pipes/single_checks_get.pipe b/packages/tinybird/pipes/single_checks_get.pipe
deleted file mode 100644
index 913e26884..000000000
--- a/packages/tinybird/pipes/single_checks_get.pipe
+++ /dev/null
@@ -1,16 +0,0 @@
-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) }}
-
-