Runbooks
A short "what to check first" for each alert. It goes on the incident card and page, and the AI write-up uses it.
CertificateExpired
starter runbookBrowsers now refuse the site. Renew now (certbot renew), then reload the web server (nginx -s reload or systemctl reload apache2): a renewed certificate on disk is not served until it does.
CertificateExpiresSoon
starter runbookAutomatic renewal should have happened by now. Check the renewal ran (certbot certificates, its timer or cron), then that the web server reloaded: a renewed certificate on disk is not served until it does.
ClockNotSynced
starter runbookUsually one cause for all of them: the time server, or the firewall to it. On one server: timedatectl timesync-status (or chronyc sources). Wrong clocks break TLS, Kerberos and log timelines.
ConntrackTableFull
starter runbookThe kernel tracks every connection through the firewall, and its table is nearly full; once full, new connections are dropped (dmesg says "nf_conntrack: table full, dropping packet").
- Who holds the entries:
conntrack -L | awk '{print $5}' | sort | uniq -c | sort -rn | head(usually a flood of short connections, or a client that never closes them). - Raise the limit if the load is real:
sysctl -w net.netfilter.nf_conntrack_max=<n>(and in /etc/sysctl.d to keep it).
DatabaseConnectionsFull
starter runbookThe database has no free connection slots, so new connections are refused. Find who holds them before raising the limit.
- PostgreSQL:
SELECT usename, application_name, client_addr, state, count(*) FROM pg_stat_activity GROUP BY 1,2,3,4 ORDER BY 5 DESC; - A report job, a leak or idle sessions usually hold most: end them (
pg_terminate_backend) and fix the client, or put a pooler in front.
DiskCritical
starter runbookWrites are about to fail. Find what grew: du -xh --max-depth=2 <mountpoint> | sort -h | tail.
- Quick, safe wins:
journalctl --vacuum-size=500M, old rotated logs,apt clean,docker system prune(check first). - A deleted file still held open frees nothing:
lsof +L1, then restart that process.
DiskFullLogged
starter runbookA program could not write because a disk is full. df -h shows which; then see DiskCritical. This alert also covers servers without the agent.
DiskIOSaturated
starter runbookEverything on the server keeps waiting for the disk: its storage can't keep up.
- Which disk and how busy:
iostat -x 5; which process:iotop -o(orpidstat -d 5). - Usual causes: a backup, a big query or report, swapping (see SwapHigh), a failing disk, or a shared volume (SAN, cloud) out of throughput.
DiskWillFillIn24h
starter runbookIt will fill within a day at this rate. Find what is writing now: du -xh --max-depth=2 <mountpoint> | sort -h | tail, run again in 10 minutes and compare. Usually a runaway log, a backup landing in the wrong place, or a stuck job.
DiskWillFillIn4Days
starter runbookA slow, steady fill. Usually logs that are never rotated or old backups never pruned: check logrotate for the growing files, and the backup retention.
HostDiskLow
starter runbookFind what grew before deleting anything: du -xh --max-depth=2 <mountpoint> | sort -h | tail.
- Old logs and package caches are usually safe to remove; databases and backups are not.
- If it grows steadily, plan more disk rather than cleaning every week.
HostDown
starter runbookIs the server itself up? Try to reach it (ping, SSH, the hypervisor or cloud console).
- If it is up, the agent stopped:
systemctl status node_exporter, thensystemctl restart node_exporter. - If it is not, check the hypervisor or cloud console before rebooting, and read the cause on the card: if the trouble started on another server, the investigation follows it there.
HostFlaky
starter runbookThe server answers only some of the time. Look for packet loss on its network (mtr <server> from the hub), then for CPU or memory so tight that node_exporter can't answer in time.
HostRebooted
starter runbookThe server restarted. last -x reboot shutdown | head and journalctl --list-boots say when; journalctl -b -1 -n 50 shows how the previous boot ended.
- A clean shutdown first: planned, or automatic updates (
grep -i reboot /var/log/unattended-upgrades/*.log). - No shutdown lines: a crash, a kernel panic, a power or hypervisor event: check the host or the cloud console.
InodesLow
starter runbookSpace is free but new files will fail. Find the crowded directory: find <mountpoint> -xdev -type d -size +1M. Usually session, cache or mail-queue directories with millions of tiny files.
KernelErrors
starter runbookThe kernel logged something serious. journalctl -k --since -15min shows it.
- Out of memory or oom-killer: see OOMKill.
- I/O or filesystem errors: the disk or storage is failing; check
dmesgand the hypervisor or SAN before data is lost. - "blocked for more than": storage hung (often NFS or a busy SAN).
MemoryCritical
starter runbookUnder 5% memory free for 15 minutes: the kernel will start killing processes. Find the largest: ps -eo pid,rss,cmd --sort=-rss | head. A steady climb over days is a leak: restart that service and tell its owner.
NoRulesLoaded
starter runbookA rule file failed to load, so no alerts can fire. On the hub: whyfire logs prometheus, then fix the file it names.
OOMKill
starter runbookThe kernel killed a process for lack of memory. journalctl -k | grep -i "killed process" names it. Check the service came back (systemctl status), then why memory ran out (MemoryCritical, a leak, a big job).
PortNotAnswering
starter runbookThe server answers ping but this port refuses connections, so the service on it has stopped or is overloaded.
- On the server: is the service running, and is anything listening (
ss -ltnp | grep <port>)? - Check its own log for the reason it stopped before restarting it.
PostgresConnectionsNearLimit
starter runbookPostgreSQL is close to max_connections: soon new connections are refused. The investigation lists which application and user hold them, from PostgreSQL's own count.
- On the database:
SELECT usename, application_name, client_addr, state, count(*) FROM pg_stat_activity GROUP BY 1,2,3,4 ORDER BY 5 DESC; - One application holding most of them: a report job, a leak or a pool sized too big; fix that client before raising the limit.
PostgresIdleTransactionLong
starter runbookA session began a transaction and went quiet, holding its locks; other queries can queue behind it.
- Find it:
SELECT pid, usename, application_name, client_addr, now() - xact_start AS open_for, query FROM pg_stat_activity WHERE state LIKE 'idle in transaction%' ORDER BY xact_start; - Its program gone or stuck:
SELECT pg_terminate_backend(<pid>);. Then fix the client (a missing commit, an exception path that never rolls back).idle_in_transaction_session_timeoutends them automatically.
PostgresNotAnswering
starter runbookThe agent cannot query PostgreSQL through its local socket. systemctl status postgresql and journalctl -u postgresql -n 50 on the server: stopped, crashed, out of disk, or local logins refused after a pg_hba.conf change.
ProbesFailingEverywhere
starter runbookMost website checks failed at once, which is nearly always the hub's own network or DNS, not the sites.
- From the hub:
curl -sI https://<one of the sites>andgetent hosts <its name>. - Individual WebsiteDown alerts are held back while this fires.
RedisMemoryNearMax
starter runbookRedis is close to maxmemory. Depending on maxmemory-policy it then evicts keys (a cache: usually fine) or refuses writes (a queue or store: an outage). redis-cli INFO memory and redis-cli --bigkeys show what grew.
RedisNotAnswering
starter runbookRedis on this server is not answering, so the applications that use it are failing. systemctl status redis-server and journalctl -u redis-server -n 50: stopped, out of memory (OOM kill), or a config error after a restart.
RedisRejectingConnections
starter runbookRedis is at maxclients and refusing new connections. redis-cli CLIENT LIST grouped by addr shows who holds them: usually one client leaking connections. CONFIG GET maxclients shows the limit.
SSHLoginFromNewPlace
starter runbookA login from a user or address not seen on this server in the last week. Expected (new laptop, new colleague, a VPN change)? Nothing to do. Otherwise: last -i on the server, and who owns that address.
SSHPasswordLogin
starter runbookSomeone logged in with a password. Key-only SSH (PasswordAuthentication no in sshd_config) removes the password-guessing risk.
ServerClockNotSynced
starter runbookThe server has lost time sync, so its clock will drift (and with the Alloy agent its data is stamped with that clock). timedatectl timesync-status or chronyc sources: is chrony or systemd-timesyncd running, and can it reach its NTP server (UDP 123)?
ServerClockOff
starter runbookThe server's clock is off the hub's. With the Alloy agent its metrics and logs carry its own clock, so its changes look earlier or later than they were: discount its timing in investigations until it is fixed.
- On the server:
timedatectlandchronyc tracking(ortimedatectl timesync-status): is time sync on, and is it reaching its time server? - Every server off by the same amount: it is the hub's clock (
timedatectlon the hub).
ServerFlaky
starter runbookSome pings fail, others succeed: packet loss on the way (mtr <server>), or a server too busy to answer. Check the switch port or link if several servers share it.
ServerNotAnswering
starter runbookThis server has no agent, so ping is all Whyfire sees. Try it from another machine (ping, SSH, the console).
- If it answers there, a firewall between it and the hub may have changed.
- If not, check the hypervisor or the power before rebooting, and read the cause on the card: something upstream may have failed first.
ServerStoppedLogging
starter runbookThe server logged steadily, then stopped. Check rsyslog on it (systemctl status rsyslog) and its forwarding to the hub (port 514). If the server was retired: sudo whyfire remove-server <name>.
ServiceCrashLooping
starter runbookThe service crashes, systemd restarts it, it crashes again. journalctl -u <service> -n 50 shows the error: usually a bad config change, a missing file or a port already in use.
ServiceFailed
starter runbooksystemd gave up on the service: it exited with an error, or crashed until it hit its restart limit (for a job: the run failed). journalctl -u <service> -n 50 shows the error, often a bad deploy or config change. Fix it, then systemctl restart <service>; for a failed job, systemctl reset-failed <service> clears it until the next run.
ServiceRestartLoop
starter runbooksystemd keeps restarting this service. journalctl -u <unit> -n 50 shows why: usually a bad config change, a missing file or a port already in use.
ServiceStopped
starter runbookA service that was running has stopped. systemctl status <service> and journalctl -u <service> -n 50 say why. Was it stopped on purpose (maintenance)? Then silence it with a ticket; otherwise start it and find out why it stopped.
SwapHigh
starter runbookOver half the swap has been in use for an hour: the server is short of memory and slower than it should be. Find what grew: ps -eo pid,rss,cmd --sort=-rss | head.
TcpRetransmitsHigh
starter runbookThe server is re-sending a lot of its traffic: packets are being lost between it and the servers it talks to.
- One server alone: its network card, virtual NIC or host.
ip -s link(errors, drops) andethtool -S <nic>on it;tc qdisc showfor a leftover traffic-shaping rule. - Several at once: the network between them: a switch, a firewall or a VPN link that is overloaded or failing.
ss -tishows the retransmits per connection, and so who it is talking to.
TooManyOpenFiles
starter runbookA process has run out of file descriptors (files and connections), so it can no longer open either.
- How many it holds against its limit:
ls /proc/<pid>/fd | wc -landgrep "open files" /proc/<pid>/limits. - Climbing steadily: a leak (connections or files never closed): restart it to recover, then fix the code.
- Just busy: raise the limit (
LimitNOFILE=in its systemd unit, thensystemctl daemon-reloadand restart).
WebErrorRateHigh
starter runbookThe web server is answering requests with server errors (5xx): what is behind it is failing.
- Which status: 502 or 504 = the backend is down or too slow; 500 = the application itself failed (its log has the error).
- The web server's error log names the upstream (
journalctl -t nginxor /var/log/nginx/error.log); then that server's application log, and what it depends on (database, cache). - One backend of several: a single bad server behind the load balancer.
WebsiteDown
starter runbookOpen the page in a browser first: an error status, a certificate warning, or a timeout point different ways.
- Timeouts and 502/504: the server behind the site is slow or down; the cause on the card usually names it.
- A page behind a sign-in answers 401 or 403, and that is healthy: check it with
whyfire add-site <url> --login. - If many sites fail together, ProbesFailingEverywhere fires instead: check the hub's own network.
WebsiteFlaky
starter runbookUp, but failing some of the time. Read the cause on the card first: packet loss or a struggling server shows there.
- Behind a load balancer? One bad server among good ones gives exactly this pattern: check each one.
- Otherwise look for packet loss (
mtr <server>) and for CPU or memory pressure on the server behind it.
WebsiteSlow
starter runbookEvery check took over 5 seconds. Check the server behind it (CPU, memory, disk I/O) and its database; a slow query or a full connection pool is the usual cause.
WhyfireAiFailing
starter runbookCheck ANTHROPIC_API_KEY in /opt/whyfire/hub/.env (expired key, no credit) and sudo whyfire logs investigator. Cards still go out without the write-up.
WhyfireCardsFailing
starter runbookCheck NOTIFY_URL in /opt/whyfire/hub/.env still exists (Teams workflow or Slack webhook), then sudo whyfire logs investigator.
WhyfireComponentDown
starter runbookOn the hub: sudo whyfire status, then sudo whyfire logs <service> for the one that is down.