Skip to content

Monitoring ​

The panel answers three paths outside /api for monitoring. None of them reveal accounts or servers beyond counts.

PathAnswersUse
/healthz200 ok while the process serves requestsLiveness: restart the panel when this fails
/readyz200 ok when the database also answers, 503 otherwiseReadiness: send traffic only when this passes
/metricsPrometheus metrics, with a tokenDashboards and alerts

panel healthcheck asks /readyz on GAMEPANEL_ADDR and exits 0 when it is ready. The Docker image uses it as its HEALTHCHECK, and Docker Compose starts Caddy only once the panel is healthy.

Metrics ​

Set a long random token, and restart the panel:

ini
GAMEPANEL_METRICS_TOKEN=<openssl rand -hex 32>

Without it, /metrics answers 404. Scrape it with the token as a bearer token:

yaml
scrape_configs:
  - job_name: gamepanel
    scheme: https
    authorization:
      credentials: <the token>
    static_configs:
      - targets: [panel.example.com]
MetricType
gamepanel_build_info{version}gaugeAlways 1; the label is the panel's version
gamepanel_start_time_secondsgaugeWhen the panel started
gamepanel_database_upgauge1 when the counts below could be read
gamepanel_nodes, gamepanel_nodes_connectedgaugeNodes, and how many daemons are connected
gamepanel_servers, gamepanel_servers_suspendedgaugeGame servers
gamepanel_usersgaugeAccounts
gamepanel_webhook_deliveries{status}gaugepending (waiting for a try or retry) and failed
gamepanel_http_request_duration_seconds{area,method,code}histogramRequests by area (api, daemon, web, ops), method and status class (2xx...). Time is until the response starts, so long downloads and websockets do not skew it
go_goroutines, go_memstats_heap_alloc_bytes, go_memstats_sys_bytesgaugeThe process

Alerts worth having:

yaml
- alert: GamePanelNodeOffline
  expr: gamepanel_nodes_connected < gamepanel_nodes
  for: 5m
- alert: GamePanelWebhooksFailing
  expr: increase(gamepanel_webhook_deliveries{status="failed"}[1h]) > 0
- alert: GamePanelSlowAPI
  expr: histogram_quantile(0.95, sum by (le) (rate(gamepanel_http_request_duration_seconds_bucket{area="api"}[5m]))) > 1
  for: 10m

The Nodes page shows each node's daemon version and warns when it differs from the panel's: upgrade the panel and every node together.

Released under the AGPL-3.0 license.