Skip to content

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.

What to measure?Data/Metric value/Segments
When to alert?Thresholds/Schedule
What happens?Notifications/Actions
NoteThe header above the steps holds the metric's status, name, tags, and description, plus an Everyone or Restricted button that opens owner and access settings. A summary of the whole metric sits beside the steps.

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:

StatusMeaning
DraftDefault for new metrics. The metric is not monitored. Use this to configure before going live.
LiveActively monitored on schedule. Alerts fire when thresholds are breached.
PausedMonitoring suspended. Configuration is preserved. Resume when ready.
InvalidThe 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

TypeDescription
BusinessForm-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.
SQLWrite 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).

FunctionWhat it computes
Count RowsNumber of rows matching the time window and filters
Count DistinctNumber of unique values of the selected column
AverageAverage value of the selected column across matching rows
SumSum of the selected column across matching rows
MinMinimum value of the selected column
MaxMaximum value of the selected column
MedianMedian value of the selected column
P90, P9590th or 95th percentile of the selected column
PercentileAny 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

  1. 1Write your SQL: The query must return at least one numeric column (the metric value). It can also return segment columns for breakdowns.
  2. 2Test the query: Click Test Query. Lighthouse runs the SQL against your warehouse and infers column names and types from the result.
  3. 3Map columns: Assign a role to each result column: metric value, segment dimension, or other. Mark one column as the primary metric value.
NoteSQL metrics give you full flexibility but Lighthouse cannot auto-detect time windows from free-form SQL. If you want segment-level alerts, return segment columns in the query and map them as segment dimensions.

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

RepeatDetail
MinutesRuns every N minutes, optionally only within part of the hour.
HourlyRuns every N hours at a chosen minute, optionally only between chosen hours.
DailyRuns once a day at the chosen time in the metric's timezone.
WeeklyRuns on the chosen days of the week at the chosen time.
MonthlyRuns on a chosen day of the month at the chosen time.
CronA 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.

ImportantThe minimum monitoring interval is enforced by your plan: 4 hours on Free, 1 hour on Starter and Pro, 5 minutes on Growth and Scale. If the schedule is faster than your plan allows, Lighthouse blocks activation and shows an error in the Schedule section.

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 appearDetail
Metrics list: Tags columnShown as badges. The list can be filtered by one or more tags via the Tags filter.
Metrics list: filterMulti-select filter: shows metrics that have any of the selected tags.
APIIncluded as kpis[] on metric create, update, and search requests.
Slack alertsTags are not available as notification template variables and are not included in default alert messages.
NoteTags are organizational labels only. They do not affect permissions, notification routing, scheduling, or alert behavior.

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 levelWho has access
EveryoneAll org members (default for new metrics)
OwnerOnly the metric creator and the user assigned as metric owner. Org admins always have full access.
Selected people & groupsSpecific 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.

NoteOrg admins always have full access to all metrics regardless of these settings. Access control only restricts non-admin members.

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.

Email

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

SettingWhat it does
FrequencyOnce per trigger (default), or Every check while it matches.
Reply in the alert's threadRepeats and higher-severity alerts reply in the thread of the first alert message instead of posting new messages.
On recoveryDo nothing, update the alert message to say it recovered, or also reply in the thread (and optionally the channel).
Mention the ownerMentions the metric's owner at the start of each channel alert.
Mention ... when severity is ... or higherMentions up to 3 people or groups when an alert reaches the chosen severity.
Show alert contextAdds 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 doA 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

FilterMatches on
SearchMetric name or numeric ID
Status, TypeMetric status and Business or SQL
SeverityS0-S5 (multi-select)
TagsMetrics that have any of the selected tags
OwnerMetrics owned by any of the selected users
Data source, DatasetWhich connection and dataset the metric is built on
App, Channel, App userWhere the metric sends its alerts
NoteFilters across different types are AND-ed; within the same filter (e.g. multiple tags), any match is sufficient. You can save a set of filters and come back to it.

Table columns

ColumnContent
TypeBusiness or SQL icon
StatusDraft / Live / Paused / Invalid
IDSequential numeric identifier
NameMetric name (link to the metric)
SeverityS0-S5 badge
TagsTag badges
ScheduleSchedule in words
Last RunExecution status and timestamp of most recent run
AI SuggestionsSuggestion run status and quick actions
Metric SummaryThe plain-language metric definition
OwnerUser avatar
Next RunScheduled time of next execution
Last AlertWhen 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.