cardinal

What it shows

Perch's pages for the workspace, sites, apps, nodes, metrics and the watch screen.

Every page has a CLI pane at the bottom. It lists each command Perch ran, its output and its exit code. Values of variables named *PASSWORD* are hidden there.

PagePathWhat it showsActions
Workspace/Name, Cardinal version and commit, whether the web server, Postgres and S3 answerStart, Stop
Sites/sitesPer site: host, status, claimed or not, apps with versions, schema size, users, newest Error LogNew site, Migrate
Site logs/sites/:host/logsThe newest 100 Error, Scheduled Job and Webhook Request Logs, each linking to the desk form
Apps/appsThe apps cardinal app list reports, their git pins, the sites that have them, whether the build is older than the checkoutGet app, Install on a site, Build
Nodes/nodesOne card per node
Metrics/metricsNode totals, the database and the host, with sparklines
Watch/watchNode cards, database wait events and the host on one screen, with alert lines
Seed/seedSee Seed and load
Load/loadSee Seed and load

Workspace actions

Start runs cardinal start. Stop sends it SIGTERM and waits 5 seconds.

Site actions

New site runs cardinal new-site with one --install-app per app you pick. The admin password goes in a temp file that is deleted after the run. Migrate runs cardinal migrate -t HOST.

Nodes

Each card shows a node's role, host, uptime, BEAM memory split, processes, run queue, scheduler use, pool busy over pool size, sockets, and Oban's executing and available jobs per queue. It has 10-minute sparklines of memory and run queue.

Age of the node's last reportState
Up to 30 sLive
Over 30 sStale, with its age
Over 5 minutesFolded under Gone

Metrics

GroupFigures
NodesTotals of the live nodes
DatabaseTransactions per second, cache hit ratio, deadlocks, temp bytes, backends by state, waiting backends by wait event and query, lock waits, the NOTIFY queue
StatementsThe top 20 statements when pg_stat_statements is installed, else how to install it
HostLoad, CPU, memory, disk free under the workspace, the cgroup memory limit

Perch samples every 5 seconds, and only while a page is open. With no browser tab open, it costs one idle BEAM.

Watch alerts

The watch page raises an alert line when:

  • a node is stale;
  • the pool is busy at pool size for 30 seconds;
  • there are over 10 lock waits for 30 seconds;
  • the NOTIFY queue is over half full;
  • host memory is over 90 %;
  • a site wrote an Error Log row in the last minute.

On this page