Skip to main content
To experience Monitors features, there are three core steps:
1

Install monitedge

Deploy the alert engine to your private network
2

Create Data Source

Configure the data sources to monitor
3

Create Alert Rules

Define alert conditions and notification methods

Install monitedge

monitedge needs to be deployed in your private network. It is responsible for syncing alert rules from SaaS, periodically querying data sources, performing threshold evaluation, generating alert events, and pushing them to the SaaS. Menu Entry: Data ingestion → Edge engines → Engine Installation/Upgrade Supports Linux, Docker, and Kubernetes installation methods.
Engine Cluster Name is very important: monitedge instances with the same name form a cluster, sharing the alert rules between them to avoid single points of failure. See Alert engine management.
  • Single cluster: Keep the default default
  • Multiple clusters (for example, one in US-East datacenter, one in South China datacenter): Specify different names for each cluster
Alert engine installation

Alert engine status

After monitedge is installed, it automatically connects to the SaaS and periodically syncs alert rules. You can view current status information on the Alert Engine Status page. Engine instances without heartbeat for a long time will display a delete button, which you can click to remove and avoid engine disconnection alerts.

Engine disconnection alert

Configure an engine disconnection alert to be notified promptly when the alert engine goes down. See Engine disconnection alert.

Create data source

Menu Entry: Data ingestion → Data Sources → New Create data source

Create alert rules

Menu Entry: Rules → Alert Rules There may be many alert rules. Monitors provides a tree-structured grouping for categorized management. Each alert rule must belong to a group. You can create groups first, then create alert rules under the groups. The create / edit alert rule page is one form with six sections, from top to bottom: Basic Configuration, Data Sources and Queries, Alert Conditions, Detection Frequency & Effective Time, Event Configuration, and Investigation entries.

Basic configuration

Basic configuration

Additional label syntax

An additional label value takes one of three forms, depending on its content: Go templates can use these variables:
  • Templates support only if / else plus index, len, printf, print, replace, urlquery, and the comparison and logical functions. range, with, and define aren’t supported.
  • A missing key reads as an empty string in $labels and $annotations, and as 0 in $values. A label that renders to an empty string isn’t sent.
  • A single value can’t mix ${...} and {{...}}.
  • A label that fails to render isn’t sent, and the alert event is still delivered. The error goes to the __alert_rule_label_template_error label, which you can see in the alert details.
  • Leading and trailing whitespace in label names is trimmed on save, and the trimmed names must be unique. Label names can’t start with __alert_rule_. All additional labels together are limited to 1,024 characters as JSON, and job and instance values to 255 characters.
  • A rendered template value has two more limits, and exceeding either counts as a render failure (the label isn’t sent and the reason goes to __alert_rule_label_template_error): one label may render to at most 8 KiB, and a rendered job or instance may be at most 255 characters. The rendered value only exists at runtime, so neither case is rejected at save time.
  • When the alert engine renders descriptions, custom fields, and titles, template labels in $appendLabels are still the raw template text. To use query results there, reference $annotations directly.

Data sources and queries

Section 2 has two parts: Data Sources decides which data sources the rule applies to, and Query Statements decides what to query and how.

Data sources

Data source selection First choose a data source type. Only types that already have data sources are listed. If you have none yet, click Go to Data Source Management (it opens in a new tab, so your form is kept) to create one. Then choose which data sources the rule applies to — one rule can cover many:
  • Wildcard by name: matches by name and defaults to * (every data source of the type) for a new rule. * matches any string (for example, db-*), ? matches one character, [0-9] or [a-z] match a range, and [!0-9] matches characters outside it. Renaming a data source affects matching.
  • Exact match by ID: pick specific data sources from the list; unaffected by renames.
Use at least one method, or both; the rule applies to the union of their matches. Tencent CLS is the exception: it binds exactly one data source by exact match.
If you need stable rule bindings that are unaffected by data source renames, prefer exact match. See Data Source Management for details.
To save a rule you need query permission on every data source it references, including those matched by a wildcard at save time (the owner account and Admins excepted). A wildcard rule can therefore fail to save because it matches a data source you cannot query. Disabling a rule is exempt. See Data Source Management for data source authorization.

Query statements

Query statements Configure the query type and statements. Click Usage guide for help writing them. For how value fields, label fields, and additional information are mapped from tabular query results, see Query result field mapping.

AI query assistant

Once a data source type is selected, click Write with AI at the top right of a query input. The Query Assistant uses the rule’s data source, query type, thresholds and other queries to generate or rewrite the statement.
  • The statement and related parameters (such as the SLS project / logstore or Tencent CLS region / topic) are filled into the form. Click Apply on a result card to fill it in again.
  • The assistant is available for main queries, recovery queries, related queries, the query preview, and PromQL in the entity tree.
  • Applying does not save the rule; check that the statement matches the thresholds before saving.

Alert conditions

