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 Data Streams
    • All tutorials
    • Entering data into storage systems
    • Smart log processing
    • Transferring data within microservice architectures
    • Saving data to ClickHouse®
    • Replicating logs to Object Storage using Fluent Bit
    • Replicating logs to Object Storage using Data Streams
    • Migrating data to Yandex Object Storage using Yandex Data Transfer
    • Delivering data from Yandex Managed Service for Apache Kafka® using Yandex Data Transfer
    • Delivering data from an Data Streams queue to Managed Service for YDB
    • Delivering data to Yandex Managed Service for Apache Kafka® using Yandex Data Transfer
    • YDB change data capture and delivery to YDS
    • PostgreSQL change data capture and delivery to YDS
    • MySQL® change data capture and delivery to YDS
    • Streaming Yandex Cloud Postbox events to Yandex Data Streams and analyzing them using Yandex DataLens
    • Creating an interactive serverless application using WebSocket
    • Processing Audit Trails events
    • Processing CDC Debezium streams
    • Exporting audit logs to MaxPatrol SIEM
    • Searching for Yandex Cloud events in Yandex Query
  • Access management
  • Pricing policy
  • FAQ

In this article:

  • Getting started
  • Configure Audit Trails
  • Set up integration between Audit Trails and Query
  • Analytical queries to data in Object Storage
  • Streaming queries to data from Data Streams
  • See also
  1. Tutorials
  2. Processing Audit Trails events

Processing Yandex Audit Trails events

Written by
Yandex Cloud
Updated at May 7, 2025
  • Getting started
  • Configure Audit Trails
  • Set up integration between Audit Trails and Query
  • Analytical queries to data in Object Storage
  • Streaming queries to data from Data Streams
  • See also

Yandex Audit Trails is a service for collecting and exporting the audit logs of Yandex Cloud resources to various target systems, including Yandex Object Storage and Yandex Data Streams. Audit Trails and Yandex Query are integrated between themselves to enable searching through audit logs.

image

After audit logs are processed using Query, you can get such information as:

  • Who deleted a cloud folder.
  • Who added permissions to access the Yandex Compute Cloud VM serial console.
  • Who edited permissions to access an Object Storage bucket.
  • Who was granted administrator privileges.

You can find the preset queries for these use cases in this GitHub repository. You can also write custom YQL queries.

In this use case, you will create trails that will upload audit logs of all folder resources to an Object Storage bucket and send them to a Data Streams stream. Next, you will run analytical and streaming queries to the log data using Query.

Getting startedGetting started

Sign up in Yandex Cloud and create a billing account:

  1. Navigate to the management console and log in to Yandex Cloud or register a new account.
  2. On the Yandex Cloud Billing page, make sure you have a billing account linked and it has the ACTIVE or TRIAL_ACTIVE status. If you do not have a billing account, create one and link a cloud to it.

If you have an active billing account, you can navigate to the cloud page to create or select a folder for your infrastructure to operate in.

Learn more about clouds and folders.

Configure Audit TrailsConfigure Audit Trails

Create two trails:

  • To upload folder audit logs to an Object Storage bucket.
  • To send folder audit logs to a Data Streams stream.

Set up integration between Audit Trails and QuerySet up integration between Audit Trails and Query

To set up integration:

  1. Open the list of trails in the Yandex Cloud console.
  2. Select the trail that you previously created for uploading cloud audit logs to a bucket and click Process in YQ.
  3. When switching from Audit Trails to Query for the first time, set up integration:
    1. In the Query interface, select the service account you want to use to read data from Object Storage in the connection creation dialog and click Create.
    2. In the Query interface, check the preset parameters by clicking Preview in the binding creation dialog. Next, click Create to complete the integration.

This will automatically redirect you to the Audit trails panel of the Query interface.

Perform similar actions for the previously created trail that sends data to a Data Streams stream.

Analytical queries to data in Object StorageAnalytical queries to data in Object Storage

To query Audit Trails analytical data stored in Object Storage:

  1. Under Audit trails in the Query interface, select Analytical as the data analysis type. In the list of data bindings, select audit-trails-test-object_storage.
  2. Select a query to Object Storage data from the list and click Run.

You can do the following with analytical query results:

  • Download them through the Query UI by clicking Export.
  • Save them to an Object Storage bucket.
  • Get and process them via the Query HTTP API.

Streaming queries to data from Data StreamsStreaming queries to data from Data Streams

To query Audit Trails streaming data transferred through Data Streams:

  1. Under Audit trails in the Yandex Query interface, select Streaming as the data analysis type. In the list of data bindings, select the one you need.
  2. Select a query to Object Storage data from the list and click Run.

You can do the following with streaming query results:

  • Send them to Yandex Monitoring as metrics.
  • Send them to an output Data Streams stream as data and then process the data using Yandex Cloud Functions triggers.

See alsoSee also

  • Yandex Object Storage.
  • Yandex Data Streams.
  • Yandex DataLens.

Was the article helpful?

Previous
Creating an interactive serverless application using WebSocket
Next
Overview
© 2025 Direct Cursus Technology L.L.C.