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 MetaData Hub
    • All guides
      • Creating a Metastore cluster
      • Configuring security groups
      • Connecting Yandex Data Processing to Metastore
      • Exporting and importing a Metastore cluster
      • Connecting to a Yandex Object Storage bucket with a bucket policy
      • Transferring logs from Metastore to Cloud Logging
      • Deleting a Metastore cluster
  • Audit Trails events
  • Pricing policy
  • Troubleshooting
  • Public materials
  • Release notes

In this article:

  • Getting started
  • Transferring data to the default log group
  • Sending data to a custom log group
  1. Step-by-step guides
  2. Hive Metastore
  3. Transferring logs from Metastore to Cloud Logging

Transferring Metastore cluster logs to Yandex Cloud Logging

Written by
Yandex Cloud
Updated at March 6, 2025
  • Getting started
  • Transferring data to the default log group
  • Sending data to a custom log group

You can set up regular collection of Metastore cluster performance logs. Logs will be delivered to a log group in Yandex Cloud Logging. You can choose between these two types of log groups:

  • Log group used by default in the cluster folder.
  • Custom log group.

Getting startedGetting started

  1. Create a service account named metastore-logging-sa.
  2. Assign the managed-metastore.integrationProvider role to the service account.
  3. Set up a NAT gateway in the subnet the cluster will connect to. This will enable the cluster to work with Yandex Cloud services.
  4. Configure the security group.

Transferring data to the default log groupTransferring data to the default log group

  1. Create a Metastore cluster:

    Management console
    1. In the management console, select the appropriate folder.

    2. Select Yandex MetaData Hub.

    3. In the left-hand panel, select the Metastore page.

    4. Click Create cluster.

    5. Specify metastore-cluster as the cluster name.

    6. In the Service account field, select metastore-logging-sa.

    7. Under Network settings, select the network and subnet with a NAT gateway configured. Specify the security group you configured.

    8. Under Logging:

      1. Enable Write logs.

      2. To write logs to the default log group, select Folder in the Destination field.

      3. Specify the folder whose log group you want to be using.

      4. Select the minimum logging level.

        Logs of the specified level and higher will be written to the execution log. The available levels are TRACE, DEBUG, INFO, WARN, ERROR, and FATAL. The default level is INFO.

    9. Click Create.

  2. Test the transfer of cluster logs to the log group.

    Management console
    CLI
    API
    1. In the management console, go to the relevant folder.
    2. Select Cloud Logging.
    3. Click the row with the default log group.

    The page that opens will show the log group records.

    To view the records in JSON format, run the command:

    yc logging read --group-name=default --format=json
    

    Result:

    [
      {
        "uid": "23:6d******:3",
        "resource": {
          "type": "managed-metastore.cluster",
          "id": "c9qcv46p3g3a********"
        },
        "timestamp": "2024-11-18T09:45:23.092484Z",
        "ingested_at": "2024-11-18T09:45:24Z",
        "saved_at": "2024-11-18T09:45:25.559195Z",
        "level": "INFO",
        "message": "ugi=metastore\tip=10.253.89.135\tcmd=Done cleaning up thread local RawStore\t",
        "json_payload": {
          "instance": "metastore-server-5f9c7ff***-*****",
          "logger": "org.apache.hadoop.hive.metastore.HiveMetaStore.audit",
          "resource_id": "c9qcv46p3g3a********",
          "stream_name": "metastore-server",
          "thread": "pool-6-thread-79"
        },
        "stream_name": "metastore-server"
      }
    ]
    

    To view log group records, use the LogReadingService.Read gRPC API call.

    For more information, see Reading records.

Sending data to a custom log groupSending data to a custom log group

  1. Create a log group named metastore-log-group.

  2. Create a Metastore cluster:

    Management console
    1. In the management console, select the appropriate folder.

    2. Select Yandex MetaData Hub.

    3. In the left-hand panel, select the Metastore page.

    4. Click Create cluster.

    5. Specify metastore-cluster as the cluster name.

    6. In the Service account field, select metastore-logging-sa.

    7. Under Network settings, select the network and subnet with a NAT gateway configured. Specify the security group you configured.

    8. Under Logging:

      1. Enable Write logs.

      2. To write logs to a custom log group, select Log group in the Destination field.

      3. Specify the log group, metastore-log-group.

      4. Select the minimum logging level.

        Logs of the specified level and higher will be written to the execution log. The available levels are TRACE, DEBUG, INFO, WARN, ERROR, and FATAL. The default level is INFO.

    9. Click Create.

  3. Test the transfer of cluster logs to the log group.

    Management console
    CLI
    API
    1. In the management console, go to the relevant folder.
    2. Select Cloud Logging.
    3. Click the row with the metastore-log-group log group.

    The page that opens will show the log group records.

    To view the records in JSON format, run the command:

    yc logging read --group-name=metastore-log-group --format=json
    

    Result:

    [
      {
        "uid": "23:6d******:3",
        "resource": {
          "type": "managed-metastore.cluster",
          "id": "c9qcv46p3g3a********"
        },
        "timestamp": "2024-11-18T09:45:23.092484Z",
        "ingested_at": "2024-11-18T09:45:24Z",
        "saved_at": "2024-11-18T09:45:25.559195Z",
        "level": "INFO",
        "message": "ugi=metastore\tip=10.253.89.135\tcmd=Done cleaning up thread local RawStore\t",
        "json_payload": {
          "instance": "metastore-server-5f9c7ff***-*****",
          "logger": "org.apache.hadoop.hive.metastore.HiveMetaStore.audit",
          "resource_id": "c9qcv46p3g3a********",
          "stream_name": "metastore-server",
          "thread": "pool-6-thread-79"
        },
        "stream_name": "metastore-server"
      }
    ]
    

    To view log group records, use the LogReadingService.Read gRPC API call.

    For more information, see Reading records.

Was the article helpful?

Previous
Connecting to a Yandex Object Storage bucket with a bucket policy
Next
Deleting a Metastore cluster
Yandex project
© 2025 Yandex.Cloud LLC