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 Object Storage
    • All tutorials
    • Getting statistics on object queries with S3 Select
    • Getting website traffic statistics with S3 Select
    • Getting statistics on object queries using Yandex Query
    • Generating a resource-by-resource cost breakdown report using S3 Select
    • Server-side encryption
    • Integrating an L7 load balancer with CDN and Object Storage
    • Blue-green and canary deployment of service versions
    • Analyzing logs in DataLens
    • Mounting buckets to the file system of Yandex Data Processing hosts
    • Using Object Storage in Yandex Data Processing
    • Importing data from Object Storage, processing and exporting to Managed Service for ClickHouse®
    • Mounting a bucket as a disk in Windows
    • Migrating data from Yandex Data Streams using Yandex Data Transfer
    • Using hybrid storage in Yandex Managed Service for ClickHouse®
    • Loading data from Yandex Managed Service for OpenSearch to Yandex Object Storage using Yandex Data Transfer
    • Automatically copying objects from one bucket to another
    • Recognizing audio files in a bucket on a regular basis
    • Training a model in Yandex DataSphere on data from Object Storage
    • Connecting to Object Storage from VPC
    • Migrating data to Yandex Managed Service for PostgreSQL using Yandex Data Transfer
    • Uploading data to Yandex Managed Service for Greenplum® using Yandex Data Transfer
    • Uploading data to Yandex Managed Service for ClickHouse® using Yandex Data Transfer
    • Uploading data to Yandex Managed Service for YDB using Yandex Data Transfer
    • Exchanging data between Yandex Managed Service for ClickHouse® and Yandex Data Processing
    • Uploading data from Yandex Managed Service for YDB using Yandex Data Transfer
    • Hosting a static Gatsby website in Object Storage
    • Migrating a database from Managed Service for PostgreSQL to Object Storage
    • Exchanging data between Yandex Managed Service for ClickHouse® and Yandex Data Processing
    • Importing data from Yandex Managed Service for PostgreSQL to Yandex Data Processing using Sqoop
    • Importing data from Yandex Managed Service for MySQL® to Yandex Data Processing using Sqoop
    • Migrating data from Yandex Object Storage to Yandex Managed Service for MySQL® using Yandex Data Transfer
    • Migrating a database from Yandex Managed Service for MySQL® to Yandex Object Storage
    • Exporting Greenplum® data to a cold storage in Yandex Object Storage
    • Loading data from Yandex Direct to a Yandex Managed Service for ClickHouse® data mart using Yandex Cloud Functions, Yandex Object Storage, and Yandex Data Transfer
    • Migrating data from Elasticsearch to Yandex Managed Service for OpenSearch
    • Uploading Terraform states to Object Storage
    • Locking Terraform states using Managed Service for YDB
    • Visualizing Yandex Query data
    • Publishing game updates
    • VM backups using Hystax Acura
    • Backing up to Object Storage with CloudBerry Desktop Backup
    • Backing up to Object Storage with Duplicati
    • Backing up to Object Storage with Bacula
    • Backing up to Yandex Object Storage with Veeam Backup
    • Backing up to Object Storage with Veritas Backup Exec
    • Managed Service for Kubernetes cluster backups in Object Storage
    • Developing a custom integration in API Gateway
    • URL shortener
    • Storing application runtime logs
    • Developing a skill for Alice and a website with authorization
    • Creating an interactive serverless application using WebSocket
    • Deploying a web application using the Java Servlet API
    • Developing a Telegram bot
    • Replicating logs to Object Storage using Fluent Bit
    • Replicating logs to Object Storage using Data Streams
    • Uploading audit logs to ArcSight SIEM
    • Exporting audit logs to SIEM Splunk systems
    • Creating an MLFlow server for logging experiments and artifacts
    • Operations with data using Yandex Query
    • Federated data queries using Query
    • Recognizing text in image archives using Vision OCR
    • Converting a video to a GIF in Python
    • Automating tasks using Managed Service for Apache Airflow™
    • Processing files with usage details in Yandex Cloud Billing
    • Deploying a web app with JWT authorization in API Gateway and authentication in Firebase
    • Searching for Yandex Cloud events in Yandex Query
    • Searching for Yandex Cloud events in Object Storage
    • Creating an external table from a bucket table using a configuration file
    • Migrating databases from Google BigQuery to Managed Service for ClickHouse®
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Bucket logs
  • Release notes
  • FAQ

In this article:

  • Get your cloud ready
  • Required paid resources
  • Set up your environment
  • Create a bucket for storing logs
  • Create a data stream
  • Create a transfer
  • Install Fluentd
  • Connect Fluentd to your data stream
  • Test sending and receiving data
  • How to delete the resources you created
  1. Tutorials
  2. Storing application runtime logs

Storing application runtime logs

Written by
Yandex Cloud
Updated at May 7, 2025
  • Get your cloud ready
    • Required paid resources
  • Set up your environment
  • Create a bucket for storing logs
  • Create a data stream
  • Create a transfer
  • Install Fluentd
  • Connect Fluentd to your data stream
  • Test sending and receiving data
  • How to delete the resources you created

Analyzing information about application events over any period requires secure storage of application runtime logs.

Applications do not usually send their logs to storage systems directly. Instead, they use aggregators such as fluentd, fluentbit, or logstash. Aggregators can write data directly to storage systems; however, for greater reliability, data first goes into an intermediate buffer (data stream bus, message broker) and only from there, to storage systems.