Alert Conditions offers three check modes, one per tab; enable each with the switch on the card title inside the tab. Enabled tabs show a check mark. Each tab has an Alert fired card and an Alert recovered card (Missing data combines them into one Trigger & recovery conditions card). Key fields:

Trigger mode: consecutive vs cumulative

  • Under Cumulative, the match count cannot exceed the check count, and neither can exceed 10000
Cumulative matching requires alert engine v0.69.0 or later. Older engines evaluate it as consecutive matching, so alerts may be delayed or missed.

Alert recovery

The available recovery modes depend on the check mode: With Recovery when no thresholds are triggered or Recovery only when conditions are met, threshold evaluation also offers Also count a check as normal when the alert object returns no data. Use it when alert objects disappear, for example when a Pod is deleted or a grouped query returns no row while things are healthy:
  • An alert object is identified by the full values of its label fields. A check counts as normal only when every query referenced by the alert conditions succeeds and none of them returns the object; if only some queries return it, the count neither grows nor resets
  • These checks share the consecutive count in Recovery condition with checks where the thresholds clear; the count resets when the object returns and triggers a threshold again
  • Failed or timed-out queries, and results over the row limit, never count as normal
  • When an alert recovers because its object disappeared, the recovery event carries the label __alert_rule_recovery_reason=data_absent, and its values are the ones from the last alert
  • New rules have it checked by default. Existing rules keep their behavior until you check it on the edit page; after that, alerts that could not recover before recover in later checks
  • To alert on the disappearance itself, also enable the Missing data check; the two work independently
This option requires alert engine v0.77.0 or later. For an enabled rule with this option checked, saving or enabling it is rejected if any cluster the rule matches has an older engine or no registered engine; upgrade the engine or uncheck the option to save.

Detection frequency and effective time

Detection frequency & effective time
Timezone rules:
  • Rule Timezone only accepts IANA timezone names. Shortcuts and offsets such as Local, UTC+8, CST, or GMT+8 are rejected.
  • cron expressions must not start with CRON_TZ= or TZ=. Some open-source cron systems embed the timezone in the cron string, for example CRON_TZ=Asia/Shanghai 0 0 * * *. If you migrate from one, remove the prefix and set the timezone in Rule Timezone instead.
cron expression format rules:
  • cron expressions must be 6-field second-level expressions, in the order seconds, minutes, hours, day of month, month, day of week. 5-field forms (for example */5 * * * *) are rejected; add the seconds field (for example 0 */5 * * * *).
  • The @every shorthand is supported, for example @every 30s for a check every 30 seconds. The duration must be a whole number of seconds of at least 1 second. Combined durations such as @every 1m30s are accepted, while @every 0s, @every 1500ms, or any sub-second or non-whole-second value is rejected.
  • When editing an older rule, a detection frequency that does not follow these rules must be fixed before saving.
The repeat notification maximum count and interval, and the match and recovery counts of every check mode, must all be at least 1; otherwise the rule does not run.

Event configuration

Event configuration runs from the channel through the notes description and repeat notification settings to two flat subsections, custom fields and related queries.
The maximum notification count does not represent the number of message reminders end users receive. Because alert events generated by Monitors are delivered to On-call, they may be grouped and noise-reduced; the final send count depends on On-call configuration.

Investigation entries

Section 6 configures investigation entries: it wires each alert straight to a dashboard view or to an initial query that is already written, so a responder can see the chart or query the data in one jump. You can add up to 20 entries and drag them into any order (order only affects display). The eye icon on an entry opens a preview: entries without template variables are previewed from the current form and the current time, and entries with template variables from the snapshot of one of the rule’s real alerts. Entries take effect when you save the rule and are rendered into a snapshot delivered with the alert event, so editing the rule does not change alerts already produced.
Saving investigation entries requires every alert engine instance in the cluster to be v0.75.3 or later; otherwise the save is rejected.
For the field reference, template variables, validation limits and snapshot semantics, see Investigation entries.

View results

After configuration is complete, if alert conditions trigger, the Active alerts column of the rule’s row shows how many active alerts the rule currently has. Alert rules list page
The search box in the alert rules list supports filtering by rule name, rule ID, or labels for quick navigation. You can also use the URL parameter ?rule_id=<ID> to jump directly to a specific rule.
Two columns describe where a rule stands: the Status column is the rule’s runtime status (its health; the values are in Rule runtime details below), and clicking the status label opens the runtime details drawer. The Active alerts column is how many active alerts the rule currently has, shown in red when the count is above 0. Click the number in the Active alerts column to switch to the Active alerts tab, filtered by that rule. It lists the active alerts that the rule currently produces. Historical alert events can be viewed in On-call. See Active alerts for details.

Rule runtime details

