Alerts and their runbook
monitoring/, §M14.18 O2
Ez az oldal a nucleus saját dokumentációjából készül, ezért angol nyelvű.
monitoring/prometheus/nucleus.rules.yml holds the recommended alert
rules, for a scrape job named nucleus; monitoring/grafana/nucleus.json
a dashboard of the same metrics (readiness, sessions, statements and
their p50/p99, transactions, rows, the page cache, the WAL, the data
file, logins, models, backups). monitoring/prometheus/nucleus.rules.test.yml
provokes each alert with series made for it in promtool test rules
(quiet before its time, firing after, and none on healthy numbers), and
monitoring/test.sh checks the rest against the real tools: every
nucleus_* metric the rules and the dashboard read is served, a
Prometheus scrapes a server with the rules loaded and sees its numbers
move, an OpenTelemetry Collector receives them over OTLP — CI’s job
monitoring. The disk rules read node_exporter’s file-system
metrics: nucleus does not measure the disk.
| alert | fires when | what to do |
|---|---|---|
NucleusDown (critical) |
a scrape fails for 1 min | Is the process running (nucleus status, the service’s log)? A crash leaves its message on stderr; restart — recovery replays the WAL. If it runs, check the --metrics listener and the network. |
NucleusNotReady |
nucleus_ready 0 for 5 min |
It is recovering (a long WAL replays after a crash) or failed to open: its log says which. A recovery ends by itself; a store that will not open is a case for nucleus restore. |
NucleusDiskSpaceLow (critical) |
under 10% free | Free space or grow the volume before writes fail; nucleus_data_file_free_bytes is space the file reuses before it grows; VACUUM frees versions no one reads, a shorter --history keeps fewer. |
NucleusDiskFillingUp |
full within a day at the 6-hour rate | As above, before it is urgent; find what writes (nc_catalog.statements by rows). |
NucleusWalNotCheckpointed |
over 4 GiB of WAL since a checkpoint for 15 min | Checkpoints normally run every 1 GiB: one failing (the log says why, often the disk) or a branch’s writes very fast. A long WAL makes a crash’s recovery long. |
NucleusLongTransaction |
one transaction over an hour | Find it (nc_catalog.sessions); an idle client holding BEGIN keeps every version since alive (vacuum waits) and its writes’ conflicts open. End the session if it is abandoned. |
NucleusConflictRateHigh |
over 5% of commits meet a serialization conflict (and > 0.1/s) | Clients must retry 40001; many conflicts mean hot rows written by many — narrow the transactions or the rows they write. |
NucleusCacheHitRatioLow (info) |
under 90% of page reads from the cache, at > 100 reads/s, for 30 min | The working set outgrew --cache: give it more memory, or find the scans (nc_catalog.statements by rows_read, nc_catalog.index_advice). |
NucleusLoginFailures |
over one refused login a second for 5 min | A misconfigured client or someone guessing passwords: the audit log (nc_catalog.audit) has who and from where; the throttle locks a role after repeated failures. |
NucleusRoleLocked |
a role was locked after failed logins | As above; the lock ends by itself (login_lock_time). |
NucleusStatementErrors |
over 5% of statements fail (and > 0.1/s) for 10 min | Read the errors’ codes in the clients’ logs; nc_catalog.statements counts errors per statement. |
NucleusSlowStatements |
p99 over a second for 15 min | nc_catalog.statements by mean_ms, then EXPLAIN ANALYZE and nc_catalog.index_advice. |
NucleusBackupOverdue (critical) |
a schedule’s last backup older than two intervals, for 10 min | The server’s log says why each backup failed (backup to … failed); NucleusBackupFailing usually fired first. Is the repository reachable and writable (disk full, credentials expired, a bucket’s policy)? A backup by hand (BACKUP TO) shows the error at once. |
NucleusBackupFailing |
the last backup failed, for 15 min | As above; the schedule tries again within five minutes. An encrypted repository needs the same key (a new one starts a new chain, never fails); 22023 from a key mismatch is a restore’s, not a backup’s. |
| NucleusRestoreTestFailing (critical) | the last restore test failed | The backups may not restore. The server’s log and the backup’s restore-test file name the problems: a part damaged (its SHA-256 differs: the storage under the repository), a manifest altered, rows or indexes inconsistent. Make a full backup at once (BACKUP FULL TO), run nucleus restore <repo> --test, and find what damaged the repository. |
| NucleusRestoreTestOverdue | no restore test held for two intervals, for 30 min | The tests fail (above) or do not run: the log says why (the repository unreachable, no room in --restore-test-dir for a copy of the database). |
Replication lag’s alert comes with §M17.5.