This approach lets developers focus on application features and delegate log delivery and storage to special systems.

In this tutorial, you will learn how to save application runtime logs to Yandex Object Storage.

To set up application runtime log storage:

  1. Get your cloud ready.
  2. Set up your environment.
  3. Create a bucket for storing logs.
  4. Create a data stream.
  5. Create a transfer.
  6. Install Fluentd.
  7. Connect Fluentd to your data stream.
  8. Test sending and receiving data.

If you no longer need to store any logs, delete the resources in use.

Get your cloud readyGet your cloud ready

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.

Required paid resourcesRequired paid resources

The cost of application log storage support includes:

  • Fee for data stream maintenance (see Yandex Data Streams pricing).
  • Fee for transmitting data between sources and targets (see Yandex Data Transfer pricing).
  • Fee for data storage (see Yandex Object Storage pricing).

Set up your environmentSet up your environment

  1. Create a service account and assign it the editor role for your folder.
  2. Create a static access key.

You will need the ID and secret key at the next steps.

Create a bucket for storing logsCreate a bucket for storing logs

  1. In the management console, select the folder where you want to create a bucket.
  2. From the list of services, select Object Storage.
  3. Click Create bucket.
  4. Name the bucket.
  5. In the Object read access, Object listing access, and Read access to settings fields, select Limited.
  6. In the Storage class field, select Cold.
  7. Click Create bucket.

Create a data streamCreate a data stream

  1. In the management console, select the folder to create a data stream in.
  2. Select Yandex Data Streams.
  3. Click Create stream.
  4. Specify an existing serverless YDB database or create a new one. If you chose to create a new database, click Refresh after creating it to refresh the list of databases.
  5. Enter a name for the stream.
  6. Click Create.

Wait for the stream to start. Once the stream is ready for use, its status will change from CREATING to ACTIVE.

Create a transferCreate a transfer

  1. On the page of the stream you created, click Actions and select Create data transfer.
  2. Create a source endpoint:
    1. In the Direction field, select Source.
    2. Enter a name for the endpoint.
    3. From the Database type list, select Yandex Data Streams.
    4. Select a database for the source.
    5. Enter the name of the stream you created earlier.
    6. Select the service account you created earlier.
    7. Click Create.
  3. Create a target endpoint:
    1. Click Create endpoint.
    2. In the Direction field, select Target.
    3. Enter a name for the endpoint.
    4. From the Database type list, select Object Storage.
    5. Enter the name of the bucket you created earlier.
    6. Select the service account you created earlier.
    7. Click Create.
  4. Create a transfer:
    1. In the left-hand panel, select Transfers.
    2. Click Create transfer.
    3. Name the transfer.
    4. Select the source endpoint you created earlier.
    5. Select the target endpoint you created earlier.
    6. Click Create.
    7. Click next to the name of the created transfer and select Activate.

Wait until the transfer is activated. Once the transfer is ready for use, its status will change from Creating to Replicating.

Install FluentdInstall Fluentd

  1. Download and install Fluentd.
  2. Install the Fluentd plugin to support the AWS Kinesis Data Streams protocol. This protocol will be responsible for streaming data.
sudo td-agent-gem install fluent-plugin-kinesis

Connect Fluentd to your data streamConnect Fluentd to your data stream

  1. On the page of the stream you created, click Connect and navigate to the Fluentd tab.
  2. Copy the configuration file example and paste it into the /etc/td-agent/td-agent.conf file. Replace <key_id> and <secret> with the ID and secret key you got earlier.
Sample configuration file
<system>
  log_level debug
</system>
<source>
  @type http
  @id input_http
  port 8888
</source>
<match kinesis>
  @type copy
  <store>
    @type stdout
  </store>
  <store>
    @type kinesis_streams

    aws_key_id <key_id>
    aws_sec_key <secret>

    # kinesis stream name
    stream_name /ru-central1/b1gia92mbaom********/etnhstu01nin********/my-stream

    # region
    region ru-central-1

    endpoint https://yds.serverless.yandexcloud.net

    <buffer>
      flush_interval 5s
    </buffer>
  </store>
</match>

Test sending and receiving dataTest sending and receiving data

To send data to your stream using Fluentd, run the command:

curl --request POST --data 'json={"user_id":"user1", "score": 100}' http://localhost:8888/kinesis

If the setup is successful, the Fluentd operation log named /var/log/td-agent/td-agent.log will feature messages about receiving the data and writing it to Yandex Data Streams over the AWS Kinesis Data Streams protocol:

...
2022-04-20 19:36:37.770311035 +0000 kinesis: {"user_id":"user1","score":100}
2022-04-20 19:36:42 +0000 [debug]: #0 /ru-central1/b1gia92mbaom********/etnhstu01nin********/my-stream: Write chunk 5dd1b1ca1bd788e49185aa681e8132b9 /   1 records /    0 KB
2022-04-20 19:36:42 +0000 [debug]: #0 /ru-central1/b1gia92mbaom********/etnhstu01nin********/my-stream: Finish writing chunk
...

The bucket you created will contain a file with the sent message.

How to delete the resources you createdHow to delete the resources you created

To stop paying for the resources you used:

  1. Delete the transfer.
  2. Delete the endpoints.
  3. Delete the data stream.
  4. Delete the bucket.

Was the article helpful?

Previous
URL shortener
Next
Developing a skill for Alice and a website with authorization
Yandex project
© 2025 Yandex.Cloud LLC