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.
| Page | Path | What it shows | Actions |
|---|---|---|---|
| Workspace | / | Name, Cardinal version and commit, whether the web server, Postgres and S3 answer | Start, Stop |
| Sites | /sites | Per site: host, status, claimed or not, apps with versions, schema size, users, newest Error Log | New site, Migrate |
| Site logs | /sites/:host/logs | The newest 100 Error, Scheduled Job and Webhook Request Logs, each linking to the desk form | |
| Apps | /apps | The apps cardinal app list reports, their git pins, the sites that have them, whether the build is older than the checkout | Get app, Install on a site, Build |
| Nodes | /nodes | One card per node | |
| Metrics | /metrics | Node totals, the database and the host, with sparklines | |
| Watch | /watch | Node cards, database wait events and the host on one screen, with alert lines | |
| Seed | /seed | See Seed and load | |
| Load | /load | See 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 report | State |
|---|---|
| Up to 30 s | Live |
| Over 30 s | Stale, with its age |
| Over 5 minutes | Folded under Gone |
Metrics
| Group | Figures |
|---|---|
| Nodes | Totals of the live nodes |
| Database | Transactions per second, cache hit ratio, deadlocks, temp bytes, backends by state, waiting backends by wait event and query, lock waits, the NOTIFY queue |
| Statements | The top 20 statements when pg_stat_statements is installed, else how to install it |
| Host | Load, 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.