Supported data source types
Monitors supports the following 15 data source types:
Of these, the 5 diagnostic-only types — Redis Node, Redis Sentinel, MongoDB (mongod/mongos) and Kafka — cannot be used in alert rules or queried in the Query Workbench. They are only used by AI SRE to diagnose databases and middleware (see Query and AI analysis).
Data source list
The list shows only the data sources you are allowed to query, with these columns:- Name: data sources with team authorization show a green Managing team tag and grey Query-allowed team tags after the name. If a team has been deleted, the tag reads Deleted team and that authorization no longer applies; the creator or an admin can fix it.
- Type, Connection URL, Notes
- Associated Alert Engine: the engine cluster that runs queries, with its online status
- Enable datasource: turns the data source on or off — see Enable and alert evaluation
Data source permissions (team authorization)
By default every member can query and manage every data source. To restrict that, set these fields when creating or editing a data source:
Leave a field empty for no restriction. There are three valid combinations:
- If you set query-allowed teams, you must also set a managing team.
- Except for the owner account and Admins, you can only pick a managing team you belong to.
- Anyone who can manage can also query. Authorization is per team only; to authorize an individual, create a small team for them.
- Authorization changes are recorded in the audit log.
- Members without query permission do not see the data source in the list and cannot use it in the Query Workbench, dashboards or data source tools.
- Members with query permission only can view the configuration read-only, with credentials hidden.
- When saving an alert rule, you need query permission on every data source it references (including those matched by a name pattern at save time). Disabling a rule is exempt. Once saved, a rule keeps running regardless of later permission changes.
Create a data source
1
Select the data source type
Click New and choose the data source type (such as Prometheus or MySQL) at the top of the form.
2
Fill in basic information
3
Configure connection parameters
Fill in the connection parameters for the type — see Data source type configuration.
4
Save
Click OK. New data sources are enabled by default.
Two ways to bind data sources in alert rules
An alert rule binds data sources in at least one of these ways; you can use both, and the rule applies to the union of their matches.Enable and alert evaluation
A data source has two independent switches:- New data sources are enabled; types that support alerting are used for alerting by default, and diagnostic-only types cannot be.
- Disabling a data source requires manage permission on it.
- While enabled alert rules still reference a data source, you cannot turn off its “Use for alerting”; deal with those rules first.
Data source type configuration
Prometheus
When Basic Authentication is enabled, Username and Password accept
${env:NAME} references, resolved locally by each alert engine (see Reference credentials locally in the alert engine). The Server URL and Params do not support this syntax.
MySQL / Oracle / PostgreSQL
Relational databases share a similar configuration structure:
In addition to the basic connection settings above, Oracle supports multiple key-value Options. MySQL and PostgreSQL additionally support TLS/SSL encrypted connections, selected through the TLS/SSL mode dropdown.
In the table above, Username and Password accept
${env:NAME} references, resolved locally by each alert engine (see Reference credentials locally in the alert engine); the connection address does not support this syntax.
TLS/SSL modes for MySQL
With any mode other than “Disable TLS”, you can enable client certificate authentication (mTLS), set the server name, and configure the minimum / maximum TLS version. mTLS needs the client certificate and client key as a pair. With “Verify certificate and hostname”, use the database DNS name that matches the server certificate as the connection address instead of an IP address.
TLS/SSL modes for PostgreSQL
In “Verify certificate authority” and “Verify certificate and hostname” modes, a custom CA certificate is optional. Leave it empty to use the alert engine host’s system trust store. Client certificate authentication (mTLS) can be enabled in any mode other than “Disable TLS”. With “Verify certificate and hostname”, use the database DNS name that matches the server certificate as the connection address instead of an IP address.
Elasticsearch
Elasticsearch supports Cloud and Self-Managed deployments. Cloud is selected by default.
In Cloud mode, Cloud ID and API Key accept
${env:NAME} references; in Self-Managed mode, Username / Password and Service Token do. Each alert engine resolves the reference locally (see Reference credentials locally in the alert engine).
Loki / VictoriaLogs
Loki and VictoriaLogs use the same HTTP connection structure as Prometheus. It includes the server URL, Headers, Params, Basic Authentication, and TLS settings such as a custom CA, mTLS, server name, TLS versions, and skipping certificate verification.
These addresses are input examples; the form does not save them as defaults automatically.
When Basic Authentication is enabled, Username and Password likewise accept
${env:NAME} references (see Reference credentials locally in the alert engine); the server URL and Params do not support this syntax.
ClickHouse
After you enable TLS, you can configure a custom CA, mTLS, server name, minimum / maximum TLS versions, and skipping server certificate verification. Disabling TLS clears these TLS fields from the form.
Username / Password accept
${env:NAME} references, resolved locally by each alert engine (see Reference credentials locally in the alert engine); the connection address does not support this syntax.
Aliyun SLS
The SLS form does not provide separate TLS settings. AccessKey ID and AccessKey Secret support the alert engine environment variable references described below.
Tencent CLS
The Tencent CLS (Tencent Cloud Log Service) data source lets alert rules query log topics in Tencent Cloud CLS. The form has four parts: access point, authentication, cluster capability gate, and connection test.Access point
An existing data source might use neither of the two endpoints, for example another region’s endpoint or a custom domain set through the API. When you edit it, the form shows Unsupported access point. Reselect the public or internal endpoint before saving.
Authentication
Both fields accept two forms:
- Literal: Enter the credential value directly.
- Environment variable reference: Enter
${env:VAR_NAME}; each alert engine resolves it locally and the resolved value is never uploaded to Flashduty. Variable names may contain only uppercase letters, digits, and underscores, for example,${env:TENCENT_CLS_SECRET_KEY}. A value that starts with${env:but is not a complete reference is rejected by the form immediately.
••••••••••••). Click the Change icon to switch to an input, and leave it blank to keep the current key. Keys saved as ${env:} references are not secrets and are shown as-is.
Cluster capability gate
Tencent Cloud CLS requires all alert engine instances in the alert engine cluster to run a minimum version. The form checks the selected Associated Alert Engine cluster in real time and warns when any instance is below the requirement:- Some instances in the cluster are outdated: upgrade all instances in the cluster to the suggested minimum version or later.
- The alert engine is too old: it does not support Tencent Cloud CLS yet; upgrade it.
- No registered alert engine was found: install an alert engine first.
Connection test
After saving the data source, you can use Connection Test to verify the connection:- Save the data source before testing the connection.
- Pick a region to test against. The data source itself does not store a region, so you pick one at test time.
- Click Test. The test runs on one alert engine instance only, so it does not mean the whole cluster was verified.
- On failure, the Tencent Cloud error code and RequestId are shown for troubleshooting.
Region selection
Rule queries and the connection test share one region picker. It lists these common regions: Guangzhou (ap-guangzhou), Shanghai (ap-shanghai), Beijing (ap-beijing), Nanjing (ap-nanjing), Chengdu (ap-chengdu), Chongqing (ap-chongqing), Hong Kong (ap-hongkong), Singapore (ap-singapore), Bangkok (ap-bangkok), Jakarta (ap-jakarta), Seoul (ap-seoul), Tokyo (ap-tokyo), Silicon Valley (na-siliconvalley), Ashburn (na-ashburn), Frankfurt (eu-frankfurt), Sao Paulo (sa-saopaulo), and Riyadh (me-saudi-arabia). You can also type a region code that is not in the list (such asap-xxx).
Rule binding constraint
Alert rules of the Tencent CLS type can bind exactly one data source and do not support name patterns. See Tencent CLS alert rules.Redis node / Redis Sentinel
redis_node (standalone Redis) and redis_sentinel (Redis Sentinel cluster) are diagnostic-only types and cannot evaluate alerts. The connection address is a single host:port (for example, localhost:6379, localhost:26379); IPv6 addresses must be bracketed (for example, [::1]:6379). URIs, userinfo, and query parameters are not accepted, and ${env:} references are not supported in the address. Addresses are limited to 4096 characters after normalization.
MongoDB (mongod / mongos)
mongodb_mongod (standalone MongoDB) and mongodb_mongos (MongoDB sharded cluster router) are diagnostic-only types and cannot evaluate alerts. The connection address is a single host:port (for example, localhost:27017); the same rules as Redis apply.
MongoDB does not support client certificate authentication (mTLS).
Kafka
kafka is a diagnostic-only type and cannot evaluate alerts. The connection address holds 1–32 unique comma-separated host:port bootstrap addresses (for example, broker1:9092,broker2:9092). The other address rules are the same as Redis.
Credential save semantics
As with Tencent CLS, passwords (and the Kafka client private key) for these 5 diagnostic types are not shown again after saving; values entered as${env:} references are shown as-is. Leaving the field empty when editing keeps the saved value.
Reference credentials locally in the alert engine
With alert enginev0.46.0 or later, you can use environment variable references in supported data-source connection fields instead of placing credentials directly in the data-source configuration. Alert engine resolves each reference in its local process; the resolved credential is never written back to the synced data-source configuration, debug output, or API payloads.
1
Set environment variables for the alert engine process
Set credentials in the environment of every alert engine process that queries this data source. For example, set
SLS_ACCESS_KEY_ID and SLS_ACCESS_KEY_SECRET for SLS. Restart the alert engine process after changing its environment so the new values take effect.2
Enter references in the data-source form
When editing a data source, enter
${env:VARIABLE_NAME} in a supported authentication or connection field. For example, enter ${env:SLS_ACCESS_KEY_ID} for the SLS AccessKey ID and ${env:SLS_ACCESS_KEY_SECRET} for the AccessKey Secret.3
Save and verify
After saving the data source, verify the connection: for a queryable type click Query on the list row and run a query in the query workbench. For a diagnostic-only type, click AI analysis on the row. An AI SRE diagnostic tool then connects once (see the “Data source row actions: query and AI analysis” section below). Each referenced variable must exist in the corresponding alert engine process environment.
SLS_ACCESS_KEY_SECRET.
Data source row actions: query and AI analysis
Each row’s primary action depends on the data source type:
AI analysis requires AI SRE to be enabled on the account and the AI SRE chat permission.
Edit and delete
- Edit: Click the Edit button in the data source list to modify the configuration and save.
- View: with query permission only, you can view the configuration read-only, with credentials hidden.
- Delete: Click the Delete button in the data source list and confirm to delete the data source.