Every row in the alert rules list provides runtime introspection. Click Runtime Details in the row action menu (⋮ at the end of the row; the menu items are Runtime details, Clone, Move, Version history, and Delete) to open the rule runtime details drawer. Use it to judge the rule’s execution health and troubleshoot quickly. At the top of the drawer you can pick which data source to inspect (a rule may be bound to multiple data sources). The viewer’s query (readonly) permission on each data source filters this picker. Data sources without that permission are dropped silently, so a restricted viewer may see fewer data sources than the rule binds. Below are two tabs:

Current status

  • State badge: the rule’s current runtime status; see the table below for each value and what to do about it. The Status column in the list shows this badge
  • Latest execution: execution time, duration, outcome, query result count, last success, consecutive failures, runtime phase, and status update time
  • Alert instances: total active instances by check mode (threshold evaluation, data exists, and missing data), plus the kinds of events most recently produced (alert fired, repeat notification, alert recovered, alert closed)
  • Alert engine & config: the alert engine cluster, alert engine instance, version, online status, and last heartbeat of the alert engine responsible for this rule
When the state is Waiting for runtime status or Status is stale, the drawer explains why. For Outside effective time and Rule disabled, the drawer points out that you are looking at the last known result. For Configuration pending, it explains that the alert engine may still be running the old configuration. If the responsible alert engine is offline or an execution error occurred, a prominent banner shows the error type and error summary.

Execution history

Query the rule’s historical execution records by time range (last 15 minutes, 1 hour, 4 hours, or 1 day; up to 24 hours back). Each record carries an execution summary badge: Execution failed, Event produced, Alert recovered, or Periodic sample. Expanding a record shows the log ingestion time, alert engine instance and cluster, runtime phase, consecutive failures, active instance counts per check mode, events produced, and the error summary.
Execution history only records key execution summaries (errors, events, recoveries, and periodic samples) — not every evaluation is guaranteed to produce a record. When more than 200 records match, only the latest 200 are shown; narrow the time range to see more.

Batch operations

The alert rules list supports multi-select for batch operations, improving rule management efficiency.

Batch enable/disable/delete

After selecting multiple rules in the list, you can batch enable, batch disable, or batch delete them in one click.

Batch edit fields

After selecting multiple rules, click Batch Update to uniformly modify the following 10 fields: How to use: In the batch update panel, first select the field to modify, then set the new value, and click OK to apply the change to all selected rules. When batch updating Additional Labels and Custom Fields, a dedicated metadata editor provides two update modes:
Modifying additional labels may affect alert routing, grouping, or noise reduction. Proceed with caution.
If some rules fail to update, you see the number of failures and the first reason; the other rules are still updated.

Batch move

After selecting multiple rules, click Move above the list to move them to another folder. To move one rule, choose Move in the ⋮ menu at the end of its row. Both open the Move to another folder dialog: pick the target folder in the tree, or filter by name in Search folders first. Confirm stays disabled while the selected folder is the current one. After a successful move the list refreshes. See Folder management.

Import alert rules

Menu Entry: Alert Rules → Import Import works by file upload: upload one rule file at a time (.yaml, .yml, or .json, up to 1 MB). The system automatically detects the file format and shows pre-import check results. Four source formats are supported:

Import configuration

After uploading the file, you can configure:
  • Duplicate rule handling: Skip rules with the same name (default) or Create a copy. The first skips rules whose names exist in the target group; the second creates copies of them
  • Enable rules after import: only shown for the Flashduty Rules YAML source. When off, imported Flashduty rules stay disabled
  • Channel: the channel for alert event delivery

Pre-import check results

After parsing the file, the system shows a pre-import check table listing, rule by rule, the import name, status (Ready to import / Skipped / Invalid), and explanation. Select the rules to import (all importable rules are selected by default) and submit.
Nightingale rules are imported disabled and must be checked for data source matching and conversion warnings before you enable them manually. The conversion works as follows. Doris data sources map to MySQL. Only the highest-severity alert condition is kept. Level inhibition, query correlation, and notification target configs aren’t preserved. Recovery semantics are approximated with Flashduty rule capabilities. The Local timezone becomes Asia/Shanghai, and all-day effective time becomes 00:00-23:59. When the evaluation interval is missing, durations are converted at a 15-second interval.

Import results

After submission, the system reports the import result: counts of imported, skipped, and invalid rules. If nothing was imported, review the reasons in the dialog and select again.

Export alert rules

Select the rules to export in the list and click the Export button. The system displays the full configuration of the selected rules in YAML format (a Flashduty Rules YAML bundle). You can:
  • Download: Save the YAML as an alert-rules.yaml file
  • Copy: Copy the YAML content to the clipboard
The exported YAML can be used for backup or imported into other environments through file upload — see Import alert rules.

Rule version history

Click Version history in the ⋮ menu at the end of a row in the alert rules list to see how the rule has been modified (requires update permission on the rule).

View version history

The version history list shows:

Version comparison

Select two versions in the version history list and click the Compare button. The system displays the differences between the two versions in JSON diff format, helping you quickly understand which configuration items were modified.