Configuring metrics
Reference for every step of the metric builder, from aggregation and time windows to notification templates, access control, and the Metrics Manager.
Editor layout
The metric builder walks through steps in three groups. A SQL metric replaces the first group with Query and Metric value.
Metric name and status
Give your metric a clear, descriptive name. It appears in Slack alerts, the metrics list, and the notification template via {{ metric_name }}.
The status controls whether the metric is actively monitored. You can change it at any time:
| Status | Meaning |
|---|---|
| Draft | Default for new metrics. The metric is not monitored. Use this to configure before going live. |
| Live | Actively monitored on schedule. Alerts fire when thresholds are breached. |
| Paused | Monitoring suspended. Configuration is preserved. Resume when ready. |
| Invalid | The metric stopped, for example because of a configuration error or a data source that stopped working. Fix the cause, then use Save and Go Live to run it again. |
Metric types
| Type | Description |
|---|---|
| Business | Form-based. Pick an aggregation function and column; no SQL required. Supports all built-in time window, filter, and segment options. A Business metric can be converted to SQL. |
| SQL | Write your own SQL. Full flexibility for joins, ratios, and custom logic. You test the query and map result columns to roles. |
Both types support the same schedule, threshold, segment, and notification configuration. The only difference is how the metric value is computed.
Metric builder
Business metrics: aggregation
Pick the aggregation function and the column it operates on. The column picker shows only columns marked as metric columns on the dataset, except for COUNT (any column) and COUNT DISTINCT (any column).
| Function | What it computes |
|---|---|
| Count Rows | Number of rows matching the time window and filters |
| Count Distinct | Number of unique values of the selected column |
| Average | Average value of the selected column across matching rows |
| Sum | Sum of the selected column across matching rows |
| Min | Minimum value of the selected column |
| Max | Maximum value of the selected column |
| Median | Median value of the selected column |
| P90, P95 | 90th or 95th percentile of the selected column |
| Percentile | Any percentile from 1 to 99 |
Formula mode lets you combine multiple aggregations into a single expression, for example, SUM(revenue) / COUNT(orders) for average order value. Enable it in the aggregation section.
Time window
A time window controls which rows Lighthouse reads on each run. Configure three fields:
- Period column
- OptionsAny column marked as a datetime column on the dataset
- Examplecreated_at
- Relation
- OptionsWithin (includes window end), Within (excludes window end), Before, Yesterday, Today
- ExampleWithin
- Unit
- OptionsMinutes, Hours, Days, Weeks, Months, Years + a number
- ExampleLast 1 hour
Data lag
Data lag adds a deliberate delay before Lighthouse evaluates the metric. Use it when your pipeline has a known ingestion delay, for example, if events take 30 minutes to arrive in your warehouse after they occur.
When enabled, set the lag amount (unit: minutes or hours). On each run, Lighthouse shifts the time window back by the lag amount before querying, so you're always looking at a fully-arrived window.
Filters
Filters add WHERE conditions to the metric query. Only columns marked as filter columns on the dataset appear in the picker. Common patterns:
- -Restrict to a specific status:
status = 'completed' - -Limit to a region:
country IN ('US', 'GB', 'CA') - -Exclude test users:
is_internal != true
SQL metrics
- 1Write your SQL: The query must return at least one numeric column (the metric value). It can also return segment columns for breakdowns.
- 2Test the query: Click Test Query. Lighthouse runs the SQL against your warehouse and infers column names and types from the result.
- 3Map columns: Assign a role to each result column: metric value, segment dimension, or other. Mark one column as the primary metric value.
Schedule
The schedule controls how often Lighthouse checks the metric. Each check runs the calculation and evaluates the thresholds. The schedule does not change the calculation window. Pick how it repeats in the Repeat field.
Repeat options
| Repeat | Detail |
|---|---|
| Minutes | Runs every N minutes, optionally only within part of the hour. |
| Hourly | Runs every N hours at a chosen minute, optionally only between chosen hours. |
| Daily | Runs once a day at the chosen time in the metric's timezone. |
| Weekly | Runs on the chosen days of the week at the chosen time. |
| Monthly | Runs on a chosen day of the month at the chosen time. |
| Cron | A raw cron expression, for patterns the other options don't cover. Lighthouse describes it in words. |
Days of week
Below the schedule type, a seven-day toggle (Sun to Sat) restricts which calendar days the schedule runs. All seven days are selected by default. Deselect days to skip weekends, for example.
Days are evaluated in the metric's timezone (see below). A cron expression encodes days directly.
Timezone
Every metric has its own timezone. Schedule times and day-of-week evaluation use this timezone. It defaults to your organization's timezone but can be changed per metric. Timezone is required; the metric cannot go live without one.
Round to nearest hour
Available on Business metrics only (not SQL) and only when the schedule type is Hours or Daily (not Minutes). When enabled, Lighthouse rounds metric values to the nearest calendar hour before evaluating thresholds. Useful for hourly KPIs where partial-hour results would create noise.
Upcoming runs preview
The Schedule step previews the next scheduled runs in the metric's timezone. Use it to verify your schedule fires when you expect.
Details and access
Description
Optional free-text description of what the metric measures and why it matters. The description is included in default Slack notification templates via {{ metric_description }}. It's not shown as a column in the metrics list, but it appears under the name in the builder header and in summary tooltips.
AI context
An optional field used by Lighthouse AI assistants (the Metric Assistant and the metric suggestions agent) to generate more relevant suggestions and configuration. Provide any context about this metric that isn't obvious from its definition: what business question it answers, which team owns it, or what counts as a normal vs abnormal value.
Tags
Tags are plain text labels for organizing and filtering your metrics. You can assign up to 10 tags per metric. Create new tags inline or pick from existing org-wide tag suggestions.
| Where tags appear | Detail |
|---|---|
| Metrics list: Tags column | Shown as badges. The list can be filtered by one or more tags via the Tags filter. |
| Metrics list: filter | Multi-select filter: shows metrics that have any of the selected tags. |
| API | Included as kpis[] on metric create, update, and search requests. |
| Slack alerts | Tags are not available as notification template variables and are not included in default alert messages. |
Severity
Severity (S0 to S5, default S2) is set in the Thresholds step, either fixed or on a scale that follows how far the breach goes. It shows in alerts and in the Metrics Manager, and it can decide who gets mentioned. See Severity levels.
Access control
The Everyone or Restricted button in the builder header opens access settings, where you configure two independent dimensions: who can view the metric and who can edit it.
| Access level | Who has access |
|---|---|
| Everyone | All org members (default for new metrics) |
| Owner | Only the metric creator and the user assigned as metric owner. Org admins always have full access. |
| Selected people & groups | Specific users you add to the viewer or editor lists |
Set both Who can view and Who can edit independently. For example, you can make a metric visible to everyone but editable only by selected users.
Owner
A single user picked from your org. Defaults to whoever created the metric. The owner is shown in the Metrics Manager and can be filtered on. Only the owner or an org admin can change a metric's owner or access settings.
The owner is not added as a recipient automatically. Turn on Mention the owner in the Notifications step to mention them in each Slack alert. The owner is also told when the metric's alerts can't be delivered.
Creator
Read-only display in Access Control showing who created the metric. The creator is always locked into viewer and editor lists when access is set to Selected people & groups; they cannot be removed.
Notifications
The Notifications step decides who hears about an alert, what the message says, and how often it repeats. It has a tab for the chat app (Slack) and one for Email, each of which can be turned off, and a live preview of the message. Pause notifications stops sending without losing the setup.
Slack destination
Pick the connected Slack workspace, then a Channel, a Direct message to a person, or both. The bot must be invited to private channels. You can also create a new Slack channel straight from the channel picker. A warning appears if the selected channel or user no longer exists in Slack.
Add email recipients, and optionally change the subject (defaults to {{ metric_name }}) and the body. Each segment and its value are added under the body automatically.
Message template
The message template controls the body of the Slack message. It's per-metric (not org-wide) and uses Slack markdown. Insert variables from the variable picker.
The default template for a new metric:
:bell: *{{ metric_name }}* is triggered!
*Description*: {{ metric_description }}
*Severity*: {{ severity }}
*Segment*: {{ segment_name }}
*Value*: {{ current_value }}When the metric's only threshold compares against an earlier value, the default also adds a Compared value line, so the alert shows the baseline next to the current value.
Template variables
- {{ metric_name }}
- LabelMetric Name
- Segment-specific?No
- {{ metric_description }}
- LabelMetric Description
- Segment-specific?No
- {{ severity }}
- LabelSeverity
- Segment-specific?No
- {{ execution_time }}
- LabelExecution Time
- Segment-specific?No
- {{ current_value }}
- LabelCurrent Value
- Segment-specific?Yes: changes per segment
- {{ segment_name }}
- LabelSegment Name
- Segment-specific?Yes: the segment combination that fired
Additional variables are generated dynamically:
- -SQL metrics: one variable per mapped result column, named after the column.
- -Calculated columns: one variable per calculated column, named after the column.
- -Threshold filters: named threshold conditions generate variables like
{{ filter name }},{{ filter name }} - Compared Value,{{ filter name }} - Threshold Value, and (for standard deviation){{ filter name }} - Standard Deviation.
One message or one per segment
When the metric has segments, Send message on chooses between Each segment (one message per breaching segment) and All segments (one message per check that lists every breaching segment, most severe first, using the per-segment template). For metrics with many segments, one message reduces noise significantly.
Default per-segment template (rendered once per breaching segment inside the combined message):
*Segment*: {{ segment_name }}
*Value*: {{ current_value }}Frequency, recovery, mentions, and context
| Setting | What it does |
|---|---|
| Frequency | Once per trigger (default), or Every check while it matches. |
| Reply in the alert's thread | Repeats and higher-severity alerts reply in the thread of the first alert message instead of posting new messages. |
| On recovery | Do nothing, update the alert message to say it recovered, or also reply in the thread (and optionally the channel). |
| Mention the owner | Mentions the metric's owner at the start of each channel alert. |
| Mention ... when severity is ... or higher | Mentions up to 3 people or groups when an alert reaches the chosen severity. |
| Show alert context | Adds plain-words lines under each segment: the rule that matched, how long it has been alerting, the previous value, and when it last alerted. |
| What to do | A short runbook note shown under every alert, in Slack and by email. |
Single-segment Slack alerts also attach a chart of the segment's last 30 days. When an alert opens (on the first match, or after repeated matches) is set in the Thresholds step. Full detail on each setting is in Thresholds & alerts.
Test notification
Send test notification sends a test message using the current form values. Test messages are labeled in Slack so they're distinguishable from real alerts.
Actions
The Actions step runs follow-up actions in your connected tools when the metric alerts, such as calling an HTTP endpoint to open a ticket or page on-call. Add the endpoint under Destinations first. Actions run whether or not notifications are on, and each action sets its own frequency.
Going live
A new metric can be saved as a draft at any time. Save and Go Live becomes available once every step is filled in: what to measure, at least one threshold, and a schedule at or above your plan's minimum interval.
Notifications are not required. A live metric with notifications off still runs and tracks its alerts; it just sends nothing until you add a destination.
Metrics Manager
Metrics Manager in the sidebar lists all metrics your account has access to, in Live, Paused, and Draft tabs. Health chips call out metrics that need attention (for example failing, retrying, stopped, or behind schedule), and the list shows which metrics are alerting now. Schedules, including cron, are described in words.
Filters
| Filter | Matches on |
|---|---|
| Search | Metric name or numeric ID |
| Status, Type | Metric status and Business or SQL |
| Severity | S0-S5 (multi-select) |
| Tags | Metrics that have any of the selected tags |
| Owner | Metrics owned by any of the selected users |
| Data source, Dataset | Which connection and dataset the metric is built on |
| App, Channel, App user | Where the metric sends its alerts |
Table columns
| Column | Content |
|---|---|
| Type | Business or SQL icon |
| Status | Draft / Live / Paused / Invalid |
| ID | Sequential numeric identifier |
| Name | Metric name (link to the metric) |
| Severity | S0-S5 badge |
| Tags | Tag badges |
| Schedule | Schedule in words |
| Last Run | Execution status and timestamp of most recent run |
| AI Suggestions | Suggestion run status and quick actions |
| Metric Summary | The plain-language metric definition |
| Owner | User avatar |
| Next Run | Scheduled time of next execution |
| Last Alert | When the metric last fired an alert |
Overview page
Overview is the home page. It shows what needs attention now: a Needs attention queue, failed metrics grouped by shared cause, open alerts grouped by metric as New, Ongoing, or Stale, plus system health and recent activity.