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
    • Agent best practices
    • Possible errors
    • Deletion
  • Access management
  • Terraform reference
  • Release notes

In this article:

  • Starting
  • Stopping
  • Parameters for starting a Docker container with Unified Agent
  1. Metric collection agent
  2. Starting and stopping

Starting and stopping Yandex Unified Agent

Written by
Yandex Cloud
Updated at May 5, 2025
  • Starting
  • Stopping
  • Parameters for starting a Docker container with Unified Agent

StartingStarting

Install Yandex Unified Agent and start it using one of the following methods:

Docker image
deb package
Binary file
When creating a VM

The agent's configuration file is located at /etc/yandex/unified_agent/config.yml and parameterized by environment variables. For more information about starting a Docker container, see below.

To start a container with the agent, run the following command:

sudo docker run \
  -p 16241:16241 -it --detach --uts=host \
  --name=ua \
  -v /proc:/ua_proc \
  -e PROC_DIRECTORY=/ua_proc \
  -e FOLDER_ID=a1bs81qpemb4******** \
  cr.yandex/yc/unified-agent

Where FOLDER_ID is the ID of the folder to write metrics to.

To start a container with its own configuration file, add the -v parameter to the container start command and specify the full path to the configuration file. Before you start a container, delete the following lines from the configuration file:

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

Example of container start command with a custom configuration file:

docker run \
  -p 16241:16241 -it --detach --uts=host \
  --name=ua \
  -v /proc:/ua_proc \
  -v `pwd`/config.yml:/etc/yandex/unified_agent/conf.d/config.yml \
  --entrypoint="" \
  -e PROC_DIRECTORY=/ua_proc \
  -e FOLDER_ID=a1bs81qpemb4******** \
  cr.yandex/yc/unified-agent

By default, the status section of the agent's configuration file specifies host: null. Please keep this in mind if you are using your own configuration file.

Warning

To monitor secondary disks attached to the host, specify the paths to their mount points using the -v parameter of the docker run command. For more information, see linux_metrics input.

For more information about agent configuration, see {#T}.

Edit the /etc/yandex/unified_agent/config.yml configuration file, e.g., by setting up the agent to deliver Linux system metrics. For more information about agent configuration, see {#T}.

To make sure Unified Agent is successfully installed and started, run this command:

systemctl status unified-agent

Result:

● unified-agent.service - Yandex Unified Agent service
   Loaded: loaded (/lib/systemd/system/unified-agent.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2021-02-09 15:57:08 UTC; 2 weeks 2 days ago
 Main PID: 141403 (unified_agent)
    Tasks: 8 (limit: 507)
   Memory: 9.4M
   CGroup: /system.slice/unified-agent.service
           └─141403 /usr/bin/unified_agent --config /etc/yandex/unified_agent/config.yml --log-priority NOTICE

Create a configuration file, e.g., with settings for delivering Linux system metrics. For more information about agent configuration, see {#T}.

To start the agent, run the following command:

./unified_agent --config unified_agent.yml

Once the VM is deployed, Unified Agent will be started automatically and begin delivering basic VM metrics to Yandex Monitoring.

You are responsible for updating and maintaining the agent.

The agent is installed with a default configuration file located at /etc/yc/unified_agent/config.yml. You can also configure the delivery of custom metrics or logs to Cloud Logging.

The configuration file is set up to send basic virtual machine metrics and agent health metrics. You will be charged for metric delivery.

To start the agent manually, run the following command:

./unified_agent --config unified_agent.yml

StoppingStopping

Stop Unified Agent using one of the following methods:

Docker image
deb package
Binary file
When creating a VM

To create a container, run this command:

sudo docker stop ua

To stop the agent, run this command:

sudo systemctl stop unified-agent

To restart the agent, run the following command:

sudo systemctl
  1. Get the unified_agent process ID:

    ps aux | grep unified_agent
    
  2. To stop the process, run this command:

    sudo kill <process_ID>
    
  1. Get the unified_agent process ID:

    ps aux | grep unified_agent
    
  2. To stop the process, run this command:

    sudo kill <process_ID>
    

The process of stopping Unified Agent may take some time to complete the delivery of accumulated data. It usually takes two seconds or less.

Parameters for starting a Docker container with Unified AgentParameters for starting a Docker container with Unified Agent

If you install Unified Agent using Docker, you can configure the agent using environment variables. In that case, you will not need to edit the configuration file located at /etc/yandex/unified_agent/config.yml. The environment variables are listed in the table below.

Environment variable Default value Description
UA_STATUS_PORT 16241 Port where the agent status will be available.
UA_LOG_PRIORITY NOTICE Agent's logging level.
FOLDER_ID No ID of the folder to write metrics to (a required parameter).
PROC_DIRECTORY /proc Directory with mounted procfs from where the agent will get Linux system metrics.
SYS_DIRECTORY /sys Directory with mounted sysfs from where the agent will get Linux system metrics.
UA_LINUX_RESOURCE_CPU
UA_LINUX_RESOURCE_MEMORY
UA_LINUX_RESOURCE_NETWORK
UA_LINUX_RESOURCE_STORAGE
UA_LINUX_RESOURCE_IO
UA_LINUX_RESOURCE_KERNEL
basic Level of detail of system metrics: CPU, network, disks, I/O system, and Linux kernel.

What's nextWhat's next

  • Read about Unified Agent concepts
  • Learn more about configuring Unified Agent
  • Read the Unified Agent operating guidelines

Was the article helpful?

Previous
Installing and updating
Next
Overview
© 2025 Direct Cursus Technology L.L.C.