Skip to Content

Retrieve Cluster Node Logs - GetUMongoDBLog

Overview

Query error logs or slow query logs of cluster nodes within a specific time period

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is GetUMongoDBLog.Yes
PublicKeystringThe user’s public key can be obtained from Console Yes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See Region and Availability Zone ListYes
ZonestringAvailability Zone. See Availability Zone ListNo
ProjectIdstringProject ID. Leave blank for the default project; sub-accounts must fill this in. Please refer to GetProjectList APINo
ClusterIdstringCluster IDYes
NodeIdstringNode ID, slow log mongos node not selectableYes
BeginintThe timestamp (Unix Timestamp) when the queried log starts. For real-time queries, this parameter should be the timestamp from the last polling request, and the backend will return the log content from this value to the current time.Yes
LogTypestringLog Type: SlowLog, ErrorLogYes
EndintThe end timestamp (Unix Timestamp) for querying logs. For real-time queries, this value is not passed, and the difference with BeginTime should not exceed 24 hours: (EndTime-BeginTime) < 246060No

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
LogstringThe retrieved log content, a segment of plain textYes
MaxLineintMaximum Supported RowsNo
IsTruncatebooleanHas it been truncatedNo

Example

Request Example

https://api.genesissai.com/?Action=GetUMongoDBLog &Region=cn-zj &Zone=cn-zj-01 &ProjectId=RNIPzEei &NodeId=lWaoAKsr &Begin=4 &LogType=cSfGujbe &End=6 &ClusterId=ZTYDWNOp

Response Example

{ "Action": "GetUMongoDBLogResponse", "IsTruncate": true, "Log": "nZKlllSk", "MaxLine": 1, "NextTime": "auUFaISM", "RetCode": 0 }