All Products
Search
Document Center

CloudMonitor:DescribeLogMonitorList

Last Updated:Mar 01, 2024

Queries log monitoring metrics.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
PageNumberintegerNo

The number of the page to return.

1
PageSizeintegerNo

The number of entries to return on each page. Default value: 10

10
SearchValuestringNo

The keyword that is used to search for log monitoring metrics. Fuzzy match is supported.

test
GroupIdlongNo

The ID of the application group.

123456

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

01E90080-4300-4FAA-B9AE-161956BC350D
Successboolean

Indicates whether the call was successful. Valid values:

  • true: The call was successful.
  • false: The call failed.
true
Codestring

The HTTP status code.

Note The status code 200 indicates that the call was successful.
200
Messagestring

The returned message.

successful
PageSizeinteger

The number of entries returned on each page.

10
PageNumberinteger

The number of the returned page.

1
Totallong

The total number of the returned entries.

15
LogMonitorListobject []

The log monitoring metrics.

ValueFilterRelationstring

The logical operator that is used between log filter conditions. The ValueFilter and ValueFilterRelation parameters are used in pair. Valid values:

  • and
  • or
and
SlsLogstorestring

The name of the Log Service Logstore.

testSlS****
MetricNamestring

The name of the log monitoring metric. For more information, see Appendix 1: Metrics.

cpu_total
GroupIdlong

The ID of the application group.

12345
LogIdlong

The ID returned by Log Service.

12345
SlsRegionIdstring

The ID of the region where the Log Service Logstore resides.

cn-hangzhou
GmtCreatelong

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.

1577766395000
SlsProjectstring

The name of the Log Service project.

sls-project-test****
ValueFilterobject []

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.

Keystring

The name of the log field used for matching in the filter condition.

hostName
Valuestring

The field value to be matched in the filter condition.

portal
Operatorstring

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

Examples

Sample success responses

JSONformat

{
  "RequestId": "01E90080-4300-4FAA-B9AE-161956BC350D",
  "Success": true,
  "Code": "200",
  "Message": "successful",
  "PageSize": 10,
  "PageNumber": 1,
  "Total": 15,
  "LogMonitorList": [
    {
      "ValueFilterRelation": "and",
      "SlsLogstore": "testSlS****",
      "MetricName": "cpu_total",
      "GroupId": 12345,
      "LogId": 12345,
      "SlsRegionId": "cn-hangzhou",
      "GmtCreate": 1577766395000,
      "SlsProject": "sls-project-test****",
      "ValueFilter": [
        {
          "Key": "hostName",
          "Value": "portal",
          "Operator": "contain"
        }
      ]
    }
  ]
}

Error codes

HTTP status codeError codeError messageDescription
400ParameterInvalidIllegal parameters.-
403AccessForbiddenUser not authorized to operate on the specified resource.-
404ResourceNotFoundThe specified resource is not found.The specified resource is not found.
500InternalErrorThe request processing has failed due to some unknown error.-

For a list of error codes, visit the Service error codes.