Modifies the metrics of a Simple Log Service (SLS) log monitoring task.
Operation description
This topic provides an example on how to change the collection interval of the SLS log monitoring task 36**** to 15 seconds. The response shows that the metric is modified.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cms:ModifyHybridMonitorTask |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| TaskId |
string |
Yes |
The monitoring task ID. For information about how to obtain the monitoring task ID, see DescribeHybridMonitorTaskList. |
36**** |
| TaskName |
string |
No |
The monitoring task name. For information about how to obtain the monitoring task ID, see DescribeHybridMonitorTaskList. |
SLS_task |
| Description |
string |
No |
The description of the monitoring task. |
SLS log monitoring data |
| CollectInterval |
string |
No |
The collection interval of the metric. Valid values:
Unit: seconds. |
15 |
| AttachLabels |
array<object> |
No |
The labels of the metric. |
|
|
object |
No |
None. |
||
| Value |
string |
No |
The label value of the metric. |
testValue |
| Name |
string |
No |
The label key of the metric. |
app_service |
| SLSProcessConfig |
object |
No |
The SLS log configuration. |
|
| Filter |
object |
No |
The filter conditions for parameters in the SLS log. |
|
| Relation |
string |
No |
The relationship between multiple filter conditions. Valid values:
|
and |
| Filters |
array<object> |
No |
None. |
|
|
object |
No |
None. |
||
| SLSKeyName |
string |
No |
The name of the parameter to filter in the SLS log. |
code |
| Operator |
string |
No |
The method used to filter parameter values in the SLS log. Valid values:
Valid values:
|
= |
| Value |
string |
No |
The filter value of the parameter in the SLS log. |
200 |
| Statistics |
array<object> |
No |
None. |
|
|
object |
No |
None. |
||
| SLSKeyName |
string |
No |
The name of the parameter for SLS log statistics. |
name |
| Function |
string |
No |
The statistical method used to aggregate log data within a statistical period. Valid values:
|
count |
| Alias |
string |
No |
The alias of the SLS log statistics result. |
level_count |
| Parameter1 |
string |
No |
The statistical value of the SLS log.
|
200 |
| Parameter2 |
string |
No |
The statistical value of the SLS log. Note
This parameter is required only when |
299 |
| GroupBy |
array<object> |
No |
The spatial dimension used to aggregate data, which is equivalent to the GROUP BY clause in SQL. |
|
|
object |
No |
None. |
||
| SLSKeyName |
string |
No |
The name of the parameter for SLS log statistics. |
code |
| Alias |
string |
No |
The alias of the SLS log statistics result. |
ApiResult |
| Express |
array<object> |
No |
The arithmetic result of the extended fields for the SLS log statistics result. |
|
|
object |
No |
None. |
||
| Express |
string |
No |
The arithmetic result of the extended fields for the SLS log statistics result. |
success_count |
| Alias |
string |
No |
The alias of the arithmetic result of the extended fields for the SLS log statistics result. |
SuccRate |
For more information about common request parameters, see Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
None. |
||
| Code |
string |
The status code. Note
200 indicates success. |
200 |
| Message |
string |
The error message. |
Invalid.SLSConfig |
| RequestId |
string |
The request ID. |
11145B76-566A-5D80-A8A3-FAD98D310079 |
| Success |
string |
Indicates whether the operation was successful. Valid values:
|
true |
Examples
Success response
JSON format
{
"Code": "200",
"Message": "Invalid.SLSConfig",
"RequestId": "11145B76-566A-5D80-A8A3-FAD98D310079",
"Success": "true"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | %s | %s | |
| 500 | %s | %s | |
| 500 | InternalError | %s | |
| 403 | %s | %s | |
| 404 | %s | %s |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.