Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
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
TYPE endpoint