Skip to content

Open-source status page, incident response and uptime monitoring

598 B
Raw Blame
TOKEN "endpoint__external_status_component_history__v0_endpoint_read_4435" READ

NODE endpoint
SQL >

%
    SELECT
        day,
        component_id,
        argMaxMerge(worst_indicator) AS worst_indicator,
        maxMerge(had_maintenance) AS had_maintenance,
        sumMerge(snapshot_count) AS snapshot_count
    FROM mv__external_status_component_daily__v0
    WHERE component_id IN {{ Array(component_ids, 'String') }}
    {% if defined(days) %}
        AND day >= today() - INTERVAL {{ Int16(days, 45) }} DAY
    {% end %}
    GROUP BY day, component_id
    ORDER BY day ASC

TYPE endpoint