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
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Managed Service for OpenSearch
  • Getting started
    • All guides
    • User management
      • Viewing cluster logs
      • Monitoring the state of clusters and hosts
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes
  • FAQ

In this article:

  • Getting a cluster log
  • Getting a cluster log stream
  1. Step-by-step guides
  2. Logs and monitoring
  3. Viewing cluster logs

Viewing OpenSearch cluster logs

Written by
Yandex Cloud
Updated at December 4, 2024
  • Getting a cluster log
  • Getting a cluster log stream

Managed Service for OpenSearch allows you to get a cluster log snippet for the selected period and view logs in real time.

Getting a cluster logGetting a cluster log

REST API
gRPC API
  1. Get an IAM token for API authentication and put it into the environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Use the Cluster.ListLogs method and make a request, e.g., via cURL:

    curl \
        --request GET \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --url 'https://mdb.api.cloud.yandex.net/managed-opensearch/v1/clusters/<cluster_ID>:logs' \
        --url-query serviceType=<host_group_type> \
        --url-query columnFilter=<column_list> \
        --url-query fromTime=<time_range_left_boundary> \
        --url-query toTime=<time_range_right_boundary>
    

    Where:

    • serviceType: Type of hosts you need the records for, OPENSEARCH or DASHBOARDS.

    • columnFilter: List of data columns: The list of data columns depends on the selected type of hosts, i.e. serviceType:

      • For OpenSearch hosts:

        • component: Cluster component the log entry refers to.
        • hostname: Host name.
        • level: Logging level.
        • message: Message output by the service.
      • For Dashboards hosts:

        • hostname: Host name.
        • message: Message output by the service.
    • fromTime: Left boundary of a time range in RFC-3339 format, Example: 2024-09-18T15:04:05Z.

    • toTime: Right boundary of a time range, the format is the same as for fromTime.

    You can get the cluster ID with a list of clusters in the folder.

  3. View the server response to make sure the request was successful.

  1. Get an IAM token for API authentication and put it into the environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Clone the cloudapi repository:

    cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapi
    

    Below, we assume the repository contents are stored in the ~/cloudapi/ directory.

  3. Use the ClusterService.ListLogs call and make a request, e.g., via gRPCurl:

    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/opensearch/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d '{
              "cluster_id": "<cluster_ID>",
              "service_type": "<host_group_type>",
              "column_filter": [
                "<column_1>", "<column_2>", ..., "<column_N>"
              ],
              "from_time": "<time_range_left_boundary>",
              "to_time": "<time_range_right_boundary>"
            }' \
        mdb.api.cloud.yandex.net:443 \
        yandex.cloud.mdb.opensearch.v1.ClusterService.ListLogs
    

    Where:

    • service_type: Type of hosts you need the records for, OPENSEARCH or DASHBOARDS.

    • column_filter: List of data columns: The list of data columns depends on the selected type of hosts, i.e. service_type:

      • For OpenSearch hosts:

        • component: Cluster component the log entry refers to.
        • hostname: Host name.
        • level: Logging level.
        • message: Message output by the service.
      • For Dashboards hosts:

        • hostname: Host name.
        • message: Message output by the service.
    • from_time: Left boundary of a time range in RFC-3339 format, e.g., 2024-09-18T15:04:05Z.

    • to_time: Right boundary of a time range, the format is the same as for from_time.

    You can get the cluster ID with a list of clusters in the folder.

  4. View the server response to make sure the request was successful.

Getting a cluster log streamGetting a cluster log stream

This method allows you to get cluster logs in real time.

REST API
gRPC API
  1. Get an IAM token for API authentication and put it into the environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Use the Cluster.StreamLogs method and make a request, e.g., via cURL:

    curl \
        --request GET \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --url 'https://mdb.api.cloud.yandex.net/managed-opensearch/v1/clusters/<cluster_ID>:stream_logs' \
        --url-query serviceType=<host_group_type> \
        --url-query columnFilter=<column_list>
    

    Where:

    • serviceType: Type of hosts you need the records for, OPENSEARCH or DASHBOARDS.

    • columnFilter: List of data columns: The list of data columns depends on the selected type of hosts, i.e. serviceType:

      • For OpenSearch hosts:

        • component: Cluster component the log entry refers to.
        • hostname: Host name.
        • level: Logging level.
        • message: Message output by the service.
      • For Dashboards hosts:

        • hostname: Host name.
        • message: Message output by the service.

    You can get the cluster ID with a list of clusters in the folder.

  3. View the server response to make sure the request was successful.

    Once you run the command, it does not terminate. The command output displays new logs in real time.

  1. Get an IAM token for API authentication and put it into the environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Clone the cloudapi repository:

    cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapi
    

    Below, we assume the repository contents are stored in the ~/cloudapi/ directory.

  3. Use the ClusterService.StreamLogs call and make a request, e.g., via gRPCurl:

    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/opensearch/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d '{
              "cluster_id": "<cluster_ID>",
              "service_type": "<host_group_type>",
              "column_filter": [
                "<column_1>", "<column_2>", ..., "<column_N>"
              ]
            }' \
        mdb.api.cloud.yandex.net:443 \
        yandex.cloud.mdb.opensearch.v1.ClusterService.StreamLogs
    

    Where:

    • service_type: Type of hosts you need the records for, OPENSEARCH or DASHBOARDS.

    • column_filter: List of data columns: The list of data columns depends on the selected type of hosts, i.e. service_type:

      • For OpenSearch hosts:

        • component: Cluster component the log entry refers to.
        • hostname: Host name.
        • level: Logging level.
        • message: Message output by the service.
      • For Dashboards hosts:

        • hostname: Host name.
        • message: Message output by the service.

    You can get the cluster ID with a list of clusters in the folder.

  4. View the server response to make sure the request was successful.

    Once you run the command, it does not terminate. The command output displays new logs in real time.

Was the article helpful?

Previous
User management
Next
Monitoring the state of clusters and hosts
© 2025 Direct Cursus Technology L.L.C.