Page MenuHomeVyOS Platform

Feature request: support Telegraf global_tags (and optionally per-input tags) in service monitoring telegraf
Closed, ResolvedPublicFEATURE REQUEST

Description

Telegraf ships with a top-level [global_tags] block in its config format. Anything defined there gets stamped onto every metric the agent emits, no matter which input gathered it or which output it's shipped to. VyOS doesn't currently expose any way to set this — the telegraf subtree only lets you configure per-destination settings (influxdb, azure-data-explorer, splunk, prometheus-client, loki).

The gap matters for redundant deployments — active/standby pairs, clustered nodes, anything where the node doing the work can change over time. Right now the only identity a metric carries is host, so any time a role migrates to a different node, time-series continuity breaks and downstream dashboards/alerts built around a logical service identity (rather than a physical box) stop lining up.

suggested syntax:

set service monitoring telegraf global-tag <tag-name> value <tag-value>

This needs to live directly under telegraf, not under influxdb or any other output node — since global_tags in Telegraf applies before the metric ever reaches an output plugin, nesting it under one output would mean it silently stops working (or has to be duplicated) the moment a second output is added.

Relevant files:

interface-definitions/service_monitoring_telegraf.xml.in, data/templates/telegraf/telegraf.j2, src/conf_mode/service_monitoring_telegraf.py

Details

Version
1.5.0
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Feature (new functionality)

Event Timeline

j.vela created this object in space S1 VyOS Public.
Viacheslav raised the priority of this task from Low to Normal.Wed, Sep 2, 11:20 AM
Viacheslav changed the subtype of this task from "Task" to "Feature Request".
Viacheslav changed the task status from Open to In progress.Wed, Sep 2, 12:12 PM
Viacheslav claimed this task.

PR https://github.com/vyos/vyos-1x/pull/5438

set service monitoring telegraf global-tag role value 'core-router'
set service monitoring telegraf global-tag site-id value 'frank01'
set service monitoring telegraf prometheus-client

Check:

vyos@r14# curl localhost:9273/metrics | grep inter | tail -n 5
soft_interrupts_total{device="",host="r14",irq="NET_TX",role="core-router",site_id="frank01",type=""} 17
soft_interrupts_total{device="",host="r14",irq="RCU",role="core-router",site_id="frank01",type=""} 722230
soft_interrupts_total{device="",host="r14",irq="SCHED",role="core-router",site_id="frank01",type=""} 806504
soft_interrupts_total{device="",host="r14",irq="TASKLET",role="core-router",site_id="frank01",type=""} 1061
soft_interrupts_total{device="",host="r14",irq="TIMER",role="core-router",site_id="frank01",type=""} 173132
[edit]
vyos@r14#
Viacheslav moved this task from Need Triage to Completed on the VyOS Rolling board.