Telegraf
Telegraf - a monitoring system that allows you to customize the collection, storage and processing of metrics.
Before you get started , set up Telegraf.
Customize Telegraf
You can configure an agent to get metrics into your infrastructure.
1. Add a service user
Add a service user with permission in the access area Projects and role:
metrics.admin;I'm a member;- or
reader.
Users can be added by the Account Owner or users with the role of iam.admin.
2. Configure the agent to receive metrics
-
Open the CLI.
-
Create a
telegraf.confconfiguration file:nano /etc/telegraf/telegraf.conf -
Complete the
telegraf.confconfiguration file:[agent]
interval = "1m"
flush_interval = "1m"
[[inputs.prometheus]]
urls = ["<base_url>/projects/<project_id>/namespaces/<namespace>/prometheus/metrics"]
username = "<user_id>"
password = "<password>"
[[outputs.file]]
files = ["stdout"]
data_format = "prometheus"Specify:
<base_url>- URL for accessing the API of the Metrics service. The list of URLs can be found in the instructions List of URLs;<project_id>- Project ID. Can be copied in control panel: in the top menu click Products and select any product → open the projects menu → in the line of the required project click ;<namespace>- the name of the selected namespace, e.g.compute;<user_id>- ID of the user you added in step 1;<password>- password of the user you you added in step 1.
-
Optional: you can configure metrics collection from multiple pools or projects. To add a new pool or project, under
inputs.prometheusin theurlsparameter, list all sources separated by commas. -
Optional: add sending metrics to external storage or processing systems, e.g. VictoriaMetrics. To do this, add the
outputssection in thetelegraf.confconfiguration file with the pluginPrometheus Output Plugin. -
Exit the
nanotext editor with your changes saved: press Ctrl+X and then Y+Enter. -
Start Telegraf:
docker run \
--name telegraf \
--rm \
-v ${PWD}/telegraf.conf:/etc/telegraf/telegraf.conf:ro \
telegraf:latest \
--config /etc/telegraf/telegraf.confThe collected metrics will be output to stdout. Example output:
# HELP network_meta_info_value Telegraf collected metric
2026-03-03T12:46:30.359832865Z # TYPE network_meta_info_value untyped
2026-03-03T12:46:30.359838580Z network_meta_info_value{server_uuid="...", ...} 1
2026-03-03T12:46:30.359844441Z # HELP network_receive_bits_rate_value Telegraf collected metric
2026-03-03T12:46:30.359847896Z # TYPE network_receive_bits_rate_value untyped
2026-03-03T12:46:30.359851348Z network_receive_bits_rate_value{server_uuid="...", ...} 0