| object | | |
Code | string | The HTTP status code.
Note
The status code 200 indicates that the call was successful.
| 200 |
Message | string | The returned message. If the call was successful, the value success is returned. If the call failed, an error message is returned. | successful |
RequestId | string | | C6718537-E673-4A58-8EE1-24B8B38C7AAE |
Success | boolean | Indicates whether the call was successful. Valid values:
- true: The call was successful.
- false: The call failed.
| true |
LogMonitor | object | The details of the log monitoring metric. | |
ValueFilterRelation | string | The logical operator that is used between log filter conditions. The ValueFilter and ValueFilterRelation parameters are used in pair. Valid values:
| and |
SlsLogstore | string | The name of the Log Service Logstore. | test-logstore |
MetricName | string | | cpu_total |
GroupId | long | The ID of the application group. | 12345 |
LogId | long | The ID returned by Log Service. | 1234 |
MetricExpress | string | The extended field. The extended field allows you to perform basic operations on the aggregation results.
Assume that you have calculated TotalNumber and 5XXNumber by aggregating the data. TotalNumber indicates the total number of HTTP requests, and 5XXNumber indicates the number of HTTP requests whose status code is greater than 499. You can calculate the server error rate by adding the following formula to the extended field: 5XXNumber/TotalNumber*100. | {"extend":{"errorPercent":"5XXNumber/TotalNumber*100"}} |
SlsRegionId | string | The ID of the region where the Log Service Logstore resides. | cn-hangzhou |
GmtCreate | long | The time when the log monitoring metric was created.
This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC. | 1547431398000 |
SlsProject | string | The name of the Log Service project. | test-project |
Aggregates | object [] | | |
Max | string | | 10 |
Min | string | | 0 |
Function | string | The function that is used to aggregate the monitoring data of logs within an aggregation period. Valid values:
- count: counts the number.
- sum: calculates the total value.
- avg: calculates the average value.
- max: selects the maximum value.
- min: selects the minimum value.
- countps: calculates the counted number of the specified field divided by the total number of seconds of the aggregation period.
- sumps: calculates the total value of the specified field divided by the total number of seconds of the aggregation period.
- distinct: counts the number of logs where the specified field appears within the aggregation period.
| count |
Alias | string | The alias of the aggregate function. | HostName |
FieldName | string | The name of the field in logs. | hostName |
ValueFilter | object [] | The condition that is used to filter logs. The ValueFilter and ValueFilterRelation parameters are used in pair. The filter condition is equivalent to the WHERE clause in SQL statements.
If no filter condition is specified, all logs are processed. Assume that logs contain the Level field, which may be set to Error. If you need to calculate the number of times that logs of the Error level appear every minute, you can set the filter condition to Level=Error and count the number of logs that meet this condition. | |
Key | string | The name of the log field used for matching in the filter condition. | hostName |
Value | string | The field value to be matched in the filter condition. | portal |
Operator | string | The method that is used to match the field value. Valid values:
contain
notContain
> : greater than
< : less than
>= : greater than or equal to
<= : less than or equal to
| contain |
Tumblingwindows | array | The size of the tumbling window for calculation. Unit: seconds. The system performs an aggregation for each tumbling window. | |
| string | | 60 |
Groupbys | array | The dimension based on which the data is grouped. This parameter is equivalent to the GROUP BY clause in SQL statements. If no dimension is specified, all data is aggregated based on the aggregate function. | |
| string | | value |