Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Solutions
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Managed Service for ClickHouse
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Information about existing clusters
    • Creating clusters
    • Connecting to databases
    • Stop and start the cluster
    • SQL queries in the management console
    • Changing cluster and database settings
    • Connecting to DataLens
    • Connecting external dictionaries
    • Adding your own geobase
    • Enabling machine learning models
    • Changing ClickHouse versions
    • Managing ClickHouse hosts
    • Adding ZooKeeper hosts
    • Database management
    • Managing database users
    • Managing backups
    • How to manage shards
    • Deleting clusters
  • Solutions
    • Adding data to the database
    • Sharding tables
  • Concepts
    • Relationship between service resources
    • Host classes
    • Network in Yandex Managed Service for ClickHouse
    • Quotas and limits
    • Storage types
    • Backups
    • Replication
    • Dictionaries
    • Sharding
    • Supported clients
  • Access management
  • Pricing policy
    • Current pricing policy
    • Archive
      • Before January 1, 2019
      • From January 1 to March 1, 2019
      • From March 1, 2019 to February 1, 2020
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • BackupService
      • ClusterService
      • DatabaseService
      • FormatSchemaService
      • MlModelService
      • ResourcePresetService
      • UserService
      • VersionsService
      • OperationService
    • REST
      • Overview
      • Backup
        • Overview
        • get
        • list
      • Cluster
        • Overview
        • addHosts
        • addShard
        • addZookeeper
        • backup
        • create
        • createExternalDictionary
        • createShardGroup
        • delete
        • deleteExternalDictionary
        • deleteHosts
        • deleteShard
        • deleteShardGroup
        • get
        • getShard
        • getShardGroup
        • list
        • listBackups
        • listHosts
        • listLogs
        • listOperations
        • listShardGroups
        • listShards
        • move
        • rescheduleMaintenance
        • restore
        • start
        • stop
        • streamLogs
        • update
        • updateShard
        • updateShardGroup
      • Database
        • Overview
        • create
        • delete
        • get
        • list
      • FormatSchema
        • Overview
        • create
        • delete
        • get
        • list
        • update
      • MlModel
        • Overview
        • create
        • delete
        • get
        • list
        • update
      • ResourcePreset
        • Overview
        • get
        • list
      • User
        • Overview
        • create
        • delete
        • get
        • grantPermission
        • list
        • revokePermission
        • update
      • Versions
        • Overview
        • list
      • Operation
        • Overview
        • get
  • Questions and answers
    • General questions
    • Questions about ClickHouse
    • All questions on the same page
  1. API reference
  2. REST
  3. Cluster
  4. streamLogs

Method streamLogs

  • 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-clickhouse/v1/clusters/{clusterId}:stream_logs

Path parameters

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

Query parameters

Parameter Description
columnFilter Columns from logs table to get in the response.
serviceType
  • CLICKHOUSE: Logs of ClickHouse activity.
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 recordToken to the nextRecordToken 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. A conditional operator. Can be either = or != for single values, IN or NOT IN for lists of values. 3. The value. 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 ('Error', 'Fatal') AND message.hostname != 'node2.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.

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 the recordToken parameter in the next StreamLogs request. This value is interchangeable with the nextPageToken from ListLogs method.

In this article:
  • HTTP request
  • Path parameters
  • Query parameters
  • Response
Language / Region
Careers
Privacy policy
Terms of use
Brandbook
© 2021 Yandex.Cloud LLC