Skip to main content
Monitors retrieves data through the Tencent Cloud Log Service (CLS) search and analysis APIs and triggers alerts based on query results. Each query locates logs by “region + log topic”; the query mode supports raw log search (raw) and SQL analysis (analysis).

Core Concepts

Query Parameters

The region dropdown offers a list of commonly used regions (e.g., ap-guangzhou, ap-shanghai, ap-beijing); it is a suggestion, not a whitelist. You can also type any region code matching [a-z0-9-]; Tencent Cloud decides whether it works.

Query Modes

Raw Log Search (raw)

Searches logs with CQL or Lucene syntax and returns matching log lines. Each returned line can produce one alert.
  • The time window is capped at 6 hours.
  • tencent_cls.limit controls the maximum number of log lines returned by a single query. New rules return only the latest line in the time window by default; you can set 1-100. Leaving it empty means this rule has never had the setting, so Edge falls back to its old default of 100 lines.
  • The query editor disables keyword autocompletion: raw mode is CQL/Lucene, and SQL keyword suggestions would only mislead.

SQL Analysis (analysis)

Aggregates logs with SQL and returns aggregated rows, suitable for threshold and data-exists evaluation.
  • The time window is capped at 24 hours.
  • tencent_cls.limit is not allowed; including it is rejected by the backend.

Time Range

The default query window is the last 15 minutes (tencent_cls.timespan.value=15, tencent_cls.timespan.unit=m). The time window limit depends on the query mode: up to 6 hours for raw log search and 24 hours for SQL analysis. Exceeding the limit is reported by the form immediately (“The time window cannot exceed N hours”) rather than at save time.

Data Source and Topic Requirements

Single Data Source Binding

Tencent CLS rules can bind exactly one data source and do not support name patterns. When creating a rule, the data source picker is single-select and the name-pattern input is hidden. An invalid configuration is rejected on save with “This data source type can bind only one data source” or “This data source type does not support name patterns. Clear them and pick one data source.”

Topic Index Requirement

A log topic must have indexing enabled for search and SQL analysis to return results. Topics without indexing are tagged “Index not enabled” in the topic list; after you select such a topic, the editor warns: “This topic has no index configured, so neither search nor SQL analysis will return results. Configure an index in the Tencent Cloud console first.” Queries against such topics keep returning empty results.

Topic ID Execution

The topic picker supports searching by name or pasting a topic ID directly. Only the topic ID is saved into the rule and used at execution time; the logset filter is display-only and never saved. When editing an existing rule whose topic has been deleted, the UI reports “Topic does not exist or has been deleted” and you need to pick a topic again.

No Data Detection

Tencent CLS does not support per-series no-data detection:
  • Only “Alert when all queries return no data” is supported.
  • The “Alert if previously found data is now missing; recover when data is found again” option is not available — the backend rejects it, so the card does not appear in the UI.
  • Alert ending modes are limited to “End automatically when data reappears” and “Manual close only”; “End when data reappears or the timeout expires” is not offered.
  • Recovery queries: With “Recover when the expression matches” in threshold mode or “Recover when the recovery query returns data” in data-exists mode, the recovery query needs the same region, topic, and query-mode parameters, and is evaluated like the main query.
  • Related queries: Related queries support the same Tencent CLS parameters and can attach related information to alerts.