Metrics collection agent
Yandex Unified Agent is an agent that delivers additional metrics of virtual machines and user applications to Monium.
Note
Currently, Unified Agent supports only metrics. We will later be adding the OpenTelemetry format for metrics, logs, and traces.
The agent supports:
- Collecting Linux system metrics (CPU, RAM, disk).
- Collecting metrics in Prometheus
format. - Delivering metrics to Monium.Metrics.
- File storage for reliable data delivery.
You can find the examples of using the agent in Working with metrics. Learn more about Unified Agent installation methods in Installing and updating Yandex Unified Agent. The syntax of the agent's configuration file is described in Configuration.
Basic terms
Yandex Unified Agent transmits streaming data in the form of messages. A data stream in Unified Agent is called a session. Multiple sessions can be running at the same time.
The agent receives messages via the input and delivers them to one or more outputs. Intermediate processing of messages is done by filters; storages save messages to the disk. Inputs, outputs, filters, and storages are implemented using plugins.
Message routing is implemented with the help of delivery routes which consist of an input and a channel. A channel consist of a pipe and a node of one of the following types: output, channel, or splitter. A pipe may contain filters and links to storages. There can be no pipe in the configuration.
You can create named channels and pipes. This will help you avoid duplicate configurations and route messages from multiple inputs to the same output.
How Unified Agent works
Messages
A message is the minimum atomic unit of user information that a system or application sends to Unified Agent.
A message consist of a body, a timestamp, user metadata in key: value format, and a serial number.
Note
For correct data aggregation in monitoring, Integral COUNTER metrics are converted to DGAUGE when uploading to Monium.Metrics.
Sessions
A session is an ordered stream of messages. A session has an ID that must be unique among all the ongoing sessions as well as user metadata in key:value format.
All messages sent during a session contain both message metadata and session metadata.
Types of information to collect (inputs), pipes (filters), interim storage spaces (storages), and outputs are specified in the Unified Agent configuration file.
Inputs
An input is used by the agent to receive the messages transmitted during sessions. An input can contain the session infrastructure settings used to configure various limits.
See the list of available inputs.
Outputs
Outputs are used by the agent to send messages to third-party systems. The currently supported outputs are yc_metrics, which writes metrics to the Monium.Metrics API, and a number of debug outputs.
See also the list of available outputs.
Filters
Filters are designed to discard, convert, and aggregate messages.
Filter types:
- regular: Handle each message separately.
- cumulative: Transform a set of input messages into one output message.
See also the list of available filters.
Storages
Storages serve as interim depots for messages in transit between the input and the output.
With a storage, you will not lose your data if the agent fails to write it to the specified output, e.g., due to network issues or unavailability of the destination API.
See also the storage configuration guide.
Routing
Pipes
Pipes contain:
- Sequence of filters that messages pass through.
- Link to the storage where the messages will be stored before their transmission to the output.
Pipes can be named.
See also the pipe configuration guide.
Channels
Channels group a pipe with a node, one of an output, a named channel, or a splitter.
A splitter allows you to specify a set of channels and copy the incoming message to each one of its channels. You can use a splitter to duplicate streams to different outputs. By combining splitters and filters, you can send different messages to different channels based on certain attributes, e.g., metadata.
Channels can be named.
See the named channel configuration guide.
Routes
Routes combine an input and a channel.
Routes, channels, and pipes enable you to set up any message processing tree.
See the diagram for the relations between the items of the message processing tree.