Monitoring
Health checks, error logs, jobs and the scheduler.
Health
GET /health answers 200 ok when Postgres answers, and 503 db otherwise. It needs no site host, so a load balancer can call it directly.
cardinal nodeslists every node that reported in the last day, with its role, memory and seconds since it last reported. A node silent for more than 30 seconds is stale, and the command exits with code 1.
Errors
An unexpected exception in a request or job writes an Error Log Record in the site. The 500 response carries a trace_id, which is also the x-request-id response header and the Error Log's trace_id. Search Error Log by it.
| Error Log field | Holds |
|---|---|
| Title | The exception type and message |
| Trace ID | The request id |
| Fingerprint | Equal for repeats of one error |
| Error | The stack trace, with arities in place of arguments |
| Metadata | The request or job, with passwords, tokens, keys and cookies replaced |
Background jobs
cardinal jobs list -t erp.localhost --state retryable
cardinal jobs retry -t erp.localhost 4821
cardinal jobs cancel -t erp.localhost 4821States are available, scheduled, executing, retryable, completed, cancelled and discarded. A job a killed node left running is picked up again after 35 minutes, or CARDINAL_JOB_RESCUE_AFTER seconds.
Scheduler
Scheduled jobs run from Scheduled Job Type Records, in the site's time zone.
| Command | Does |
|---|---|
cardinal scheduler status -t HOST | Says whether the scheduler runs, and why not |
cardinal scheduler disable -t HOST | Turns it off in System Settings |
cardinal scheduler pause -t HOST --ttl 2h | Runs nothing for 2 hours (30m by default) |
cardinal scheduler resume -t HOST | Ends a pause |
cardinal jobs trigger -t HOST JOB_TYPE | Runs one Scheduled Job Type now |
After downtime, each scheduled job catches up with one run. Missed runs are not backfilled.
Audit logs
| Log | Records |
|---|---|
| Activity Log | Login attempts and logouts |
| Access Log | PDF downloads and data exports |
| Version | Field changes on RecTypes that track changes |
| Email Queue | Every mail and its delivery status |
| Webhook Request Log | Each webhook attempt, kept 30 days |
Log Settings sets how many days each log RecType keeps its rows.