Yandex Cloud
  • Сервисы
  • Решения
  • Почему Yandex Cloud
  • Сообщество
  • Тарифы
  • Документация
  • Связаться с нами
Подключиться
Language / Region
© 2022 ООО «Яндекс.Облако»
Yandex Managed Service for MongoDB
  • Начало работы
  • Пошаговые инструкции
    • Все инструкции
    • Информация об имеющихся кластерах
    • Создание кластера
    • Подключение к базе данных
      • Обзор способов подключения к базе данных
      • Подключение к нешардированному кластеру
      • Подключение к шардированному кластеру
    • Остановка и запуск кластера
    • Изменение настроек кластера и базы данных
    • Переключение первичной реплики
    • Обновление версии MongoDB
    • Управление базами данных
    • Управление хостами кластера
    • Управление пользователями БД
    • Управление резервными копиями
    • Управление шардами
    • Просмотр логов кластера
    • Удаление кластера
    • Мониторинг состояния кластера и хостов
    • Диагностика производительности
    • Инструменты для анализа производительности
  • Практические руководства
    • Шардирование коллекций
    • Миграция данных в Managed Service for MongoDB
    • Перенос коллекций из MongoDB в Managed Service for MongoDB
    • Анализ производительности и оптимизация
  • Концепции
    • Взаимосвязь ресурсов сервиса
    • Классы хостов
      • Действующие классы хостов
      • Архив
        • До 1 июня 2020 года
      • Использование устаревших классов хостов
    • Сеть в Managed Service for MongoDB
    • Квоты и лимиты
    • Хранилище в Managed Service for MongoDB
    • Резервные копии
    • Репликация
    • Шардирование
    • Пользователи и роли
    • Техническое обслуживание
    • Поддерживаемые клиенты
    • Настройки MongoDB
  • Управление доступом
  • Правила тарификации
    • Действующие правила
    • Архив
      • До 1 января 2019 года
      • С 1 января до 1 марта 2019 года
      • С 1 марта 2019 года до 1 февраля 2020 года
  • Справочник API
    • Аутентификация в API
    • gRPC (англ.)
      • Overview
      • BackupService
      • ClusterService
      • DatabaseService
      • ResourcePresetService
      • UserService
      • OperationService
    • REST (англ.)
      • Overview
      • Backup
        • Overview
        • delete
        • get
        • list
      • Cluster
        • Overview
        • addHosts
        • addShard
        • backup
        • create
        • delete
        • deleteHosts
        • deleteShard
        • enableSharding
        • get
        • getShard
        • list
        • listBackups
        • listHosts
        • listLogs
        • listOperations
        • listShards
        • move
        • rescheduleMaintenance
        • resetupHosts
        • restartHosts
        • restore
        • start
        • stepdownHosts
        • stop
        • streamLogs
        • update
      • Database
        • Overview
        • create
        • delete
        • get
        • list
      • ResourcePreset
        • Overview
        • get
        • list
      • User
        • Overview
        • create
        • delete
        • get
        • grantPermission
        • list
        • revokePermission
        • update
      • Operation
        • Overview
        • get
  • История изменений
  • Вопросы и ответы
    • Общие вопросы
    • Вопросы о MongoDB
    • Все вопросы на одной странице
  1. Справочник API
  2. REST (англ.)
  3. Cluster
  4. streamLogs

Method streamLogs

Статья создана
Yandex Cloud
  • HTTP request
  • Path parameters
  • Query parameters
  • Response

Same as ListLogs but using server-side streaming. Also allows for 'tail -f' semantics.

HTTP request

GET https://mdb.api.cloud.yandex.net/managed-mongodb/v1/clusters/{clusterId}:stream_logs

Path parameters

Parameter Description
clusterId Required. Required. ID of the MongoDB cluster. The maximum string length in characters is 50.

Query parameters

Parameter Description
columnFilter Columns from logs table to get in the response.
serviceType
  • MONGOD: Logs of MongoDB activity.
  • AUDIT: MongoDB Enterprise audit logs
fromTime Start timestamp for the logs request. String in RFC3339 text format.
toTime End timestamp for the logs request. If this field is not set, all existing logs will be sent and then the new ones as they appear. In essence it has 'tail -f' semantics. String in RFC3339 text format.
recordToken Record token. Set record_token to the next_record_token returned by a previous StreamLogs request to start streaming from next log record. The maximum string length in characters is 100.
filter A filter expression that filters resources listed in the response. The expression must specify: 1. The field name. Currently filtering can be applied to the [LogRecord.logs.message.hostname], [LogRecord.logs.message.severity] fields. 2. An = operator. 3. The value in double quotes ("). Must be 1-63 characters long and match the regular expression [a-z0-9.-]{1,61}. Examples of a filter: message.hostname='node1.db.cloud.yandex.net', message.severity IN ('E', 'F') The maximum string length in characters is 1000.

Response

HTTP Code: 200 - OK

{
  "record": {
    "timestamp": "string",
    "message": "object"
  },
  "nextRecordToken": "string"
}
Field Description
record object

One of the requested log records.

record.
timestamp
string (date-time)

Log record timestamp in RFC3339 text format.

String in RFC3339 text format.

record.
message
object

Contents of the log record.

nextRecordToken string

This token allows you to continue streaming logs starting from the exact same record. To continue streaming, specify value of next_record_token as value for record_token parameter in the next StreamLogs request. This value is interchangeable with next_page_token from ListLogs method.

Была ли статья полезна?

Language / Region
© 2022 ООО «Яндекс.Облако»
В этой статье:
  • HTTP request
  • Path parameters
  • Query parameters
  • Response