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

Managed Service for Redis API, REST: Cluster.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-redis/v1/clusters/{clusterId}:stream_logs

Path parameters

Parameter Description
clusterId

Required. Required. ID of the Redis cluster.

The maximum string length in characters is 50.

Query parameters

Parameter Description
columnFilter

Columns from logs table to get in the response.

serviceType
  • REDIS: Logs of Redis activity.
fromTime

Start timestamp for the logs request.

String in RFC3339 text format. The range of possible values is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

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. The range of possible values is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

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.hostname] field
  2. An = operator.
  3. The value in double quotes ("). Must be 3-63 characters long and match the regular expression [a-z][-a-z0-9]{1,61}[a-z0-9]. Examples of a filter message.hostname='node1.db.cloud.yandex.net'.

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. The range of possible values is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

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
Проект Яндекса
© 2023 ООО «Яндекс.Облако»
В этой статье:
  • HTTP request
  • Path parameters
  • Query parameters
  • Response