Updates a monitoring rule.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
BlockType | integer | No | The strength of the monitoring rule. The strength of a monitoring rule indicates the importance of the rule. Valid values:
| 0 |
EntityId | long | No | The ID of the partition filter expression. You can call the ListQualityRules operation to obtain the ID of the partition filter expression. | 123 |
Comment | string | No | The description of the monitoring rule. | |
Checker | integer | Yes | The checker ID. Valid values: 2: indicates that the current value is compared with the average value of the previous 7 days. 3: indicates that the current value is compared with the average value of the previous 30 days. 4: indicates that the current value is compared with the value 1 day earlier. 5: indicates that the current value is compared with the value 7 days earlier. 6: indicates that the current value is compared with the value 30 days earlier. 7: indicates the variance between the current value and the value 7 days earlier. 8: indicates the variance between the current value and the value 30 days earlier. 9: indicates that the current value is compared with a fixed value. 10: indicates that the current value is compared with the value 1, 7, or 30 days earlier. 11: indicates that the current value is compared with the value of the previous cycle. You can call the ListQualityRules operation to query the ID. | 9 |
ExpectValue | string | No | The expected value of the monitoring rule. | 300 |
Id | long | Yes | The monitoring rule ID. You can call the ListQualityRules operation to query the ID of the monitoring rule. | 1234 |
Trend | string | No | The trend of the monitoring result. Valid values:
| up |
MethodName | string | Yes | The method that is used to collect sample data, such as avg, count, sum, min, max, count_distinct, user_defined, table_count, table_size, table_dt_load_count, table_dt_refuseload_count, null_value, null_value/table_count, (table_count-count_distinct)/table_count, or table_count-count_distinct. | table_count |
Operator | string | No | The comparison operator, such as >, >=, =, ≠, <, or <=. Note
If you set the Checker parameter to 9, you must configure the Operator parameter.
| > |
ProjectName | string | Yes | The name of the compute engine or data source. You can log on to the DataWorks console and go to the Workspace page to obtain the name of the compute engine or data source. | autotest |
Property | string | Yes | The name of the field. | id |
PropertyType | string | No | The data type of the field. | bigint |
RuleType | integer | No | The type of the monitoring rule. Valid values:
| 0 |
WhereCondition | string | No | The filter condition or custom SQL statement that is used for monitoring. | dt=$[yyyymmdd] |
CriticalThreshold | string | No | The threshold for a critical alert. The threshold indicates the deviation of the monitoring result from the expected value. You can specify a custom value for the threshold based on your business requirements. If a monitoring rule is a strong rule and the critical threshold is exceeded, a critical alert is reported and tasks that are associated with the rule are blocked from running. | 10 |
WarningThreshold | string | No | The threshold for a warning alert. The threshold specifies the deviation of the monitoring result from the expected value. You can specify a custom value for the threshold based on your business requirements. | 5 |
TemplateId | integer | No | The ID of the monitoring template. You can call the ListQualityRules operation to obtain the ID of the monitoring template. | 7 |
RuleName | string | No | The name of the monitoring rule. | 123 |
PredictType | integer | No | Specifies whether the threshold is a dynamic threshold. Valid values:
| 0 |
OpenSwitch | boolean | No | Specifies whether to enable the monitoring rule in the production environment. Valid values:
| true |
ProjectId | long | Yes | The DataWorks workspace ID. | 26 |
TaskSetting | string | No | The variable settings inserted before the custom rule. Format: x=a,y=b. | x=a,y=b |
Response parameters
Examples
Sample success responses
JSON
format
{
"HttpStatusCode": 200,
"Data": true,
"ErrorMessage": "You have no permission.",
"RequestId": "576b9457-2cf5-4****",
"ErrorCode": "0",
"Success": true
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-11-14 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2023-11-15 | The request parameters of the API has changed | View Change Details |
2023-03-08 | The request parameters of the API has changed | View Change Details |