Queries monitoring rules based on a partition filter expression.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListQualityRules |
The operation that you want to perform. |
EntityId | Long | Yes | 1234 |
The ID of the partition filter expression. You can call the GetQualityEntity operation to query the ID of the partition filter expression. |
PageNumber | Integer | Yes | 1 |
The number of the page to return. |
PageSize | Integer | Yes | 20 |
The number of entries to return on each page. Default value: 10. Maximum value: 20. |
ProjectName | String | Yes | autotest |
The name of the compute engine instance or data source. You can obtain the name from data source configurations. |
RegionId | String | Yes | cn-shanghai |
The ID of the region where DataWorks is activated. For example, the ID of the China (Shanghai) region is cn-shanghai, and that of the China (Zhangjiakou) region is cn-zhangjiakou. The system automatically determines the value of this parameter based on the endpoint used to call the operation. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Data | Struct |
The list of monitoring rules. |
|
PageNumber | Integer | 1 |
The page number of the returned page. |
PageSize | Integer | 20 |
The number of entries returned per page. Default value: 10. Maximum value: 100. |
Rules | Array of Rules |
The details of monitoring rules. |
|
BlockType | Integer | 0 |
The strength of the monitoring rule. The strength of monitoring rules indicates the importance of the rules. Valid values:
|
CheckerId | Integer | 7 |
The ID of the checker. |
Comment | String | Monitoring rule for a table |
The description of the monitoring rule. |
CriticalThreshold | String | 40 |
The threshold for a critical alert. The threshold indicates the deviation of monitoring results from expected values. You can customize this threshold based on your business requirements. If a strong rule is used and a critical alert is reported, nodes are blocked. |
EntityId | Integer | 1234 |
The ID of the partition filter expression. |
ExpectValue | String | 1000 |
The expected value of the monitoring rule. |
FixCheck | Boolean | true |
Indicates whether the monitoring rule is a strong rule. Valid values:
|
HistoryCriticalThreshold | String | history max:80%,history min:50% |
The historical threshold for a critical alert. |
HistoryWarningThreshold | String | history max:40%,history min:10% |
The historical threshold for a warning alert. |
Id | Integer | 1234 |
The ID of the monitoring rule. |
MatchExpression | String | dt=$[yyyymmdd] |
The partition filter expression. |
MethodId | Integer | 21 |
The ID of the sampling method of the monitoring rule. |
MethodName | String | count/table_count |
The method 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, and table_count-count_distinct. |
OnDuty | String | 1912**** |
The ID of the Alibaba Cloud account that is used to configure the monitoring rule. |
OnDutyAccountName | String | test |
The name of the Alibaba Cloud account that is used to configure the monitoring rule. |
ProjectName | String | autotest |
The name of the compute engine instance or data source. |
Property | String | id |
The name of the field that is monitored. |
PropertyKey | String | table_count |
The field that is used to associate with monitoring rules at the frontend. This parameter can be ignored. |
RuleCheckerRelationId | Integer | 132323 |
The ID of the node that is associated with the partition filter expression. |
RuleName | String | test |
The name of the rule. |
RuleType | Integer | 0 |
The type of the monitoring rule. Valid values:
|
TableName | String | dual |
The name of the table. |
TemplateId | Integer | 7 |
The ID of the rule template. |
TemplateName | String | Fluctuations of the number of table rows on an SQL node compared with that on the previous day, that of seven days ago, and that of 30 days ago |
The name of the rule template. |
Trend | String | abs |
The trend of the monitoring results. |
WarningThreshold | String | 10 |
The threshold for a warning alert. The threshold indicates the deviation of monitoring results from expected values. You can customize this threshold based on your business requirements. |
TotalCount | Long | 400 |
The total number of returned entries. |
ErrorCode | String | Invalid.Tenant.ConnectionNotExists |
The error code. |
ErrorMessage | String | You have no permission. |
The error message. |
HttpStatusCode | Integer | 200 |
The HTTP status code. |
RequestId | String | 38cbdef0-f6cf-49**** |
The ID of the request. You can use the ID to troubleshoot issues. |
Success | Boolean | true |
Indicates whether the request is successful. Valid values:
|
Examples
Sample requests
http(s)://[Endpoint]/?Action=ListQualityRules
&EntityId=1234
&PageNumber=1
&PageSize=20
&ProjectName=autotest
&RegionId=cn-shanghai
&<Common request parameters>
Sample success responses
XML
format
<RequestId>38cbdef0-f6cf-49****</RequestId>
<HttpStatusCode>200</HttpStatusCode>
<Data>
<TotalCount>400</TotalCount>
<PageSize>20</PageSize>
<PageNumber>1</PageNumber>
<Rules>
<HistoryCriticalThreshold>history max:80%,history min:50%</HistoryCriticalThreshold>
<HistoryWarningThreshold>history max:40%,history min:10%</HistoryWarningThreshold>
<RuleCheckerRelationId>132323</RuleCheckerRelationId>
<ExpectValue>1000</ExpectValue>
<ProjectName>autotest</ProjectName>
<WarningThreshold>10</WarningThreshold>
<OnDuty>1912****</OnDuty>
<MatchExpression>dt=$[yyyymmdd]</MatchExpression>
<MethodId>21</MethodId>
<TemplateName>Fluctuations of the number of table rows on an SQL node compared with that on the previous day, that of seven days ago, and that of 30 days ago</TemplateName>
<MethodName>count/table_count</MethodName>
<Property>id</Property>
<RuleName>test</RuleName>
<TemplateId>7</TemplateId>
<Comment>Monitoring rule for a table</Comment>
<CriticalThreshold>40</CriticalThreshold>
<Trend>abs</Trend>
<RuleType>0</RuleType>
<CheckerId>7</CheckerId>
<EntityId>1234</EntityId>
<TableName>dual</TableName>
<FixCheck>true</FixCheck>
<BlockType>0</BlockType>
<OnDutyAccountName>test</OnDutyAccountName>
<Id>1234</Id>
<PropertyKey>table_count</PropertyKey>
</Rules>
</Data>
<ErrorCode>Invalid.Tenant.ConnectionNotExists</ErrorCode>
<ErrorMessage>You have no permission.</ErrorMessage>
<Success>true</Success>
JSON
format
{
"RequestId": "38cbdef0-f6cf-49****",
"HttpStatusCode": 200,
"Data": {
"TotalCount": 400,
"PageSize": 20,
"PageNumber": 1,
"Rules": {
"HistoryCriticalThreshold": "history max:80%,history min:50%",
"HistoryWarningThreshold": "history max:40%,history min:10%",
"RuleCheckerRelationId": 132323,
"ExpectValue": 1000,
"ProjectName": "autotest",
"WarningThreshold": 10,
"OnDuty": "1912****",
"MatchExpression": "dt=$[yyyymmdd]",
"MethodId": 21,
"TemplateName": "Fluctuations of the number of table rows on an SQL node compared with that on the previous day, that of seven days ago, and that of 30 days ago",
"MethodName": "count/table_count",
"Property": "id",
"RuleName": "test",
"TemplateId": 7,
"Comment": "Monitoring rule for a table",
"CriticalThreshold": 40,
"Trend": "abs",
"RuleType": 0,
"CheckerId": 7,
"EntityId": 1234,
"TableName": "dual",
"FixCheck": true,
"BlockType": 0,
"OnDutyAccountName": "test",
"Id": 1234,
"PropertyKey": "table_count"
}
},
"ErrorCode": "Invalid.Tenant.ConnectionNotExists",
"ErrorMessage": "You have no permission.",
"Success": true
}
Error codes
For a list of error codes, visit the API Error Center.