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
    • 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 Monitoring
  • Getting started
    • Overview
    • Installing and updating
    • Starting and stopping
      • Overview
      • Inputs
      • Outputs
      • Routing
      • Storages
      • Filters
      • Service
    • Agent best practices
    • Possible errors
    • Deletion
  • Access management
  • Terraform reference
  • Release notes

In this article:

  • Configuration files
  • Importing configuration files
  • Output and validation of the final configuration
  • Configuration directives
  • Examples
  1. Metric collection agent
  2. Configuration
  3. Overview

Configuration

Written by
Yandex Cloud
Updated at June 20, 2024
  • Configuration files
  • Importing configuration files
  • Output and validation of the final configuration
  • Configuration directives
  • Examples

The section describes how to configure Yandex Unified Agent. Before getting started, explore the basic concepts used in agent configuration.

Configuration filesConfiguration files

Unified Agent settings are specified in the config.yml file. This file is provided as a parameter at agent startup. You can import additional configuration files into config.yml using the import directive.

The configuration file may contain the following sections:

  • routes: Description of delivery routes.
  • channels: Description of named channels.
  • pipes: Description of named pipes.
  • storages: Description of storages.
  • status, main_thread_pool, agent_log, system: Sections containing service information.

To provide the configuration file, specify its path in the --config parameter:

/usr/bin/unified_agent --config /etc/yandex/unified_agent/config.yml

When you install Unified Agent from the deb package, the basic configuration file, /etc/yandex/unified_agent/config.yml, is automatically set and provided to the --config parameter.

Importing configuration filesImporting configuration files

  1. Create additional YAML configuration files in the /etc/yandex/unified_agent/conf.d directory.

  2. Connect additional YAML files in the main config.yml file:

    import:
    - /etc/yandex/unified_agent/conf.d/*.yml
    

    The files from the /etc/yandex/unified_agent/conf.d directory are imported in alphabetical order.

The value of the import directive is a string or array of strings, with each string expanded using the glob function. Files are imported in the order of the import directives. Within each directive, they follow the lexicographic file name order.

When importing configuration files, the following rules apply:

  • The status and main_thread_pool sections are pulled from the last imported file.
  • The channels, storages, and pipes sections are specified as a list. New items are added to the end of this list or replaced if the value of the item's name parameter is already in the list.
  • The routes section is specified as a list. New items are added to the end of the list.

You can add the import directive to the files being imported as well. To do so, specify only absolute paths in import. Relative paths start from the agent's startup directory.

Note

We do not recommend using import in nested files as it makes the configuration bulky.

If the configuration import loops, Unified Agent will terminate with an error. You can find the error details in the agent logs. The maximum recursion depth is 100. If the imported file contains errors, the full path to the original file containing the erroneous node will be output.

Output and validation of the final configurationOutput and validation of the final configuration

To validate the agent settings, run the command:

unified_agent --config /etc/yandex/unified_agent/config.yml check-config

If the validation is successful, the agent outputs to stdout the final variant once all imports are complete and returns the null return code.

If the validation fails, the agent outputs configuration errors to stderr and returns a non-zero return code:

unified_agent --config console_to_lb.yml check-config
yaml-cpp: error at line 10, column 3: unrecognized field [status_port]

Configuration directivesConfiguration directives

Below you can find the configuration sections and parameters of different Unified Agent components. For optional parameters, the values given in the examples are the default ones.

ExamplesExamples

Sample configurations are given in Working with metrics.

Was the article helpful?

Previous
Starting and stopping
Next
Inputs
© 2025 Direct Cursus Technology L.L.C.