Skip to content

Open-source status page, incident response and uptime monitoring

468 B
Raw Blame
NODE endpoint
SQL >

%
    SELECT time as day, countMerge(count) as count, countMerge(ok) as ok
    FROM mv__http_status_45d__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, 45, now())
        ) STEP INTERVAL -1 DAY
    LIMIT {{ Int16(days, 45) }}

TYPE endpoint