Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Monium
  • Getting started
  • Overview
    • Getting started
    • Overview
      • Data conversions
      • Unified Agent
      • Fluent Bit
    • View logs
    • Query language
    • Log metrics
  • Access management
  • Pricing policy
  • Terraform reference
  • Release notes

In this article:

  • Sending logs from an application
  • Collecting logs from a file
  1. Logs
  2. Data collection
  3. Unified Agent

Sending logs via Unified Agent

Written by
Yandex Cloud
Updated at December 22, 2025
  • Sending logs from an application
  • Collecting logs from a file

The data collection agent enables you to separate log generation (collection) from log delivery to the storage system. This approach makes the logging system more reliable and easier to manage. For example, a properly configured agent ensures logs are not lost if your application crashes or shuts down, or if the log sink is temporarily offline: the agent keeps the logs and delivers them once the connection is restored.

Monium.Logs currently only accepts OpenTelemetry data. To send your app's logs in this format, use the SDK for the programming language in question. We recommend following the standard naming conventions also provided in the SDK.

Unified Agent is a versatile telemetry collection agent by Yandex that works with metrics, traces, and logs. It supports authentication via the TVM protocol and integrates with various log sources, including the file system, logrotate-compatible sources, and HTTP/GRPC interfaces. You can deploy Unified Agent directly to the host system, including a real-time container (RTC) environment.

This section provides common examples of how to configure Unified Agent to send logs to Monium.Logs. For more information on setting up an agent, see this Unified Agent guide.

Sending logs from an applicationSending logs from an application

Configuration example
routes:
    - input:
          plugin: otel_logs
          config:
              port: 8889

      channel:
          output:
              plugin: otel_logs
              config:
                  project: folder__<folder_ID>
                  cluster: doc

                  format: proto
                  url: "ingest.monium.yandex.cloud:443"

                  tvm:
                      client_id: 2025442
                      destination_id: 2045111
                      secret:
                          file: /my/secret/token

In this configuration, the agent expects logs in OpenTelemetry format at localhost:8889. The collected logs then go to the collector to be saved in the folder__<folder_ID> project.

A TVM is used for authentication. The secret section specifies the path to the file with the API key for obtaining the TVM token, and the client_id section specifies the ID of the service account with the yc.logging.write role.

Collecting logs from a fileCollecting logs from a file

Configuration example
routes:
  - input:
      plugin: file_input
      config:
        path: /logs/fetcher.log
        state_directory: <path_to_directory>

    channel:
      pipe:
        - filter:
            plugin: subprocess
            config:
              command: <path_to_parser>
              arguments:
                - "--project=examples"
                - "--cluster=doc"
                - "--service=example"
      output:
        plugin: otel_logs
        config:
          project: folder__<folder_ID>
          cluster: doc
          service: example

          format: json
          url: "ingest.monium.yandex.cloud:443"

          tvm:
            client_id: 2025442
            destination_id: 2045111
            secret:
              file: <path_to_secret_file>

Where:

  • <path_to_folder>: Folder with agent state files, e.g., /var/lib/ua/state.
  • <path_to_parser>: Full path to the parser executable file. The parser accepts log strings as input, converts them to the required format, e.g., protobuf or JSON, and outputs the result. For example, /usr/local/bin/cpp_processes.
  • <path_to_secret_file>: File with the TVM secret, e.g., /etc/ua/tvm_secret.

In this configuration, the agent reads entries from the /logs/fetcher.log file. The state_directory parameter defines the folder for storing service status files to ensure logs are read correctly after the agent restarts.

The read logs are processed with an external parser, which converts the logs into OpenTelemetry format.

The final data goes to the folder__<folder_ID> project in Monium at the address specified under url.

A TVM is used for authentication. The secret section specifies the path to the file with the API key for obtaining the TVM token, and the client_id section specifies the ID of the service account with the yc.logging.write role.

Was the article helpful?

Previous
Data conversions
Next
Fluent Bit
© 2026 Direct Cursus Technology L.L.C.