my own status page
1# status
2
3super simple cf worker based uptime / status dashboard running [infra.dunkirk.sh](https://infra.dunkirk.sh).
4
5The canonical repo for this is hosted on tangled over at [`dunkirk.sh/status`](https://tangled.org/dunkirk.sh/status)
6
7## API
8
9### `GET /api/status`
10Overall summary with all machines and services.
11```json
12{
13 "ok": true,
14 "status": "up",
15 "last_check": 1741900245,
16 "machines": [{
17 "name": "orion",
18 "hostname": "orion",
19 "type": "server",
20 "online": true,
21 "status": "up",
22 "services": [{
23 "id": "l4",
24 "status": "up",
25 "latency_ms": 42,
26 "uptime_90d": 99.84
27 }]
28 }]
29}
30```
31
32### `GET /api/status/overall`
33Lightweight overall summary.
34```json
35{
36 "ok": true,
37 "status": "up",
38 "uptime_90d": 99.84,
39 "services_total": 20,
40 "services_monitored": 16,
41 "machines_total": 4
42}
43```
44
45### `GET /api/status/service/:id`
46Single service status.
47```json
48{
49 "id": "l4",
50 "status": "up",
51 "latency_ms": 42,
52 "uptime_90d": 99.84
53}
54```
55
56### `GET /api/status/machine/:name`
57Machine and all its services.
58```json
59{
60 "name": "orion",
61 "hostname": "orion",
62 "type": "server",
63 "online": true,
64 "status": "up",
65 "services": [{
66 "id": "l4",
67 "status": "up",
68 "latency_ms": 42,
69 "uptime_90d": 99.84
70 }]
71}
72```
73
74### `GET /api/uptime/:service_id`
75Hourly uptime buckets for a service. Optional `?window=<days>` param (default: 90).
76```json
77{
78 "service_id": "l4",
79 "window_hours": 2160,
80 "buckets": [{
81 "timestamp": 1741896000,
82 "status": "up"
83 }]
84}
85```
86
87**Status values:** `up` · `degraded` · `down` · `partial` · `timeout` · `misconfigured` · `unknown`
88
89## Badges
90
91```
92/badge # overall infra status
93/badge/overall # same as above
94/badge/service/:id # single service
95/badge/machine/:name # machine status
96```
97
98**Query params:**
99
100| Param | Description | Example |
101| -------- | ----------------------------------- | ---------------------- |
102| `style` | `flat` (default) or `for-the-badge` | `?style=for-the-badge` |
103| `colorA` | Label background (hex) | `?colorA=363a4f` |
104| `colorB` | Value background (hex) | `?colorB=b7bdf8` |
105| `label` | Override label text | `?label=my+service` |
106
107## Setup
108
109```bash
110bun install
111wrangler d1 create status-db
112wrangler kv namespace create KV
113# update wrangler.toml with the IDs
114bun run db:migrate:local
115wrangler secret put TAILSCALE_API_KEY
116bun run dev
117```
118
119## Deploy
120
121```bash
122bun run deploy
123bun run db:migrate
124```
125
126<p align="center">
127 <img src="https://raw.githubusercontent.com/taciturnaxolotl/carriage/main/.github/images/line-break.svg" />
128</p>
129
130<p align="center">
131 <i><code>© 2026-present <a href="https://dunkirk.sh">Kieran Klukas</a></code></i>
132</p>
133
134<p align="center">
135 <a href="https://tangled.org/dunkirk.sh/status/blob/main/LICENSE.md"><img src="https://img.shields.io/static/v1.svg?style=for-the-badge&label=License&message=O'Saasy&logoColor=d9e0ee&colorA=363a4f&colorB=b7bdf8"/></a>
136</p>