Installing and updating Yandex Unified Agent
List of supported operating systems
Unified Agent is supported by the following operating systems:
- Ubuntu 14.04 or higher (it can be installed using any method).
- Debian 9 or higher (Docker image, deb package, or binary file).
- CentOS 7 or higher (Docker image).
- Fedora 32 or higher (Docker image).
- Fedora CoreOS (Docker image).
Before you begin installation
Prior to installing Yandex Unified Agent, follow these steps:
-
Create a VM in Yandex Cloud or a host outside Yandex Cloud on one of the supported operating systems, e.g., Ubuntu 14.04 or higher.
-
(Optional) Install Docker
if you want to use Docker to run Unified Agent. Docker is pre-installed in Fedora CoreOS.- Set up a public IPv4 address (recommended).
- Configure Docker to work with IPv6
and enable network address translation if you cannot use a public IPv4 address.
-
Create a service account in the folder you want to write metrics to and assign it the
monitoring.editor
role. -
Set up agent authorization in the Yandex Monitoring API:
- If the agent is installed on a VM in Yandex Cloud, link the service account you created to the VM. In that case, the agent will automatically receive the service account IAM token from the metadata service.
- If the agent is installed on a host outside Yandex Cloud, create an authorized key for service accounts. For more information about delivering metrics from hosts outside Yandex Cloud, see Delivering metrics from hosts outside Yandex Cloud.
Installation
Install Unified Agent using one of the following methods:
Unified Agent is distributed as a Docker image. The image is published in the cr.yandex/yc
repository with the unified_agent
name and the latest
tag. The image includes a binary file with the agent and a configuration file used to set up the agent for Linux system metric delivery in Yandex Monitoring.
To upload a Docker image, run this command:
sudo docker pull cr.yandex/yc/unified-agent:latest
Unified Agent is distributed as a deb package for Ubuntu 14.04 or higher. The package contains a binary file with the agent and an empty configuration file located at /etc/yandex/unified_agent/config.yml
.
To install Unified Agent:
-
Download the latest deb package:
ubuntu_name="<OS_version>" \ ua_version=$(curl --silent https://storage.yandexcloud.net/yc-unified-agent/latest-version) \ bash -c 'curl --silent --remote-name https://storage.yandexcloud.net/yc-unified-agent/releases/${ua_version}/deb/${ubuntu_name}/yandex-unified-agent_${ua_version}_amd64.deb'
Where
ubuntu_name
is the operating system version.ubuntu-14.04-trusty
ubuntu-16.04-xenial
ubuntu-18.04-bionic
ubuntu-20.04-focal
ubuntu-22.04-jammy
(starting with version23.03.02
)ubuntu-24.04-noble
You can also download a specific Unified Agent version. To do this, check the available versions and specify the one you need instead of
latest-version
:curl --silent https://storage.yandexcloud.net/yc-unified-agent/all-versions
-
Check the downloaded deb package version using the
ls
command. -
Run this command:
sudo dpkg -i yandex-unified-agent_<version>_amd64.deb
Where
<version>
is the downloaded deb package version, e.g.,24.12.01
.
Unified Agent is distributed as a binary file built for the x86-64/amd64 architecture for Ubuntu 14.04 or higher.
To download the latest version of the agent's binary file, run:
ua_version=$(curl --silent https://storage.yandexcloud.net/yc-unified-agent/latest-version) \
bash -c 'curl --silent --remote-name https://storage.yandexcloud.net/yc-unified-agent/releases/$ua_version/unified_agent && chmod +x ./unified_agent'
You can install Unified Agent when creating a VM through the management console, CLI, API, or Terraform.
To install the agent from the management console
To install the agent via the CLI or API, provide the following string in the user metadata (user-data
):
#cloud-config\nruncmd:\n - wget -O - https://monitoring.api.cloud.yandex.net/monitoring/v2/unifiedAgent/config/install.sh | bash
To install the agent using Terraform, add this metadata to the configuration file:
resource "yandex_compute_instance" "this" {
...
resources {
...
}
...
metadata = {
ssh-keys = "<username>:<SSH_key_contents>",
"install-unified-agent": "1"
}
}
To install the agent and send metrics, make sure the VM has access to the internet.
The agent is installed with a default configuration file located at /etc/yc/unified_agent/config.yml
.
The configuration file is set up to send basic virtual machine metrics and agent health metrics. You will be charged for metric delivery.
You can also configure the delivery of custom metrics or logs to Cloud Logging.
Once the VM is deployed, Unified Agent will run automatically and start sending basic VM metrics to Yandex Monitoring.
You are responsible for updating and maintaining the agent.
Updating
Update Unified Agent using one of the following methods:
-
Stop the
ua
container:sudo docker stop ua
-
Delete the container:
sudo docker rm ua
-
Run the container.
Re-download and install the deb package:
-
Download the latest deb package:
ubuntu_name="<OS_version>" \ ua_version=$(curl --silent https://storage.yandexcloud.net/yc-unified-agent/latest-version) \ bash -c 'curl --silent --remote-name https://storage.yandexcloud.net/yc-unified-agent/releases/${ua_version}/deb/${ubuntu_name}/yandex-unified-agent_${ua_version}_amd64.deb'
Where
ubuntu_name
is the operating system version.ubuntu-14.04-trusty
ubuntu-16.04-xenial
ubuntu-18.04-bionic
ubuntu-20.04-focal
ubuntu-22.04-jammy
(starting with version23.03.02
)ubuntu-24.04-noble
You can also download a specific Unified Agent version. To do this, check the available versions and specify the one you need instead of
latest-version
:curl --silent https://storage.yandexcloud.net/yc-unified-agent/all-versions
-
Check the downloaded deb package version using the
ls
command. -
Run this command:
sudo dpkg -i yandex-unified-agent_<version>_amd64.deb
Where
<version>
is the downloaded deb package version, e.g.,24.12.01
.
-
Delete the existing agent binary file.
-
Download the latest version of the agent as a binary file:
ua_version=$(curl --silent https://storage.yandexcloud.net/yc-unified-agent/latest-version) \ bash -c 'curl --silent --remote-name https://storage.yandexcloud.net/yc-unified-agent/releases/$ua_version/unified_agent && chmod +x ./unified_agent'
-
Download the agent's executable file and then create a configuration file, for example, with the settings for delivering Linux system metrics. For more information on agent configuration, see Configuration.
-
Move the downloaded file to the
/bin/unified_agent
folder. -
Restart the agent.
To find out all available versions of the agent, run this command:
curl --silent https://storage.yandexcloud.net/yc-unified-agent/all-versions
-
Delete the existing agent binary file.
-
Download the latest version of the agent as a binary file:
ua_version=$(curl --silent https://storage.yandexcloud.net/yc-unified-agent/latest-version) \ bash -c 'curl --silent --remote-name https://storage.yandexcloud.net/yc-unified-agent/releases/$ua_version/unified_agent && chmod +x ./unified_agent'
-
Download the agent's executable file and then create a configuration file, for example, with the settings for delivering Linux system metrics. For more information on agent configuration, see Configuration.
-
Move the downloaded file to the
/bin/unified_agent
folder. -
Restart the agent.
To find out all available versions of the agent, run this command:
curl --silent https://storage.yandexcloud.net/yc-unified-agent/all-versions