Extend DRM labels

Signed-off-by: Deezzir <deezzir@gmail.com>
pull/3145/head
Deezzir 2024-10-02 18:21:30 -04:00
parent 1b332edfe8
commit 0e2ce9f14e
No known key found for this signature in database
GPG Key ID: BC9F5289FAC4E96A
1 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ func NewDrmCollector(logger *slog.Logger) (Collector, error) {
CardInfo: prometheus.NewDesc(
prometheus.BuildFQName(namespace, drmCollectorSubsystem, "card_info"),
"Card information",
[]string{"card", "memory_vendor", "power_performance_level", "unique_id", "vendor"}, nil,
[]string{"card", "memory_vendor", "power_performance_level", "unique_id", "chip", "vendor"}, nil,
),
GPUBusyPercent: prometheus.NewDesc(
prometheus.BuildFQName(namespace, drmCollectorSubsystem, "gpu_busy_percent"),
@ -112,7 +112,7 @@ func (c *drmCollector) updateAMDCards(ch chan<- prometheus.Metric) error {
for _, s := range stats {
ch <- prometheus.MustNewConstMetric(
c.CardInfo, prometheus.GaugeValue, 1,
s.Name, s.MemoryVRAMVendor, s.PowerDPMForcePerformanceLevel, s.UniqueID, vendor)
s.Name, s.MemoryVRAMVendor, s.PowerDPMForcePerformanceLevel, s.UniqueID, s.HWmonChip, vendor)
ch <- prometheus.MustNewConstMetric(
c.GPUBusyPercent, prometheus.GaugeValue, float64(s.GPUBusyPercent), s.Name)