Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. ๐ซ Status page with uptime monitoring & API monitoring as code ๐ซ openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor
Something went wrong. Try again.
1.9 kB ยท 50 lines
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051TOKEN "endpoint__http_list_1d__v2_endpoint_read_7101" READNODE endpointSQL >%SELECT time, id, latency, region, trigger, statusCode, timestamp, cronTimestamp, monitorId, requestStatus, timingFROM mv__http_1d__v1WHERE monitorId = {{ String(monitorId, '1', required=True) }} {% if defined(fromDate) %} AND time >= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(fromDate) }}))) AND cronTimestamp >= toInt64({{ String(fromDate) }}) {% end %} {% if defined(toDate) %} AND time <= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(toDate) }}))) AND cronTimestamp <= toInt64({{ String(toDate) }}) {% end %} {% if defined(cursor) %} {% if String(direction, 'next') == 'prev' %} AND time >= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(cursor) }}))) AND cronTimestamp > toInt64({{ String(cursor) }}) {% else %} AND time <= toDateTime(fromUnixTimestamp64Milli(toInt64({{ String(cursor) }}))) AND cronTimestamp < toInt64({{ String(cursor) }}) {% end %} {% end %} {% if regions %} AND region IN {{ Array(regions, 'String') }} {% end %} {% if status %} AND requestStatus IN {{ Array(status, 'String') }} {% end %} {% if trigger %} AND trigger IN {{ Array(trigger, 'String') }} {% end %} {% if statusCodes %} AND statusCode IN {{ Array(statusCodes, 'Int16') }} {% end %} {% if defined(latencyMin) %} AND latency >= toInt64({{ String(latencyMin) }}) {% end %} {% if defined(latencyMax) %} AND latency <= toInt64({{ String(latencyMax) }}) {% end %}ORDER BY time {% if String(direction, 'next') == 'prev' %} ASC {% else %} DESC {% end %}, cronTimestamp {% if String(direction, 'next') == 'prev' %} ASC {% else %} DESC {% end %}LIMIT {{ Int32(limit, 50, required=True) }}TYPE endpoint