Status Page in Go
https://status.exozy.me
|
||
---|---|---|
core | ||
proto | ||
public | ||
scanner | ||
templates | ||
.gitignore | ||
dinit-service | ||
go.mod | ||
go.sum | ||
main.go | ||
readme.md | ||
util.go |
TODO
Tech stack
- HTTP Server -
net/http
- listen on unix socket PORT (if set)
- Templating - {{mustache}}
- spawn with dinit/systemd
- Config file - load TOML config (1.
/opt/status-config/config.toml
2. test config atproto/config.toml
)- .socket_path (UNIX socket, string)
- .service (array of services)
- .matrix (Matrix-related settings, see below)
- Auto deploy script (run as dinit service)
Check online methods
- TCP Connect
- HTTP 2xx
- ICMP
Services
- HTML page
- [-] Page Styling (need to wait for all features)
- show service type (tcp/http)
- Increase constrast. Current RED/GREEN is contrast fail. Maybe don't show the border when service is up?
- Bundle directory contents into executable in release mode. (not necessary)
- Status history, database
note for integration: the dumb database code is in
core/database.go
. When integrating, you don't need to touch that code much.- store events
- self boot up/shutdown
- check service status every 5 minutes since boot
- persist data on disk; use a better database?
- store events
- [-] Matrix notification (not integrated)
Environment Variables
When config file is down, those variables will be made non-optional and load from config instead of envvar.
MAUTRIX_USER_ID
: Matrix user ID, optional, e.g.@exozymebot76397:matrix.org
gMAUTRIX_ACCESS_TOKEN
: Matrix access tokenMAUTRIX_ROOM_ID
: Matrix room ID, optional, e.g.#room-name:matrix.org