Which of your alerts are worth their page?
Lapilli judges every firing against what actually went wrong: a white stone when the alert caught an incident, a black stone when nothing was wrong. Count a rule's stones and you know whether it earns its place; an incident with no stone is one your alerts missed.
go install lapilli.dev/cmd/lapilli@latest
lapilli demo
lapilli demo judges a made-up week of a small
shop's alerts, with nothing to connect. Or a binary, the
image or the Helm chart.
- Reads Prometheus and what speaks its API, Grafana, Loki, a cloud's own alarms
- Runs once with
lapilli verdict, every hour withlapilli serve - Keeps one SQLite file, or a Postgres database several replicas share
- Changes only what a person approves, and reads by default
It works from what you already have: the rules, the history in Prometheus, and whatever record of incidents you keep, even a thin one. It reads by default, and changes only what a person approves.
It is early, with one maintainer and room for more. Checked against one production Grafana: all 71 of its alert rules replay, and a four-week replay of the rules as they stood then found 177 firings of the noisiest rule, the number of notifications its team had counted by hand.
The alert fired. Then what?
An alert says something crossed a line. It doesn’t say whether paging someone was right. Three questions are left:
Was anything wrong?
A page at three in the morning, and nothing to fix. Once, or is that what this rule does? Lapilli counts each rule's firings: those that caught an incident, and those that caught nothing.
Did anything catch it?
A customer found the incident before any alert did. Lapilli shows the incidents no rule caught, and the rules that nearly did: the condition held, but not for long enough, or stopped just under the threshold.
What will this change do?
A longer for, a new threshold, a rule retired: merged on a guess, and judged at the next incident. Lapilli replays the change over the weeks behind you, before it is merged.
Once: lapilli verdict
Replay a week, a month, or a change you are about to merge, and get the
stones, the firings that woke people for nothing, the noisy rules with a longer
for that would quiet them, the incidents nothing caught, and the rules that
nearly caught them.
$ lapilli verdict --rules alert-rules.yaml --prometheus http://prometheus:9090 \
--incidents incidents.yaml --impact 'sum(rate(http_5xx[5m])) / sum(rate(http_total[5m])) > 0.01'
Lapilli 2026-10-26 00:00 → 2026-11-02 00:00 Asia/Seoul (+09:00)
148 firings, 3 incidents written down, 1 more found by --impact
RULE SEVERITY FIRED ○ CAUGHT ● NOTHING PRECISION REFIRED
ExportJob5xx critical 118 0 118 0% 41
CheckoutLatencyP99 warning 14 2 12 14% 3
ReadReplicaLag warning 9 1 8 11% 0
NodeNotReady critical 4 0 4 0% 0
DBPrimaryCPU critical 3 2 1 67% 0
Noisy rules that a longer "for" would quiet, still catching every incident they caught:
RULE FOR FIRED INCIDENTS CAUGHT LATER BY
ExportJob5xx 5m → 15m 118 → 31 0 –
CheckoutLatencyP99 5m → 10m 14 → 6 1 up to 4m
Out of hours, in Asia/Seoul (at work mon-fri 08:00-18:00, asleep 22:00-08:00):
of the firings that caught nothing, 57 came while people slept, and 37 more off hours.
RULE SEVERITY ● ASLEEP ● OFF HOURS ● AT WORK
ExportJob5xx critical 52 31 35
NodeNotReady critical 3 0 1
ReadReplicaLag warning 2 1 5
CheckoutLatencyP99 warning 0 4 8
DBPrimaryCPU critical 0 1 0
What each rule adds: the incidents it caught, those it caught before any other rule, those no other rule caught:
RULE INCIDENTS FIRST ALONE
CheckoutLatencyP99 1 0 0
DBPrimaryCPU 1 1 1
ReadReplicaLag 1 1 1
A noisy rule's catch doesn't count beside one by a rule that isn't noisy.
38 rules never fired: CertificateExpiring, DiskWillFillIn4h, EtcdNoLeader, KafkaUnderReplicated, NodeClockSkew, PodCrashLooping, PVCAlmostFull, RedisDown, TargetDown, WatchdogMissing and 28 more, all in --json.
INCIDENT START LASTED CAUGHT BY
INC-41 Checkout errors 2026-10-28 12:01 38m DBPrimaryCPU +2m, CheckoutLatencyP99 +6m (noisy)
INC-42 Search timeouts 2026-10-30 09:15 1h12m ReadReplicaLag -3m
INC-43 Batch stuck 2026-10-31 02:40 – ✗ nothing fired
impact-1 user impact (--impact) 2026-11-01 21:27 24m ✗ nothing fired
✗ 2 of 4 incidents had no alert.
! --impact-for 5m counts impact that lasted 5m as an incident, but 9 of the 43 rules judged fire only once
their condition held longer: their "for" and one evaluation, with no "for" an evaluation (6m for 6
of them). Impact shorter than that they can't be sure to catch. --impact-for 6m counts only what they can.
Rules that nearly caught them: their condition held, but not for their "for", or fired too late; or their value came within a fifth of their threshold.
INCIDENT RULE HELD CHANGE WOULD FIRE FIRED ● NOTHING
INC-43 BatchQueueDepth 20m from -5m for 30m → 19m +14m 0 → 3 0 → 2
impact-1 CheckoutLatency reached 0.86 > 0.9 → 0.85 +6m 0 → 2 0 → 1
--compare replays the rules in place beside those proposed, over the same
period, and shows each rule’s stones and each incident’s catches before →
after; without incidents, how often each fires. --expect holds the rules
that change to what is expected of them: how often each may fire in a week,
and while people slept, and the incidents it must keep catching. Run it in CI on a pull
request that touches the rules: a script for GitHub, GitLab, Bitbucket, Azure
DevOps and Gitea, and an action for GitHub Actions, comment the report on
the pull request as Markdown, and keep that one comment up to date. The
report also comes as JSON and as Prometheus metrics, and goes to Slack and a
Pushgateway.
--check-replay sets a replay beside what really fired, rule by rule, as
Prometheus, Grafana’s own alert state history or a cloud’s alarms kept it,
so you can check the replay on your own rules before you believe a verdict.
--check-content checks what each alert says when it fires, and --redact
gives every name an alias, for a report shown outside.
Every hour: lapilli serve
lapilli serve keeps a ledger: every firing, incident and version of the
rules, replayed hourly with the rules as they stood. It shows the stones in
a web UI where teams act on them. Before it is deployed, lapilli preflight
takes its flags and says what it will meet: the rules it can replay, the
history and the sign-in to it, the ledger, and the requests and memory its
runs will take. It reads, and writes nothing.
Find the rules that cost the most
The rules list, filtered to the noisy ones: each with its stones, the for that would quiet it, and the firings that came while people slept.
Read one rule, week by week
A rule's page: its precision and firings beside the weeks before, its last 84 days a cell a day, each version of it, and what to do first. A change is proposed with its backtest, and a person approves it.
A dashboard
Last week's precision, firings, incidents missed, noisy rules and the firings that woke people for nothing beside the week before; twelve weeks by week; where the noise is, rule by week; what to look at first.
Every change replayed
A new version of the rules is replayed over the week before it, so you see what the change would have done.
Incidents written down
Write an incident, or say a black stone was real, and the whole ledger is judged again at once, without asking Prometheus.
Quiet windows
A deploy, maintenance, a nightly batch: firings in a window that caught nothing are excused, once or every day or week.
Marked windows
A sale, a launch, a campaign: named from a file, the UI or a PromQL expression. Nothing is excused; every count is read inside them and outside, and precision during each beside the four weeks before.
Goals
What a team holds its alerting to: a bound on precision, incidents missed, critical firings or re-fires, week by week or for each sale. A goal missed is told, and becomes a task with a press.
Signals of user impact
Name the signals that say users are hurt, an error ratio, a latency, and the windows where one holds are incidents too, each week's firings judged by the signals tied to them.
Teams, tasks, comments
Teams own rules and incidents; a suggestion becomes a task with a press, with an assignee, a due date and a link to your tracker.
Incidents from where they are kept
Scripts copy them from PagerDuty, incident.io, Jira and GitHub issues, to a port that takes incidents with a token and does nothing else. Written again unchanged, nothing happens.
A cloud's alarms, kept
A script reads CloudWatch, Azure Monitor, Cloud Monitoring or OCI alarm history and copies it in, with a token of its own, so the ledger keeps more than the cloud does; with no rules of its own, lapilli serve runs on that alone. Read through the cloud's API too, an alarm and its history are one rule.
Pages, not only firings
Notifications as Alertmanager, Grafana, SNS, Azure Monitor and Cloud Monitoring sent them, on a port of their own: each rule's pages, repeats and pages while people slept, beside its firings.
Notices and digests
What happens goes to a webhook as JSON, and to Slack, through an outbox written with the change. So does each week's digest, and each team can have its own.
Declared in Git
Teams, quiet and marked windows, goals, reports and roles in one file, kept to as it changes, without a restart; what it declares is read-only in the UI.
Roles
Viewers, editors and admins, signed in by Lapilli with any OpenID Connect provider, or by the sign-in in front of it: a cloud's identity-aware proxy, a load balancer's, oauth2-proxy.
Outcomes
Each change to the rules, its prediction beside what came of it; whether incidents still reach it; whether it is used. From the ledger, sent nowhere.
Changes, approved
A longer for, a nearer threshold, a spare rule retired, a runbook link a person wrote: each proposed with its backtest, approved by a person on its page, checked again, and opened as a pull request on GitHub, GitLab, Bitbucket, Gitea or Azure DevOps by a script that holds the repository's credentials, or applied through Grafana's API, a Mimir, Cortex, Amazon or Azure ruler's, or a cloud's own alarms' (CloudWatch, Azure Monitor, Cloud Monitoring, OCI), where it is let change. Off until turned on; a stop switch and limits; nothing turned off while it fires.
Agents, over MCP
An agent asks what the pages show, replays a change it proposes to the rules before anyone makes it, and, when allowed, keeps it as a proposal for a person to approve. It never approves or applies one.
English, Spanish, Japanese and Korean
One file of translations per language; a test fails if a text has none.
The ledger is one SQLite file, or a Postgres database that several
replicas share, one of them leading. The tests hold an hourly run over
twelve weeks of 200,000 firings to two seconds, and each page to a few
statements a rule, never one a firing. /metrics gives the stones to Prometheus, and the Helm chart a Grafana
dashboard of them. The UI runs no scripts.
How it judges
- Firings come from replaying your alert rules against history. The
rules can be Prometheus rule files,
PrometheusRule, Grafana alerting provisioning, a cloud’s managed rule groups, its alarms written in PromQL (CloudWatch PromQL alarms, Google Cloud alerting policies), or ConfigMaps holding them, each version while it was in effect, and a Loki ruler’s rules in LogQL. They can also be the rules a Prometheus or a Grafana has loaded. Firings can also come from theALERTSseries, or from a file or a job copying them in, such as a cloud’s alarm history. Grafana rules are evaluated the way Grafana does. - Incidents come from a YAML file, from the UI and the API, from
PagerDuty, incident.io, Jira or GitHub issues by a script, and from
windows where a signal of user impact holds (
--impact). A thin incident log still works. - A firing catches an incident when it starts shortly before or during it and agrees on the labels you name. One already firing before caught nothing: it was on anyway.
- No record, no verdict. A firing that caught nothing is judged only when something was written down around it: an incident in the two weeks before it, or a signal of impact read over its time. Else it is counted, not judged, and the report says so.
The rest, the noisy rules, what to change and the near misses, is in How it judges.
Works where your alerts are
Any Prometheus-compatible API works: Prometheus, Thanos, Mimir,
VictoriaMetrics, the managed Prometheus of AWS, Azure or Google Cloud, or
CloudWatch’s PromQL API, with the credentials the machine or pod already has.
Rules on logs are replayed against Loki
(Rules on logs).
Oracle Cloud has no managed Prometheus; on OKE, use the one you run there.
Alarms in a cloud’s own terms (CloudWatch, Azure Monitor, Cloud Monitoring,
OCI Monitoring) are judged from their history, with a small script for each
cloud, and lapilli serve keeps that history past what the cloud keeps.
Integrations are generic: a webhook, not a particular tracker.
Start from what you have
Nothing has to be moved or rewritten first. Each of these is a script in the repository’s recipes, or a few flags.
Rules in a repository
A pull request that changes alert rules gets its backtest as a comment, and a status that can stop the merge. For GitHub, GitLab, Bitbucket, Azure DevOps and Gitea.
Incidents in a tool
PagerDuty, incident.io, FireHydrant, Rootly, Grafana IRM, Compass, Jira or GitHub issues: a script copies them in, with the alerts the tool linked to each.
A cloud's alarm history
CloudWatch, Azure Monitor, Cloud Monitoring and OCI alarms, Datadog's monitors and New Relic's alert conditions, judged from what they fired.
The rules as they were
Earlier versions of the rules from git, Argo CD or Flux, so each week is replayed with the rules it had.
Changes as pull requests
An approved change is opened as a pull request where the rule is kept.
Tasks in your tracker
Jira, Linear, GitHub, GitLab, Azure Boards, Shortcut and YouTrack, kept in step with Lapilli's tasks.
Built to be trusted
- It changes only what a person approves. Out of the box it reads. Turned on, it makes the changes to rules it proposes, each once a person has approved it in the UI: as a pull request to where the rule is kept, or through Grafana’s, a ruler’s or a cloud’s API with what it replaces kept for undo. It never silences an alert, never turns one off while it fires, and an agent can only propose.
- Secrets stay put. Tokens and webhook URLs are read from files and never shown, and nothing is sent anywhere it wasn’t told to go.
- Checked releases. A release is checked with govulncheck before it is
published, and the latest again every day. Releases can’t be changed once
published (from v0.14.0), and carry build provenance:
gh attestation verifyworks on each binary, the chart and the image, and, from the Sigstore bundles each release has kept since v0.28.0, on the binaries and the chart offline (Checking a release). - Out in the open. Reports go through private GitHub security advisories, and the code is scanned by CodeQL and OpenSSF Scorecard.
- For everyone on call.
lapilli serve’s pages aim at WCAG 2.2 AA, on a screen reader, the keyboard alone, at 200% zoom and on a phone, and CI holds their structure and contrast in every language: a target, not a claim they conform (Accessibility).
Help build it
Lapilli has one maintainer and is looking for more, from more than one organisation. The open questions are good ones. How faithfully can a replay reproduce what fired? What makes a fair verdict from a thin incident log? Several areas need what the current maintainer doesn’t have: an AWS or Azure account with a managed Prometheus, Loki alerts in real use, an incident tool.
- Roadmap: what it doesn’t do yet, area by area, with where each lives in the code
- Good first issues: small changes, each saying where it goes and when it’s done; and help wanted, for what needs an account or a tool
- Maintainers: how contributing in an area leads to maintaining it
- Governance: the principles, and how decisions are made
- Contributing: build, test, send a change
- Discussions: questions, ideas, and what Lapilli found in your alerts
The most useful report there is: a rule that replays differently from how it really fired.
Install
Go
go install lapilli.dev/cmd/lapilli@latest
lapilli demo
A binary
For Linux and macOS, on amd64 or arm64, from the releases:
os=$(uname -s | tr '[:upper:]' '[:lower:]'); arch=$(uname -m | sed 's/x86_64/amd64/; s/aarch64/arm64/')
curl -fsSL https://github.com/lapilli-project/lapilli/releases/download/v0.73.0/lapilli-v0.73.0-$os-$arch.tar.gz | tar -xz
./lapilli-v0.73.0-$os-$arch/lapilli demo
The image
docker run --rm ghcr.io/lapilli-project/lapilli:v0.73.0 demo
The Helm chart
Once a week as a CronJob, or with mode=serve every hour:
helm install lapilli oci://ghcr.io/lapilli-project/charts/lapilli -n monitoring \
--set mode=serve --set prometheus.url=http://prometheus:9090 \
--set 'rules.configMaps={alert-rules}' --set 'match={service}'
Each release is checked before it is published and can’t be changed after; Checking a release verifies what you downloaded. Getting started goes from here to a first report on your own alerts.
The name
mos erat antiquus niveis atrisque lapillis,
his damnare reos, illis absolvere culpaIt was the old custom to judge with white and black pebbles: the black to condemn the accused, the white to acquit them.
— Ovid, Metamorphoses XV.41–42
Lapilli are small stones. Each firing is a vote; once a week the urn is emptied and the stones are counted.