Documentation contents

Monitoring and logs

Run gadka healthcheck to see whether the server is ready. The server and proxy services write errors to the system journal.

Service status and server readiness

systemctl status gadka gadka-proxy
gadka healthcheck && echo OK

The gadka healthcheck command queries http://127.0.0.1:9090/readyz and exits with code 0 when the server is ready. Use --url to specify a different address.

Health and metrics endpoints

The server exposes these endpoints on the telemetry port. The default address is 127.0.0.1:9090, set by telemetry.listen.

PathWhat it tells you
/healthzWhether the process is running
/readyzWhether the server is ready to accept traffic
/metricsServer metrics in Prometheus format
curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:9090/readyz

A response code of 200 means the server is ready.

Selected metrics

MetricWhat it measures
gadka_gwp_connectionsOpen app connections
gadka_gwp_transport_connectionsConnections by transport (QUIC or WebSocket)
gadka_gwp_slow_consumers_totalConnections closed because the client could not receive data fast enough
gadka_http_request_duration_secondsTime spent handling HTTP requests
gadka_link_safety_updated_timestamp_secondsTime of the last CERT Polska Warning List refresh
gadka_link_blocked_totalBlocked links
gadka_workflow_webhook_rejected_totalRejected workflow webhook calls

To trigger an alert when the server has gone more than a day without refreshing the CERT list, use time() - gadka_link_safety_updated_timestamp_seconds > 86400.

Server logs

The services write to the system journal.

journalctl -u gadka -n 100
journalctl -u gadka -f
journalctl -u gadka-proxy -n 100

Server logs use JSON. To change the log level and format, edit /etc/gadka/gadka.yaml.

log: { level: debug, format: text }

After editing the file, run sudo systemctl restart gadka. Switch back to info when you finish troubleshooting.

Errors and warnings in the journal

EntryWhat it means
Error immediately after startupCheck the configuration. The server cannot start with an invalid file.
read secret: …A secret file is missing or has incorrect permissions.
link safety: list update failedThe server could not download the Warning List.
link_blockedA link was blocked. Only its hostname is logged.
LICENSE_SERVER_ID_CHANGEDThe Server ID changed.

Request tracing

The server sends OpenTelemetry traces when you set the collector endpoint.

telemetry:
  otlp:
    endpoint: http://otel.example.com:4318

Server diagnostics