Orkestia
Blog
Lumen

Rules in the Cockpit app

Edit alert, ingest and fingerprint rules from Lumen mode — what each trigger and channel means, Prometheus import, and the try-it box for fingerprint patterns

The Admin section of Lumen mode edits the three rule types behind the Query API. The JSON the forms send is the one documented there; what each rule does to your data is in Use Lumen.

RuleWhat it doesWhen it takes effect
Alert rulesWatch errors or a metric and notify a channelOn data that arrives after saving
Ingest rulesDrop or sample entries before they are storedImmediately; dropped data is gone for good
Fingerprint rulesDecide which errors share a groupFor new entries only; existing groups are not regrouped
Organization admins and owners manage rules. The pages are listed for everyone; the API answers 403 to others and the page says "Only organization admins can manage … rules." A rule whose organization is empty applies to every organization: it shows an all organizations tag and is read-only here.

The forms check what they can before sending (lengths, ranges, patterns); the server stays the authority, and a field-level rejection is shown with the field's name.

Alert rules

A table of rules with an on/off switch, the rule in plain words, project, where it sends, severity and last update; filter by project and trigger. New rule opens the editor; Edit and Delete (with confirmation) are on each row.

Triggers

TriggerFires whenFields
A new error appears (new_group)The first time an error group is createdlevel filter, workflow-type filter
A resolved error comes back (regressed)A group you resolved occurs againsame
An error reaches N occurrences (threshold)One group has happened at least N timesmin occurrences, filters
A metric crosses a threshold (metric_threshold)A metric over a window is >, >=, < or <= a valuemetric, aggregation, operator, threshold, window, for, cooldown, group by, filters
A metric stops reporting (metric_absent)A metric sends nothing for the windowmetric, window, for, cooldown, group by, filters

Limits checked in the form, as the server enforces them: window up to 60 minutes (up to 24 hours for Pulse metrics), for up to 24 hours, cooldown up to 7 days, up to 10 filters of the form attrs.key:value or resource_attrs.key:value, and a group-by of project, service_name, attrs.<key> or resource_attrs.<key>. Aggregations are avg, sum, min, max, count, p50, p90, p95, p99.

Pulse numbers can be watched too: pulse.page_views, pulse.visits, pulse.visitors, pulse.events, or pulse.event:<name> for one event. Those take no aggregation or filters.

Channels and severity

ChannelNeedsNotes
Orkestia ticket (ticket)nothingEmits the lumen.alert.fired event that opens a ticket
Slack webhook (slack)Webhook URLFull http(s) URL
Webhook (webhook)Webhook URL; optional signing secretThe secret is sent only if you type one; an existing secret shows as set and is kept otherwise
Email (email)An address

Severity is Not set, Critical, High, Medium or Low. Set it before wiring alerts: every new group otherwise pages at the same level (triage loop).

Templates

The editor opens prefilled when a link carries a template:

TemplateRule
pulse-downmetric_absent on pulse.page_views, 120-minute window, 6-hour cooldown, severity high
pulse-goalmetric_threshold on pulse.event:<goal event>: sum below 1 over a day, severity medium. Opened by alert me on a Pulse goal (Pulse)

Import from Prometheus

Import from Prometheus takes a Prometheus rules file (paste the YAML; there is no file picker), sends it to POST /api/import/alert-rules and previews each rule as translated, approximated or skipped, with the original expression, the reason and notes. Choose where the alerts go (channel and its URL or address) and the project, then create. The result for each rule is shown.

Ingest rules

A rule matches entries by project (* for all), level and source, then either:

ActionEffect
DropThrow the entry away. The ingest call still answers 200 { "dropped": true }
SampleKeep a share between 0% and 100% and drop the rest

The editor shows the rule as a sentence that updates as you type, for example "Keep 25% of debug-level entries from source “health” in every project, drop the rest." Rows have an enable switch, edit and delete.

Ingest drops are permanent and apply before storage. Scope a new rule to one project first.

Fingerprint rules

A fingerprint rule overrides the default fingerprint algorithm: when its regular expression matches, the error is grouped under your fingerprint_key (sha256 of it) instead.

FieldMeaning
Project* or one project
PatternA regular expression
Match againstThe error message, the traceback, or either
Group keyThe name the matching errors share (required)
Title overrideOptional title for the group
PriorityWhole number; decides between rules that both match

The Try it box in the editor takes a sample message and traceback and says match, no match, or that the pattern is invalid, as you type.

Try it runs in your browser (JavaScript regular expressions). The server uses Python's re, which differs on rare syntax. If a pattern uses unusual syntax, confirm it on the server by watching the next matching error group.

Fingerprint rules reshape grouping going forward. Existing groups stay as they are.