Status Page in Go https://status.exozy.me
Find a file
2023-10-01 08:21:30 +00:00
core Clean up config loading code 2023-10-01 08:21:30 +00:00
proto Clean up config loading code 2023-10-01 08:21:30 +00:00
public Tweak styles for better legibility 2023-10-01 04:34:02 +03:00
scanner Clean up config loading code 2023-10-01 08:21:30 +00:00
templates Tweak styles for better legibility 2023-10-01 04:34:02 +03:00
.gitignore Clean up config loading code 2023-10-01 08:21:30 +00:00
dinit-service Simplify dinit script 2023-10-01 01:23:19 +00:00
go.mod Fix indirect dependency warning 2023-10-01 10:08:32 +07:00
go.sum Configuration file with TOML 2023-10-01 10:07:29 +07:00
main.go Clean up config loading code 2023-10-01 08:21:30 +00:00
readme.md Clean up config loading code 2023-10-01 08:21:30 +00:00

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 (the current one is flaky. probably can be a cron job)

Check online methods

  • TCP Connect
  • HTTP 2xx

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)
  • [-] Matrix notification (not integrated)
  • Status history (database)
    • check service status every 5 minutes
    • store events
      • self boot up/shutdown
      • service status after booting up
      • everytime service status change (include all status data (e.g. failure reason) in the calculation)

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
  • MAUTRIX_ACCESS_TOKEN: Matrix access token
  • MAUTRIX_ROOM_ID: Matrix room ID, optional, e.g. #room-name:matrix.org