Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Managed Service for MongoDB
  • Getting started
  • Access management
  • Terraform reference
    • Authentication with the API
      • Overview
        • Overview
        • Get
        • List
        • Create
        • Update
        • Delete
        • Start
        • Stop
        • Move
        • Backup
        • Restore
        • RescheduleMaintenance
        • ListLogs
        • StreamLogs
        • ListOperations
        • ListBackups
        • ListHosts
        • AddHosts
        • DeleteHosts
        • UpdateHosts
        • EnableSharding
        • GetShard
        • ListShards
        • AddShard
        • DeleteShard
        • ResetupHosts
        • RestartHosts
        • StepdownHosts
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes

In this article:

  • gRPC request
  • ListClusterLogsRequest
  • ListClusterLogsResponse
  • LogRecord
  1. API reference
  2. gRPC
  3. Cluster
  4. ListLogs

Managed Service for MongoDB API, gRPC: ClusterService.ListLogs

Written by
Yandex Cloud
Improved by
Tania L.
Updated at February 21, 2025
  • gRPC request
  • ListClusterLogsRequest
  • ListClusterLogsResponse
  • LogRecord

Retrieves logs for the specified MongoDB cluster.

gRPC requestgRPC request

rpc ListLogs (ListClusterLogsRequest) returns (ListClusterLogsResponse)

ListClusterLogsRequestListClusterLogsRequest

{
  "cluster_id": "string",
  "column_filter": [
    "string"
  ],
  "service_type": "ServiceType",
  "from_time": "google.protobuf.Timestamp",
  "to_time": "google.protobuf.Timestamp",
  "page_size": "int64",
  "page_token": "string"
}

Field

Description

cluster_id

string

Required field. ID of the MongoDB cluster to request logs for.
To get the MongoDB cluster ID use a ClusterService.List request.

column_filter[]

string

Columns from the logs table to request.
If no columns are specified, entire log records are returned.

service_type

enum ServiceType

Type of the service to request logs about.

  • SERVICE_TYPE_UNSPECIFIED
  • MONGOD: Logs of MongoDB activity.
  • MONGOS
  • MONGOCFG
  • AUDIT

from_time

google.protobuf.Timestamp

Start timestamp for the logs request, in RFC3339 text format.

to_time

google.protobuf.Timestamp

End timestamp for the logs request, in RFC3339 text format.

page_size

int64

The maximum number of results per page to return. If the number of available
results is larger than page_size, the service returns a ListClusterLogsResponse.next_page_token
that can be used to get the next page of results in subsequent list requests.
Acceptable values are 0 to 1000, inclusive. Default value: 100.

page_token

string

Page token. To get the next page of results, set page_token to the
ListClusterLogsResponse.next_page_token returned by the previous list request.

ListClusterLogsResponseListClusterLogsResponse

{
  "logs": [
    {
      "timestamp": "google.protobuf.Timestamp",
      "message": "map<string, string>"
    }
  ],
  "next_page_token": "string"
}

Field

Description

logs[]

LogRecord

Requested log records.

next_page_token

string

This token allows you to get the next page of results for list requests. If the number of results
is larger than ListClusterLogsRequest.page_size, use the next_page_token as the value
for the ListClusterLogsRequest.page_token query parameter in the next list request.
Each subsequent list request will have its own next_page_token to continue paging through the results.
This value is interchangeable with next_record_token from StreamLogs method.

LogRecordLogRecord

Field

Description

timestamp

google.protobuf.Timestamp

Log record timestamp in RFC3339 text format.

message

object (map<string, string>)

Contents of the log record.

Was the article helpful?

Previous
RescheduleMaintenance
Next
StreamLogs
Yandex project
© 2025 Yandex.Cloud LLC