Status Page in Go https://status.exozy.me
Find a file
2024-09-27 01:54:32 +00:00
core ++ 2024-09-27 01:54:32 +00:00
proto chdir before execute 2024-09-27 01:50:57 +00:00
public HTTP basic auth, make website more configurable 2024-05-24 03:23:27 +00:00
scanner Cleanup 2024-09-25 20:30:37 +00:00
templates no historical data shenanigans 2024-09-25 18:44:58 +00:00
.gitignore Clean up config loading code 2023-10-01 08:21:30 +00:00
go.mod clean up 2024-07-07 03:31:34 +00:00
go.sum clean up 2024-07-07 03:31:34 +00:00
LICENSE Add AGPL license 2024-05-24 03:24:26 +00:00
main.go Cleanup 2024-09-25 20:30:37 +00:00
readme.md add todo 2024-07-07 04:07:12 +00:00
update-dinit-config add update script 2024-06-24 00:43:47 +00:00
util.go fix: update to compile 2024-09-21 01:47:32 +00:00

status

A status page written in Go. Join our Matrix room for development discussion.

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 at proto/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
    • 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)
    • show historical data
  • 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
    • clean up old checkpoints
  • Matrix notification
  • serves plain text to curl

Tests

  • HTML page works

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. @bot:exozy.me
  • MAUTRIX_ACCESS_TOKEN: Matrix access token
  • MAUTRIX_ROOM_ID: Matrix room ID, optional, e.g. #notifications:exozy.me