Create¶
POST /api/v1/checker/add
Overview¶
Creates a monitor.
Body Request Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| configVersion | integer | Required current configuration version for V2 modifications; returns 409 if expired; not required for legacy OpenAPI $minValue: 1 |
|
| generationId | string | Candidate credential created or regenerated by Front AI, from the response header of the generation API |
|
| queryType | string | DQL frontend echo mode used and validated when extend.querylist is not passed. simple means Studio parses and injects simple-mode fields, dql means DQL text mode; default dql. When extend.querylist is explicitly passed, it takes priority as-is and the injection semantics of queryType are ignored; if simple conversion fails, it automatically falls back to dql without changing the DQL actually executed in jsonScript.targetsCan be empty: False Example: simple |
|
| type | string | Monitor type, default trigger. trigger: regular monitor, aiMonitor: AI semantic monitor, smartMonitor: Smart MonitoringCan be empty: False Example: smartMonitor |
|
| status | integer | Monitor status field: 0 enabled, 2 disabled; default enabled (added in the 2025-02-19 iteration) Can be empty: False Allowed values: [0, 2] |
|
| extend | json | Additional information (fields related to incidents and some fields used for frontend echo) Can be empty: True |
|
| alertPolicyUUIDs | array | Alert policy UUIDs Can be empty: False |
|
| dashboardUUID | string | Associated dashboard ID Can be empty: False |
|
| tags | array | Tag names for filtering Can be empty: False Example: ['xx', 'yy'] |
|
| secret | string | The unique identifier secret in the middle segment of the Webhook URL (generally a random UUID, unique within the workspace)Can be empty: False Example: secret_xxxxx |
|
| jsonScript | json | Rule configuration Can be empty: False |
|
| jsonScript.targetWorkspaceUUID | string | Target workspace for cross-workspace queries; only threshold detection types are supported (added in the 2025-08-13 iteration) Can be empty: False Can be empty string: False |
|
| jsonScript.type | string | Y | Check method type Example: simpleCheck Can be empty: False |
| jsonScript.windowDql | string | Window DQL Can be empty: False |
|
| jsonScript.title | string | Y | Title template for generating events Example: Monitor: {{monitor_name}}, Checker: {{monitor_checker_name}}, Triggered value: {{M1}} Can be empty: False Can be empty string: True Max length: 256 |
| jsonScript.message | string | Event content Example: status: {{status}}, title: {{title}} Can be empty: False Can be empty string: True |
|
| jsonScript.recoverTitle | string | Recovery event title template Example: Monitor: {{monitor_name}}, Checker: {{monitor_checker_name}}, Triggered value: {{M1}} Can be empty: False Can be empty string: True |
|
| jsonScript.recoverMessage | string | Recovery event message template Example: status: {{status}}, title: {{title}} Can be empty: False Can be empty string: True |
|
| jsonScript.noDataTitle | string | No-data event title template Example: Monitor: {{monitor_name}}, Checker: {{monitor_checker_name}}, Triggered value: {{M1}} Can be empty: False Can be empty string: True |
|
| jsonScript.noDataMessage | string | No-data event message template Example: status: {{status}}, title: {{title}} Can be empty: False Can be empty string: True |
|
| jsonScript.openNotificationMessage | boolean | Whether to enable event notification content; default disabled (uses event content as notification content) Example: False Can be empty: False |
|
| jsonScript.notificationMessage | string | Event notification content Example: Monitor: {{monitor_name}}, Checker: {{monitor_checker_name}}, Triggered value: {{M1}} Can be empty: False Can be empty string: True |
|
| jsonScript.openNoDataNotificationMessage | boolean | Whether to enable no-data event notification content; default disabled (uses no-data event content as notification content) Example: False Can be empty: False |
|
| jsonScript.noDataNotificationMessage | string | No-data event notification content Example: status: {{status}}, title: {{title}} Can be empty: False Can be empty string: True |
|
| jsonScript.noDataRecoverTitle | string | No-data recovery upload event title template Example: Monitor: {{monitor_name}}, Checker: {{monitor_checker_name}}, Triggered value: {{M1}} Can be empty: False Can be empty string: True |
|
| jsonScript.noDataRecoverMessage | string | No-data recovery upload event message template Example: status: {{status}}, title: {{title}} Can be empty: False Can be empty string: True |
|
| jsonScript.every | string | Check frequency Example: 1m Can be empty: False |
|
| jsonScript.customCrontab | string | Custom detection frequency Example: 0 */12 * * * Can be empty: False |
|
| jsonScript.delaySeconds | integer | Data wait window for regular monitors, in seconds; 0 means no wait. Not supported by Smart Monitoring Example: 60 Can be empty: False Allowed values: [0, 60, 120, 180, 300, 600, 900, 1800] |
|
| jsonScript.interval | integer | Query interval, i.e., the time range span of one query Example: 60 Can be empty: False |
|
| jsonScript.range | integer | The range parameter for advanced detection and mutation detection, in secondsExample: 3600 Can be empty: False |
|
| jsonScript.range_2 | integer | The range_2 parameter for advanced detection and mutation detection, in seconds. Special note: -1 means period-over-period, 0 means use the periodBefore fieldExample: 600 Can be empty: False |
|
| jsonScript.periodBefore | integer | The (yesterday/one hour ago) parameter for advanced detection and mutation detection, in seconds Example: 600 Can be empty: False |
|
| jsonScript.recoverNeedPeriodCount | integer | Specifies after how many check cycles an abnormal condition generates a recovery event. If the check frequency is custom customCrontab, this field represents a time length in seconds; otherwise, it represents the number of check frequenciesExample: 60 Can be empty: False |
|
| jsonScript.noDataInterval | integer | How long without data before a no-data event is generated Example: 60 Can be empty: False |
|
| jsonScript.noDataAction | string | No-data handling operation Can be empty: False Allowed values: ['none', 'checkAs0', 'noDataEvent', 'fatalEvent', 'criticalEvent', 'errorEvent', 'warningEvent', 'okEvent', 'noData', 'recover'] |
|
| jsonScript.checkFuncs | array | Check function information list Example: [{'funcId': 'xxx', 'kwargs': {}}] Can be empty: False |
|
| jsonScript.groupBy | array | Trigger dimension Example: ['gender'] Can be empty: False |
|
| jsonScript.targets | array | Check targets Example: [{'dql': 'M:: soldier_info:(AVG(potential_value)) [::auto] by gender', 'alias': 'M1'}] Can be empty: False |
|
| jsonScript.checkerOpt | json | Check condition settings Can be empty: False |
|
| jsonScript.checkerOpt.yamlConfig | string | V2 complete source YAML text, maximum 256KiB; not a JSON object and without Markdown fences |
|
| jsonScript.checkerOpt.disableLargeScaleEventProtect | boolean | Whether to disable large-scale event protection; default false Example: True |
|
| jsonScript.checkerOpt.script | string | Script content of the programmable monitor Can be empty: False Can be empty string: True |
|
| jsonScript.checkerOpt.rules | array | Trigger condition list Example: [{'status': 'warning', 'conditions': [{'operands': [60], 'operator': '>', 'alias': 'M1'}], 'conditionLogic': 'and', 'matchTimes': 10}] Can be empty: False |
|
| jsonScript.checkerOpt.openOkConditions | boolean | Enable tiered recovery; default disabled (false) Example: True |
|
| jsonScript.checkerOpt.openMatchTimes | boolean | Enable consecutive trigger judgment; default disabled (false) Example: True |
|
| jsonScript.checkerOpt.infoEvent | boolean | Whether to generate info events while the state remains normal; default false Example: True |
|
| jsonScript.checkerOpt.infoEventCondition | json | Info event generation condition; only threshold monitors support it. An empty object means unconditional generation Example: {'alias': 'M1', 'operator': '>=', 'operands': [60]} Can be empty: False |
|
| jsonScript.checkerOpt.infoEventCondition.alias | string | Alias of the judged object |
|
| jsonScript.checkerOpt.infoEventCondition.operator | string | Judgment operator |
|
| jsonScript.checkerOpt.infoEventCondition.operands | array | List of judgment operands |
|
| jsonScript.checkerOpt.diffMode | string | Difference mode for mutation detection in advanced detection; enum values: value, percent Example: value Allowed values: ['value', 'percent'] |
|
| jsonScript.checkerOpt.direction | string | Trigger condition direction for mutation detection and range detection in advanced detection Example: up Allowed values: ['up', 'down', 'both'] |
|
| jsonScript.checkerOpt.eps | float | Distance parameter, value range: 0 ~ 3.0 Example: 0.5 |
|
| jsonScript.checkerOpt.threshold | json | Trigger precondition settings for mutation detection Can be empty: False |
|
| jsonScript.checkerOpt.threshold.status | boolean | Y | Whether the trigger precondition for mutation detection is enabled Example: True |
| jsonScript.checkerOpt.threshold.operator | string | Y | Trigger precondition operator for mutation detection Example: |
| jsonScript.checkerOpt.threshold.value | float | Y | Trigger precondition detection value for mutation detection Example: 90 Can be empty: True |
| jsonScript.checkerOpt.combineExpr | string | Combined monitoring, combination method Example: A && B Can be empty string: False |
|
| jsonScript.checkerOpt.ignoreNodata | boolean | Combined monitoring: whether to ignore no-data results (true means ignore) Example: True |
|
| jsonScript.checkerOpt.confidenceInterval | integer | New parameter for Range Detection V2; confidence interval value 1-100 Example: 10 |
|
| jsonScript.checkerOpt.category | string | AI monitor category metadata Can be empty: False |
|
| jsonScript.checkerOpt.userPrompt | string | AI user prompt; when passed, cannot be empty, maximum 20000 characters Can be empty: False Can be empty string: True Max length: 20000 |
|
| jsonScript.checkerOpt.systemPrompt | string | AI system prompt; when passed, cannot be empty, maximum 20000 characters Can be empty: False Can be empty string: True Max length: 20000 |
|
| jsonScript.checkerOpt.mentions | array | DQL reference list; each item must include type=dql, namespace, and datasource; index is optional and should be filled when logs are selected. Maximum 20000 characters after serializationCan be empty: False |
|
| jsonScript.checkerOpt.mentions[*] | None | ||
| jsonScript.checkerOpt.mentions[*].type | string | Y | Data source type Allowed values: ['dql'] |
| jsonScript.checkerOpt.mentions[*].namespace | string | Y | DQL namespace Can be empty string: False |
| jsonScript.checkerOpt.mentions[*].index | string | DQL index; fill in when logs are selected Can be empty string: False |
|
| jsonScript.checkerOpt.mentions[*].datasource | string | Y | DQL data source Can be empty string: False |
| jsonScript.checkerOpt.model | string | Model used for this detection Can be empty: False |
|
| jsonScript.checkerOpt.contextWindowLimit | integer | Context window token limit, must be greater than 0 Can be empty: False $minValue: 1 |
|
| jsonScript.checkerOpt.maxChatRounds | integer | Maximum chat rounds, must be greater than or equal to 1 Can be empty: False $minValue: 1 |
|
| jsonScript.checkerOpt.maxDQLQueries | integer | Maximum DQL query count, must be greater than or equal to 0 Can be empty: False $minValue: 0 |
|
| jsonScript.checkerOpt.creditSoftBudget | number | Credit soft budget per detection, must be greater than 0 Can be empty: False |
|
| jsonScript.channels | array | Channel UUID list Example: ['name1', 'name2'] Can be empty: False |
|
| jsonScript.atAccounts | array | UUID list of accounts @'d under normal detection Example: ['xx1', 'xx2'] Can be empty: False |
|
| jsonScript.atNoDataAccounts | array | UUID list of accounts @'d in no-data situations Example: ['xx1', 'xx2'] Can be empty: False |
|
| jsonScript.subUri | string | Webhook URL suffix of OuterEventChecker; required when creating, uniqueness not required Example: datakit/push Can be empty: False |
|
| jsonScript.isChangeEvent | boolean | Whether OuterEventChecker is processed as a change event; default false. Existing rules missing this field are also treated as false Example: False Can be empty: False |
|
| jsonScript.disableCheckEndTime | boolean | Whether to disable end time restriction Example: True Can be empty: False |
|
| jsonScript.eventChartEnable | boolean | Whether to enable event charts; default disabled (note: only takes effect when the primary storage engine for logging is doris) Example: False Can be empty: False |
|
| jsonScript.eventCharts | array | Event chart list Example: True Can be empty: False |
|
| jsonScript.eventCharts[*] | None | ||
| jsonScript.eventCharts[*].dql | string | Event chart query statement Example: M:: cpu:(avg(load5s)) BY host Can be empty: False |
|
| openPermissionSet | boolean | Enable custom permission configuration (default false: disabled). When enabled, the operation permissions of this rule follow permissionSetCan be empty: False |
|
| permissionSet | array | Operation permission configuration; configurable (roles (except owner), member UUIDs, team UUIDs) Example: ['wsAdmin', 'acnt_xxxx', 'group_yyyy'] Can be empty: False |
Supplementary Parameter Notes¶
Smart Monitoring V2 uses the outer type=smartMonitor, jsonScript.type=smartMonitorV2Check, and checkerOpt.yamlConfig.
It runs every 10 minutes, and queries come only from YAML. Modifications are limited to DQL, existing threshold configurations, and existing public algorithm parameters; rule sets, algorithm types, dimensions, time, and templates cannot be modified.
extend.smartMonitor stores the source, prompt, and server-side configuration version. Front rejects creation/import/editing of old versions, while old instances can still be deleted and started/stopped; OpenAPI capabilities for old versions remain compatible.
Data Description.
jsonScript parameter description
1. Check type jsonScript.type description
| key | Description |
|---|---|
| simpleCheck | Threshold detection |
| seniorMutationsCheck | Mutation detection |
| seniorRangeCheck | Range detection |
| seniorRangeV2Check | Range detection V2 |
| outlierCheck | Outlier detection |
| loggingCheck | Log detection |
| processCheck | Process anomaly detection |
| objectSurvivalCheck | Infrastructure survival detection |
| objectSurvivalV2Check | Infrastructure survival detection V2, only supported in doris workspaces |
| objectChangeCheck | Infrastructure change detection |
| apmCheck | Application performance metrics detection |
| rumCheck | Real user metrics detection |
| securityCheck | Security Check anomaly detection |
| cloudDialCheck | Synthetic Testing Anomaly Detection |
| networkCheck | Network data detection |
| OuterEventChecker | External event detection |
| smartHostCheck | Smart Monitoring, host intelligent detection |
| smartLogCheck | Smart Monitoring, log intelligent detection |
| smartApmCheck | Smart Monitoring, application intelligent detection |
| smartRumCheck | Smart Monitoring, real user intelligent detection |
| smartKubeCheck | Smart Monitoring, Kubernetes intelligent detection |
| smartCloudBillingCheck | Smart Monitoring, cloud billing intelligent detection |
| combinedCheck | Combined monitoring |
| programmableCheck | Programmable monitor |
| aiMonitor | AI semantic monitor; saved as an independent Rule.type=aiMonitor and executed by Func scheduled tasks |
2. Deprecated check type jsonScript.type description
| key | Description |
|---|---|
| seniorCheck | Advanced check, deprecated |
| mutationsCheck | Mutation check, deprecated; updated to seniorMutationsCheck |
| waterLevelCheck | Water level check, deprecated |
| rangeCheck | Range check, deprecated; updated to seniorRangeCheck |
3. Trigger condition comparison operator description (parameter description in checkerOpt.rules)
| Parameter | Type | Required | Description |
|---|---|---|---|
| conditions | Array[Dict] | Required | Conditions |
| conditions[#].alias | String | Required | Detection object alias, i.e., the alias of the above targets[#].alias |
| conditions[#].operator | String | Required | Operator. =, >, <, etc. |
| conditions[#].operands | Array[Any] | Required | Operand array. (Operators such as between, in require multiple operands) |
| conditionLogic | string | Required | Logic between conditions. and, or |
| status | string | Required | The status of the event output when conditions are met. Same values as event status |
| direction | string | [Range/water level/mutation parameters] Detection direction, values: "up", "down", "both" | |
| periodNum | integer | [Range/water level/mutation parameters] Only detects the number of most recent data points | |
| checkPercent | integer | [Range parameter] Anomaly percentage threshold, values: 1 ~ 100 | |
| checkCount | integer | [Water level/mutation parameters] Number of consecutive anomaly points | |
| strength | integer | [Water level/mutation parameters] Detection strength, values: 1=weak, 2=medium, 3=strong | |
| matchTimes | integer | Number of consecutive trigger occurrences when consecutive trigger is enabled (checkerOpt.openMatchTimes), [1,10] |
|
| okConditions | Array[Dict] | Recovery conditions | |
| okConditions[#].alias | String | Detection object alias, i.e., the alias of the above targets[#].alias |
|
| okConditions[#].operator | String | Operator. =, >, <, etc. | |
| okConditions[#].operands | Array[Any] | Operand array. (Operators such as between, in require multiple operands) |
4. Parameter information for simple/log/water level/mutation/range checks jsonScript.type in (simpleCheck, loggingCheck, waterLevelCheck, mutationsCheck, rangeCheck, securityCheck)
| Parameter | Type | Required | Description |
|---|---|---|---|
| title | string | Y | Failure event title template |
| message | string | N | Failure event message template |
| recoverTitle | string | N | Recovery event title template |
| recoverMessage | string | N | Recovery event message template |
| noDataTitle | string | N | No-data event title template |
| noDataMessage | string | N | No-data event message template |
| noDataRecoverTitle | string | N | No-data recovery upload event title template |
| noDataRecoverMessage | string | N | No-data recovery upload event message template |
| openNotificationMessage | boolean | N | Whether to enable event notification content |
| notificationMessage | string | N | Event notification content |
| openNoDataNotificationMessage | string | N | Whether to enable no-data event notification content |
| noDataNotificationMessage | string | N | No-data event notification content |
| name | string | Y | Rule name |
| type | string | Y | Rule type |
| every | string | Y | Check frequency, unit (1m/1h/1d) |
| customCrontab | string | N | Crontab for custom check frequency |
| delaySeconds | integer | N | Data wait window, in seconds; supported values: 0, 60, 120, 180, 300, 600, 900, 1800; default 0 |
| interval | integer | Y | Time range span of data, i.e., the time_range span, in seconds |
| recoverNeedPeriodCount | integer | Y | Generates a recovery event after more than the specified number of check cycles. If the check frequency is custom customCrontab, this field represents a time length in seconds; otherwise, it represents the number of check frequencies |
| noDataInterval | integer | N | How long without data before a no-data event is generated |
| noDataAction | string | N | No-data handling operation |
| targets | array | Y | List of check targets in simple checks |
| targets[*].dql | string | Y | DQL query statement |
| targets[*].alias | string | Y | Alias |
| targets[*].monitorCheckerId | string | Y | Combined monitoring, monitor ID (rul_xxxxx) |
| checkerOpt | json | N | Check configuration, optional |
| checkerOpt.rules | array | Y | List of check rules |
| checkerOpt.openMatchTimes | boolean | N | Whether to enable consecutive trigger judgment; default disabled (false) |
| checkerOpt.openOkConditions | boolean | N | Enable recovery condition configuration; default disabled (false) |
| checkerOpt.disableLargeScaleEventProtect | boolean | N | Whether to disable large-scale event protection; default false |
For regular simpleCheck, jsonScript.targets are the actual execution targets; target aliases must be unique and consistent with the references in check conditions. Multiple query nodes required for editing or echo rendering should be placed in extend.querylist. combinedCheck follows the existing multi-target semantics of combined monitoring.
5. jsonScript.noDataAction parameter information
| Parameter | Description |
|---|---|
| none | No action (same as disabling no-data handling) |
| checkAs0 | Treat the query result as 0 |
| noDataEvent | Trigger a no-data event (noData) |
| fatalEvent | Trigger a fatal event (fatal) |
| criticalEvent | Trigger a critical event (critical) |
| errorEvent | Trigger an important event (error) |
| warningEvent | Trigger a warning event (warning) |
| okEvent | Trigger a recovery event (ok) |
| noData | Generate a no-data event. This parameter was retired on 2024-04-10; its logic is equivalent to noDataEvent and can be replaced directly with noDataEvent |
| recover | Trigger a recovery event. This parameter was retired on 2024-04-10; its logic is equivalent to okEvent and can be replaced directly with okEvent |
6. Parameter information for advanced check jsonScript.type in (seniorCheck)
| Parameter | Type | Required | Description |
|---|---|---|---|
| title | string | Y | Failure event title template |
| message | string | N | Failure event message template |
| recoverTitle | string | N | Recovery event title template |
| recoverMessage | string | N | Recovery event message template |
| noDataTitle | string | N | No-data event title template |
| noDataMessage | string | N | No-data event message template |
| noDataRecoverTitle | string | N | No-data recovery upload event title template |
| noDataRecoverMessage | string | N | No-data recovery upload event message template |
| type | string | Y | Rule type |
| every | string | Y | Check frequency, unit (1m/1h/1d) |
| customCrontab | string | N | Crontab for custom check frequency |
| delaySeconds | integer | N | Data wait window, in seconds; supported values: 0, 60, 120, 180, 300, 600, 900, 1800; default 0 |
| checkFuncs | array | Y | Advanced check function list; note that it has one and only one element |
| checkFuncs[#].funcId | string | Y | Function ID; can be obtained via the "External Functions" list API, filtering the custom check function list by funcTags=monitorType\|custom |
| checkFuncs[#].kwargs | json | N | Parameter data required by the advanced function |
7. Mutation check seniorMutationsCheck parameter description
| Parameter | Type | Required | Description |
|---|---|---|---|
| jsonScript.range | integer | N | Result time period 1 of the detection metric |
| jsonScript.range_2 | integer | N | Result time period 2 of the detection metric. Special note: -1 means period-over-period, 0 means use the periodBefore field |
| jsonScript.periodBefore | integer | N | When jsonScript.range_2 is 0, this field represents (yesterday/one hour ago) |
| jsonScript.checkerOpt.diffMode | string | N | Difference mode for mutation detection (difference: value, difference percentage: percent) |
| jsonScript.checkerOpt.threshold.status | boolean | N | Trigger precondition settings for mutation detection, enabled/disabled |
| jsonScript.checkerOpt.threshold.operator | string | N | Trigger precondition settings for mutation detection, operator |
| jsonScript.checkerOpt.threshold.value | float | N | Trigger precondition settings for mutation detection, detection value |
8. Parameter description for combined monitoring related fields
| Parameter | Type | Required | Description |
|---|---|---|---|
| jsonScript.checkerOpt.combineExpr | string | Y | Combination method, e.g., A && B |
| jsonScript.checkerOpt.ignoreNodata | boolean | N | Whether to ignore no-data results (true means ignore) |
9. Parameter description for external event detection jsonScript.type in (OuterEventChecker) related fields
| Parameter | Type | Required | Description |
|---|---|---|---|
| secret | string | N | Used to identify the monitor to which the event belongs; globally unique. If omitted when creating, it is generated by Studio; Import does not reuse old values. |
| jsonScript.subUri | string | Y | Webhook URL suffix; required when creating, uniqueness not required. |
| jsonScript.isChangeEvent | boolean | N | Whether to treat as a change event; default false. Existing rules missing this field are also treated as false. |
Parameter description for AI semantic monitor jsonScript.type=aiMonitor
The AI semantic monitor is an independent Rule.type=aiMonitor type. It reuses the checker create, modify, start/stop, and delete interfaces and the permission and lifecycle logic of smart monitors; tags use the independent AiCheckerRefTagObject association type. Studio creates/modifies Func scheduled tasks for it and always calls guance__api.ai_monitor.
| Parameter | Type | Required | Description |
|---|---|---|---|
| jsonScript.title | string | Y | Monitor name; reuses the existing checker request field and is passed as Func checker_opt.name |
| jsonScript.every | string | Y | Check frequency; supports existing s/m/h period formats, recommended no less than 30 minutes |
| jsonScript.customCrontab | string | N | Custom Cron expression, reuses existing checker validation |
| jsonScript.checkerOpt.userPrompt | string | Y | AI user prompt; cannot be empty after trimming leading/trailing whitespace, maximum 20000 characters |
| jsonScript.checkerOpt.systemPrompt | string | N | AI system prompt; cannot be empty after trimming leading/trailing whitespace, maximum 20000 characters |
| jsonScript.checkerOpt.category | string | N | AI monitor category metadata |
| jsonScript.checkerOpt.infoEvent | boolean | N | Whether to generate info events; default false |
| jsonScript.checkerOpt.mentions | array | N | DQL reference list, default []; maximum 20000 characters after serialization. Each item type is fixed to dql, and non-empty namespace and datasource are required; fill in index when logs are selected |
| jsonScript.checkerOpt.model | string | N | Model identifier; if absent, Func uses the default model |
| jsonScript.checkerOpt.contextWindowLimit | integer | N | Context window limit, must be greater than 0 |
| jsonScript.checkerOpt.maxChatRounds | integer | N | Maximum chat rounds, must be greater than or equal to 1 |
| jsonScript.checkerOpt.maxDQLQueries | integer | N | Maximum DQL queries, must be greater than or equal to 0 |
| jsonScript.checkerOpt.creditSoftBudget | number | N | AI soft quota, must be greater than 0 |
In the Func input, checker_opt.id is filled by Studio with the Rule UUID; workspace_agent_api_key uses the workspace AI general system AK prefixed with the current site. Workspace token rotation only updates workspace_token and does not rotate the built-in AK; data delay uses Func's CUSTOM_DB_DATA_DELAY instead of the regular monitor's delaySeconds.
10. Field disableCheckEndTime description
When Guance processes reported data, its logic includes two modes: append write and update/overwrite. Based on the characteristics of these two data types, monitors need to handle detection differently. This distinction covers all modules of monitors, Smart Monitoring, and Intelligent Inspection. When monitor detection is configured for all data types that use the overwrite/update mechanism, to avoid data escape in the fixed time range caused by the monitor executing with a 1-minute delay, the detection interval of these monitor types does not specify an end time. Involved monitor types: threshold detection, mutation detection, range detection, outlier detection, process anomaly detection, infrastructure survival detection, real user metric detection (individual metrics, see table below)
| Data Type | Namespace | Write Mode |
|---|---|---|
| Metrics | M | Append |
| Events | E | Append |
| Unrecovered Events | UE | Overwrite |
| Infrastructure - Objects | O | Overwrite |
| Infrastructure - Custom Objects | CO | Overwrite |
| Infrastructure - Object History | OH | Append |
| Infrastructure - Custom Object History | COH | Append |
| Logs / Synthetic Monitoring / CI Visualization | L | Append |
| APM - Traces | T | Append |
| APM - Profile | P | Append |
| RUM - Session | R::session | Overwrite |
| RUM - View | R::view | Overwrite |
| RUM - Resource | R::resource | Append |
| RUM - Long Task | R::long_task | Append |
| RUM - Action | R::action | Append |
| RUM - Error | R::error | Append |
| Security Check | S |
All data types with the write mode Overwrite must set disableCheckEndTime to true.
11. Range Detection V2 related parameter field description
| Parameter | Type | Required | Description |
|---|---|---|---|
| jsonScript.checkerOpt.confidenceInterval | integer | Y | Confidence interval range, value 1-100% |
12. Monitor operation permission configuration parameter description
| Parameter | Type | Description |
|---|---|---|
| openPermissionSet | boolean | Whether to enable custom permission configuration, default false |
| permissionSet | array | Operation permission configuration |
Description of permissionSet and openPermissionSet fields (fields added in the 2024-06-26 iteration):
When openPermissionSet is enabled, only the workspace owner and the roles, teams, and members included in the permissionSet configuration can edit/enable/disable/delete.
When openPermissionSet is disabled (default), the delete/enable/disable/edit permissions follow the original interface permissions for edit/enable/disable/delete.
The permissionSet field can be configured with role UUIDs (wsAdmin, general, readOnly, role_xxxxx), team UUIDs (group_yyyy), and member UUIDs (acnt_xxx).
Example of permissionSet:
13. Incident association configuration description
| Parameter | Type | Description |
|---|---|---|
| extend.isNeedCreateIssue | boolean | Whether to associate incidents; default no association |
| extend.issueDfStatus | array | Five optional types (fatal, critical, error, warning, nodata). When issueDfStatus exists, an Issue is created only if the df_status of events generated by the monitor is in issueDfStatus; when issueDfStatus does not exist, Issues are created for all events |
| extend.issueLevelUUID | string | Issue level UUID |
| extend.manager | array | Manager information when creating an Issue (email/workspace member/team), e.g., ["xxx@guance.com","acnt_yyyy", "group_"] |
| extend.needRecoverIssue | boolean | Whether event recovery should also close the issue; default false |
| jsonScript.channels | string | Required when isNeedCreateIssue is true. Issue channel information, e.g., ["chan_xxx", "chan_yyy"] |
14. DQL echo mode queryType description
When extend.querylist is not passed, queryType is an outer optional field that controls automatic injection. Only simple and dql are supported; the default is dql when not passed. When simple is passed, Studio uses the local DQL parser to parse jsonScript.targets and inject simple-mode fields; if parsing or conversion fails, it automatically falls back to DQL text mode. When extend.querylist is explicitly passed, the caller's structure is fully preserved and the injection semantics of queryType are ignored.
Request Example¶
curl 'https://openapi.guance.com/api/v1/checker/add' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"queryType":"simple","extend":{"funcName":"","isNeedCreateIssue":false,"issueLevelUUID":"","needRecoverIssue":false,"querylist":[{"datasource":"dataflux","qtype":"dql","query":{"alias":"","code":"Result","dataSource":"ssh","field":"ssh_check","fieldFunc":"count","fieldType":"float","funcList":[],"groupBy":["host"],"groupByTime":"","namespace":"metric","q":"M::`ssh`:(count(`ssh_check`)) BY `host`","type":"simple"},"uuid":"aada629a-672e-46f9-9503-8fd61065c382"}],"rules":[{"conditionLogic":"and","conditions":[{"alias":"Result","operands":["90"],"operator":">="}],"status":"critical"},{"conditionLogic":"and","conditions":[{"alias":"Result","operands":["0"],"operator":">="}],"status":"error"}]},"jsonScript":{"atAccounts":[],"atNoDataAccounts":[],"channels":[],"checkerOpt":{"infoEvent":false,"rules":[{"conditionLogic":"and","conditions":[{"alias":"Result","operands":["90"],"operator":">="}],"status":"critical"},{"conditionLogic":"and","conditions":[{"alias":"Result","operands":["0"],"operator":">="}],"status":"error"}]},"disableCheckEndTime":false,"every":"1m","groupBy":["host"],"interval":300,"message":">Level:{{status}} \n>Host:{{host}} \n>Content:Host SSH Status {{ Result | to_fixed(2) }}% \n>Suggestion:Check Host SSH Service Status","noDataMessage":"","noDataTitle":"","recoverNeedPeriodCount":2,"targets":[{"alias":"Result","dql":"M::`ssh`:(count(`ssh_check`)) BY `host`","qtype":"dql"}],"title":"Host {{ host }} SSH Service Exception-Add Alert Policy","type":"simpleCheck"},"alertPolicyUUIDs":["altpl_xxxx32","altpl_xxxx32"]}' \
--compressed
Response¶
{
"code": 200,
"content": {
"alertPolicyUUIDs": [
"altpl_xxxx32",
"altpl_xxxx32"
],
"createAt": 1710831393,
"createdWay": "manual",
"creator": "wsak_xxxx",
"crontabInfo": {
"crontab": "*/1 * * * *",
"id": "cron-2n8ZyrMWKXB8"
},
"declaration": {
"b": [
"asfawfgajfasfafgafwba",
"asfgahjfaf"
],
"business": "aaa",
"organization": "64fe7b4062f74d0007b46676"
},
"deleteAt": -1,
"extend": {
"funcName": "",
"isNeedCreateIssue": false,
"issueLevelUUID": "",
"needRecoverIssue": false,
"querylist": [
{
"datasource": "dataflux",
"qtype": "dql",
"query": {
"alias": "",
"code": "Result",
"dataSource": "ssh",
"field": "ssh_check",
"fieldFunc": "count",
"fieldType": "float",
"funcList": [],
"groupBy": [
"host"
],
"groupByTime": "",
"namespace": "metric",
"q": "M::`ssh`:(count(`ssh_check`)) BY `host`",
"type": "simple"
},
"uuid": "aada629a-672e-46f9-9503-8fd61065c382"
}
],
"rules": [
{
"conditionLogic": "and",
"conditions": [
{
"alias": "Result",
"operands": [
"90"
],
"operator": ">="
}
],
"status": "critical"
},
{
"conditionLogic": "and",
"conditions": [
{
"alias": "Result",
"operands": [
"0"
],
"operator": ">="
}
],
"status": "error"
}
]
},
"id": null,
"isLocked": false,
"jsonScript": {
"atAccounts": [],
"atNoDataAccounts": [],
"channels": [],
"checkerOpt": {
"infoEvent": false,
"rules": [
{
"conditionLogic": "and",
"conditions": [
{
"alias": "Result",
"operands": [
"90"
],
"operator": ">="
}
],
"status": "critical"
},
{
"conditionLogic": "and",
"conditions": [
{
"alias": "Result",
"operands": [
"0"
],
"operator": ">="
}
],
"status": "error"
}
]
},
"disableCheckEndTime": false,
"every": "1m",
"groupBy": [
"host"
],
"interval": 300,
"message": ">Level:{{status}} \n>Host:{{host}} \n>Content:Host SSH Status {{ Result | to_fixed(2) }}% \n>Suggestion:Check Host SSH Service Status",
"name": "Host {{ host }} SSH Service Exception-Add Alert Policy",
"noDataMessage": "",
"noDataTitle": "",
"recoverNeedPeriodCount": 2,
"targets": [
{
"alias": "Result",
"dql": "M::`ssh`:(count(`ssh_check`)) BY `host`",
"qtype": "dql"
}
],
"title": "Host {{ host }} SSH Service Exception-Add Alert Policy",
"type": "simpleCheck"
},
"monitorName": "default",
"monitorUUID": "monitor_xxxx32",
"refKey": "",
"secret": "",
"status": 0,
"tagInfo": [],
"type": "trigger",
"updateAt": null,
"updator": null,
"uuid": "rul_xxxx32",
"workspaceUUID": "wksp_xxxx32"
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-014A6CF1-E9D8-4EA7-9527-D3C39CC3A94A"
}