add _info suffix to info metrics

This commit is contained in:
illustris
2026-03-12 15:41:47 +05:30
parent e9b60a3af6
commit 3808e3b672
2 changed files with 2 additions and 2 deletions

View File

@@ -139,7 +139,7 @@ func NewWithDeps(cfg config.Config, proc procfs.ProcReader, sys sysfs.SysReader,
descMemExt: prometheus.NewDesc(p+"_kvm_memory_extended", "Extended memory info", []string{"id", "type"}, nil),
descThreads: prometheus.NewDesc(p+"_kvm_threads", "Threads used", []string{"id"}, nil),
descCtxSwitches: prometheus.NewDesc(p+"_kvm_ctx_switches_total", "Context switches", []string{"id", "type"}, nil),
descNicInfo: prometheus.NewDesc(p+"_kvm_nic", "NIC info", []string{"id", "ifname", "netdev", "queues", "type", "model", "macaddr"}, nil),
descNicInfo: prometheus.NewDesc(p+"_kvm_nic_info", "NIC info", []string{"id", "ifname", "netdev", "queues", "type", "model", "macaddr"}, nil),
descNicQueues: prometheus.NewDesc(p+"_kvm_nic_queues", "NIC queue count", []string{"id", "ifname"}, nil),
descDiskSize: prometheus.NewDesc(p+"_kvm_disk_size_bytes", "Disk size bytes", []string{"id", "disk_name"}, nil),
descStorageSize: prometheus.NewDesc(p+"_node_storage_size_bytes", "Storage total size", []string{"name", "type"}, nil),

View File

@@ -348,7 +348,7 @@ func TestCollector_NICMetrics(t *testing.T) {
metrics := collectMetrics(c)
// NIC info
nicInfo := metrics["pve_kvm_nic"]
nicInfo := metrics["pve_kvm_nic_info"]
if len(nicInfo) != 1 {
t.Fatalf("expected 1 nic info, got %d", len(nicInfo))
}