Openstatus
www.openstatus.dev
1VERSION 0
2
3TAGS "http"
4
5NODE endpoint
6SQL >
7
8 %
9 SELECT
10 time as day,
11 countMerge(total) as total,
12 countMerge(success) as success,
13 countMerge(error) as error,
14 countMerge(degraded) as degraded
15 FROM mv__http_status_14d__v0
16 WHERE monitorId = {{ String(monitorId, '1', required=True) }}
17 GROUP BY day
18 ORDER BY day DESC
19 WITH FILL
20 FROM
21 toStartOfDay(toStartOfDay(toTimeZone(now(), 'UTC')))
22 TO toStartOfDay(date_sub(DAY, 14, now())) STEP INTERVAL -1 DAY
23 LIMIT {{ Int16(days, 14) }}
24
25
26TYPE ENDPOINT