Core concepts
Query parameters
The region dropdown offers a list of commonly used regions (for example, ap-guangzhou, ap-shanghai, ap-beijing); it is a suggestion, not a whitelist. You can also type a region code that is not on the list. A region code must start with a lowercase letter and contain only lowercase letters, digits, and hyphens. It must include at least one hyphen and be at most 64 characters long, for example
ap-nanjing or na-siliconvalley.
Once a region code passes the shape check above, whether the region actually exists and whether your key has permission in it are still decided by Tencent Cloud.
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.limitcontrols the maximum number of log lines returned by a single query; you can set 1-100. New rules store1by default, and alert engine also uses 1 when the parameter is absent.- In raw mode the query editor does not offer keyword autocompletion.
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.limitis not allowed; including it is rejected.
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.Topic index requirement
A log topic must have indexing enabled, otherwise search and SQL analysis return no results. Topics without indexing are marked in the topic list; configure an index in the Tencent Cloud console first.Topic ID execution
You can search topics by name or paste a topic ID. Rules save and run against the topic ID only (the logset filter only helps you find topics and is not saved). If the topic has been deleted, pick a topic again when editing the rule.No data detection
Tencent CLS does not support per-series no-data detection:- Only “Alert when all queries return no data” is available; “Alert if previously found data is now missing” is not supported (not even through the API).
- Recovery is fixed to recovering automatically once any query returns data again; it cannot be configured, and manual-close-only is not available.
Recovery queries and related queries
- 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. Monitors evaluates it like the main query.
- Related queries: Related queries support the same Tencent CLS parameters and can attach related information to alerts.