All Products
Search
Document Center

Cloud Monitor:DescribeLogMonitorAttribute

Last Updated:Oct 30, 2025

Queries the details of a Log Monitoring task.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

MetricName

string

Yes

The name of the metric.

cpu_total_******

Response elements

Element

Type

Description

Example

object

Code

string

The status code.

Note

A status code of 200 indicates a successful request.

200

Message

string

The returned message.

The specified resource is not found.

RequestId

string

The request ID.

C6718537-E673-4A58-8EE1-24B8B38C7AAE

Success

boolean

Indicates whether the operation was successful. Valid values:

  • true: The operation was successful.

  • false: The operation failed.

true

LogMonitor

object

The details of the Log Monitoring task.

ValueFilterRelation

string

The logical operator for the filter conditions. This parameter is used with `ValueFilter`. Valid values:

  • and: The logical AND operator.

  • or: The logical OR operator.

and

SlsLogstore

string

The name of the Simple Log Service Logstore.

logstore_******

MetricName

string

The name of the metric.

cpu_total_******

GroupId

integer

The ID of the application group.

123******

LogId

integer

The ID of the Log Monitoring task.

123******

MetricExpress

string

The metric expression.

{}

SlsRegionId

string

The ID of the region where Simple Log Service resides.

cn-hangzhou

GmtCreate

integer

The time when the task was created.

This value is a UNIX timestamp that represents the number of milliseconds that have elapsed since January 1, 1970.

1678440033000

SlsProject

string

The name of the Simple Log Service project.

project_******

Aggregates

array<object>

The definitions of aggregations.

object

The definition of an aggregation.

Max

string

The maximum value.

0

Min

string

The minimum value.

0

Function

string

The function that is used to aggregate log data in a statistical period. Valid values:

  • count: Counts the number of logs.

  • sum: Calculates the sum of values in a field.

  • avg: Calculates the average of values in a field.

  • max: Selects the maximum value in a field.

  • min: Selects the minimum value in a field.

  • countps: Calculates the average number of logs that are generated per second in a statistical period.

  • sumps: Calculates the average sum of values in a field per second in a statistical period.

  • distinct: Counts the number of unique values in a field in a statistical period.

count

Alias

string

The alias of the field.

alias_******

FieldName

string

The original name of the field in the log.

field_******

ValueFilter

array<object>

The filter conditions. This parameter is used with `ValueFilterRelation`. This parameter is equivalent to the `WHERE` clause in an SQL statement.

If you do not specify this parameter, all data is processed. For example, if a log contains a `Level` field and you want to count the number of logs where the value of `Level` is `Error`, you can set the aggregation function to `count` and specify a filter condition where `Level` equals `Error`.

object

The filter condition.

Key

string

The key.

key_******

Value

string

The value.

value_******

Operator

string

The operator that is used to match the field value. Valid values:

  • contain: contains.

  • notContain: does not contain.

  • >: greater than.

  • <: less than.

  • >=: greater than or equal to.

  • <=: less than or equal to.

contain

Tumblingwindows

array

The pre-aggregation window. Unit: seconds. Cloud Monitor aggregates data in the specified pre-aggregation window.

string

The pre-aggregation window. Unit: seconds. Cloud Monitor aggregates data in the specified pre-aggregation window.

60

Groupbys

array

The dimension based on which log data is aggregated. This parameter is equivalent to the `GROUP BY` clause in an SQL statement. You can specify a dimension to group monitoring data. If you do not specify this parameter, all monitoring data is aggregated based on the aggregation method.

string

The `group by` definition

userId

Examples

Success response

JSON format

{
  "Code": "200",
  "Message": "The specified resource is not found.",
  "RequestId": "C6718537-E673-4A58-8EE1-24B8B38C7AAE",
  "Success": true,
  "LogMonitor": {
    "ValueFilterRelation": "and",
    "SlsLogstore": "logstore_******",
    "MetricName": "cpu_total_******",
    "GroupId": 0,
    "LogId": 0,
    "MetricExpress": "{}",
    "SlsRegionId": "cn-hangzhou",
    "GmtCreate": 1678440033000,
    "SlsProject": "project_******",
    "Aggregates": [
      {
        "Max": "0",
        "Min": "0",
        "Function": "count",
        "Alias": "alias_******",
        "FieldName": "field_******"
      }
    ],
    "ValueFilter": [
      {
        "Key": "key_******",
        "Value": "value_******",
        "Operator": "contain"
      }
    ],
    "Tumblingwindows": [
      "60"
    ],
    "Groupbys": [
      "userId"
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 ParameterInvalid Illegal parameters.
500 InternalError The request processing has failed due to some unknown error.
403 AccessForbidden User not authorized to operate on the specified resource.
404 ResourceNotFound The specified resource is not found. The specified resource is not found.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.