inputs.libvirt: Expose domain's energy stats from libvirt. Available since 12.4.0
Use Case
Libvirt 12.4.0 introduced per-domain energy metrics from resctrl filesystem as part of domain stats. Exposing these stats through Telegraf would enable operators to track the cumulative energy consumed by each VM running in their infrastructure. It can be used then to derive granular power consumption, compare efficiency etc
Expected behavior
When cpu_total is enabled and libvirt 12.4.0 or later reports cpu.energy.monitor.* domain statistics, Telegraf should expose available energy metrics (core_energy in Joules, activity in nanofarads (nF)) and monitor metadata.
The vcpus field is optional and omitted for whole-process monitors.
libvirt_cpu_energy_monitor_total,domain_name=example-domain count=1u libvirt_cpu_energy_monitor,domain_name=example-domain,energy_monitor_id=0 name="example-monitor",pkg_count=2u libvirt_cpu_energy_monitor_pkg,domain_name=example-domain,energy_monitor_id=0,pkg_index=0 activity=1234.5,core_energy=100.25,id=0u libvirt_cpu_energy_monitor_pkg,domain_name=example-domain,energy_monitor_id=0,pkg_index=1 activity=2345.6,core_energy=200.5,id=1u
Actual behavior
Telegraf currently ignores all cpu energy metrics from libvirt
Additional info
No response
Source: influxdata/telegraf