Skip to main content
An alert rule can carry a set of investigation entries. Each entry is a pre-configured jump target: open a dashboard, or open an initial query — already written, and rendered with the alert’s labels — in the Query Workbench. A responder starting from one alert sees the chart or the data they need without writing a query. Entries are configured in the rule form’s sixth section, “Investigation entries” and are saved with the rule. They are rendered into a snapshot at the moment the alert event is produced and travel with the event; changing the rule afterwards does not affect alerts already accepted.
Saving investigation entries requires alert engine v0.75.3 or later. If any active instance in the cluster of a data source the rule matches is older, saving is rejected and the message names the cluster and instance to upgrade (the API error reads like investigation_targets require monit-edge v0.75.3 or later on every active instance serving the rule's datasources). Downgrading an instance after saving does not affect the saved rule.

How it works

A rule can hold many investigation entries. Each entry has three parts: the entry type (dashboard or query), the configuration for that type, and a time range relative to the alert event time.
  • An entry is a weak navigation reference. Saving the configuration and rendering the snapshot never run a query and never read the dashboard. Entries do not participate in alert evaluation, alert identity, instance identity or lifecycle, and they trigger no automatic investigation task.
  • An entry follows the event’s data source. A rule can match several data sources by type plus name pattern, but each alert event comes from exactly one of them. A query entry runs on the event’s own data source by default, so the jump lands on the data source that fired the alert rather than on a fixed or default one. You can also name a different data source explicitly (for example to drill into a log data source).
  • Rendering happens when the alert is ingested. When an alert is produced, the system renders the entries configured on the rule at that moment — using the event time, the event’s raw data labels and the event data source — into a snapshot, which is stored and delivered with the event. The investigation block in the active alert detail drawer, the Investigation block in an incident’s comprehensive info panel (see Incident details) and AI SRE all read that same snapshot.
  • The block has a different name on each side: it is called Investigation entries in Monitors and Investigation in incident details, but both render the same event snapshot.
  • Order affects display only. Entries can be dragged into any order, but the first one carries no default, primary or recommended meaning, and the order never reaches alert evaluation or lifecycle.

Entry types

Neither type supports runbooks, tickets or arbitrary URLs.

Adding and editing entries

Menu path: the alert rule form → section 6, “Investigation entries”.
  1. Click Add dashboard entry or Add query entry to open the entry dialog. The dialog title distinguishes new from existing entries (Add dashboard link / Edit dashboard link / Add query link / Edit query link).
  2. Fill in Purpose and Time range (shared by both types), then the fields for that type.
  3. Click OK to add the entry to the form. OK only adds it to the form; the entry takes effect when you save the rule.
  4. Each row offers three actions: Preview investigation entry (eye icon), Edit (pencil icon) and Delete (trash icon). When you view a saved rule’s details, the edit action becomes Details and the dialog footer offers only Close.
Added entries are listed with a drag handle on the left for reordering. The row title is the Purpose; when no purpose is set, a dashboard entry shows the dashboard title (or the dashboard ID when it cannot be read) and a query entry shows the query. The limit is 20 entries: once you reach 20 the two add buttons become disabled and show Up to 20 investigation entries (see Validation and limits).

Shared fields

Time range semantics:
  • The anchor is the alert event time: start = event time − before, end = event time + after.
  • The window is written into the snapshot exactly as configured, and it never drifts with the current time when you open it later. You can adjust the time range after opening the dashboard or the workbench, but adjustments made in the page are not written back to the rule or to snapshots already produced.
  • An end time in the future is allowed (that is what a non-zero “after” produces): the entry is available as soon as the alert fires, without waiting for later data.
  • The system does not infer, warn about or validate whether the entry’s window covers the alert’s evaluation window.

Dashboard entry fields

Open at failure handling: if the target object no longer exists in the dashboard (deleted or renamed), the field shows Missing object (<id>) together with the warning The selected object no longer exists in the dashboard. The dashboard will open on its default tab. — the jump opens the dashboard’s default tab instead of failing. When the dashboard itself cannot be loaded (deleted, or you have no access), the field area shows Failed to load the dashboard. It may have been deleted or you may not have access. and Open at is not selectable. Variable values rules:
  • A dashboard with no variables shows This dashboard has no variables.
  • Variable values are rendered as Go templates; see Template variables. Datasource variables are marked (datasource) and their placeholder is {{ $datasource.id }}; other variables are prompted with Leave empty to use the dashboard default, e.g. {{ $labels.<variable name> }}.
  • Empty means not configured, and the dashboard applies its own rule for the default. Configured but failing to render, or rendering to an empty string, leaves the variable unresolved (it does not fall back to the default) and shows an error on the entry.
  • A variable that is configured but no longer exists in the dashboard (or was renamed) is still listed and marked No longer in dashboard, so you can clean it up — otherwise it would affect the dashboard’s variable resolution invisibly.
  • Deleting, renaming or changing the type of a variable, or invalidating its candidates, never updates the rule.

Query entry fields

With the event data source selected, a rule type that the workbench does not support shows Choose a datasource type under "Datasource and query" first, or pick a datasource for this entry; an explicitly selected data source that was deleted or that you cannot use shows The selected datasource is unavailable. The data source’s real type, permissions and provider-specific restrictions are re-checked by the workbench as the current user when the entry is opened or run.

Template variables

The template context for investigation entries has exactly two variables:
  • Read a simple label directly: {{ $labels.service }}. For label names containing dots or other special characters, use {{ index $labels "service.name" }}.
  • Accessing a missing label or a key that $datasource does not have fails explicitly (including through index) instead of silently producing an empty string, which would turn into an unfiltered query.
  • The dot (.) only means a local data context such as range / with; it is not the full alert event. Variables available in the Description template such as $values, $value, $annotations and $appendLabels are not available here, and the root object cannot be used to bypass that restriction.
  • Conditionals, loops, local variables and built-in functions of Go templates are supported. The template is rendered once: a {{ }} produced by the rendering is not executed again.
Dashboard variable examples:
Query example (VictoriaLogs):
The query expression owns its quoting and escaping. A template only produces the value itself: the quotes in service:="{{ ... }}" are part of LogsQL syntax and must be written by the expression. When you need escaping, use a function with fixed semantics explicitly — replace (literal replacement), regexQuoteMeta (regex metacharacters), urlquery / html / js — because the system does not infer escaping from the data source dialect. If rendering fails, or the rendered result does not satisfy the query payload requirements, the entry keeps its initial template and the error, and no executable query is produced or run.

Previewing an entry

Click the eye icon on an entry to open the Preview investigation entry dialog. The dialog picks how to preview depending on whether the entry uses template variables. Entries without template variables: a static preview of the current configuration. When neither the dashboard variable values nor the query contain {{, the dialog renders the entry from the current form and the current time, including unsaved changes. The rule does not need to be saved or to have an active alert. The window is anchored on the moment you open the dialog: start = now - the “before” duration, end = now + the “after” duration.
  • If a query entry has no datasource set and the rule matches more than one, a Preview datasource picker appears at the top, listing the datasources the rule matches. Nothing is rendered until you pick one, and it says Select a datasource to preview this query.
  • If the rule currently matches no datasource, it says This rule has no matching datasource. Configure a rule datasource first. Configure the rule’s datasource under “Data source and query” first.
Entries with template variables: a preview from a real alert’s event snapshot. As soon as any dashboard variable value or the query contains {{, the dialog renders from an alert snapshot instead:
  • Prerequisites: the rule must be saved (otherwise it says Save the rule first, then preview once it has an alert.) and the rule must currently have an active alert (otherwise This rule has no active alerts. Preview will be available once an alert fires.). The dialog picks a sample from the rule’s active alerts, with paging above 20.
  • The preview uses the selected alert’s event snapshot and does not include unsaved changes in the form, so save the rule and wait for it to fire before previewing a new configuration.
In both modes, clicking an entry in the dialog opens the target in a new tab. In snapshot mode, if that alert has no snapshot matching this entry, it says This alert has no matching snapshot for this entry. Select an alert generated after the configuration took effect.; if the alert has no snapshot at all, it says This alert has no investigation links. Select an alert generated after the configuration took effect.

Validation and limits

Duplicate identity:
  • Dashboard entries: the same dashboard plus the same target object is a duplicate, regardless of variable values and time range. Duplicates cannot be used to express a variable fallback or multiple instances.
  • Query entries: de-duplicated by the normalized data source, query (mode, expression, arguments, minimum step) and time range; the event data source (no data source named) counts as its own distinct value. Several different queries may be configured on the same data source.
These checks run in two places: in the entry dialog (only the entry being edited, so it can be fixed item by item) and when the rule is saved (the whole set, with the error shown under the section).

Snapshot semantics and failures

Entries come from the event snapshot, not from the rule’s current configuration. They are rendered once when the alert is accepted, and afterwards:
  • If you change the entries on the rule, alerts already accepted (active alert details, the Investigation block on an incident) keep showing the old snapshot;
  • Repeat notifications and terminal events reuse the same snapshot, shifting each entry’s window by the difference in event time; the rule is not read again;
  • Deleting the rule does not remove historical snapshots — the incident side then shows The alert rule was deleted, so no investigation entries were generated.
Alerts accepted before the configuration took effect have no snapshot. An alert produced before you saved the entries shows This alert has no investigation links. Select an alert generated after the configuration took effect. in its details. Verify with alerts produced after the configuration took effect. When the whole event fails to render, no snapshot is produced, and the active alert and incident details show the reason: A single entry failing to render does not drop it. When a dashboard variable fails to render, that variable stays unresolved and shows Variable <name> failed to render: <reason>; when a query fails to render, the entry produces no executable query and is not run, and shows Query failed to render and was not run: <reason>. Such entries are still listed, carry a red Entry error label, and give no link. The remaining entries work normally. Permissions are re-checked at the destination. A snapshot’s visibility follows the alert event itself and is not filtered by dashboard folder or data source permissions when it is generated; opening the dashboard or the workbench re-authorizes as the current user, and a target that no longer exists or that you cannot access reports the destination’s own error rather than falling back to another resource. A snapshot delivered to On-call is limited to 8 KiB. When it is exceeded, the incident shows a notice instead of a truncated snapshot; the full snapshot remains available in the active alert details in Monitors.

Active alerts

The investigation block in the active alert detail drawer renders entries from the event snapshot.

Incident details · Investigation

How the Investigation block renders the snapshot in an incident’s comprehensive info panel.

Description template

Go Template variables for alert descriptions, whose context differs from investigation entries.

Monitors quickstart

An overview of the alert rule form’s six sections.