mirror of
				https://github.com/prometheus/node_exporter.git
				synced 2025-08-20 18:33:52 -07:00 
			
		
		
		
	Merge d45ed475ff into be19d537cd
				
					
				
			This commit is contained in:
		
						commit
						8bbc4ca70a
					
				| 
						 | 
					@ -58,7 +58,7 @@ func NewDrmCollector(logger *slog.Logger) (Collector, error) {
 | 
				
			||||||
		CardInfo: prometheus.NewDesc(
 | 
							CardInfo: prometheus.NewDesc(
 | 
				
			||||||
			prometheus.BuildFQName(namespace, drmCollectorSubsystem, "card_info"),
 | 
								prometheus.BuildFQName(namespace, drmCollectorSubsystem, "card_info"),
 | 
				
			||||||
			"Card information",
 | 
								"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(
 | 
							GPUBusyPercent: prometheus.NewDesc(
 | 
				
			||||||
			prometheus.BuildFQName(namespace, drmCollectorSubsystem, "gpu_busy_percent"),
 | 
								prometheus.BuildFQName(namespace, drmCollectorSubsystem, "gpu_busy_percent"),
 | 
				
			||||||
| 
						 | 
					@ -112,7 +112,7 @@ func (c *drmCollector) updateAMDCards(ch chan<- prometheus.Metric) error {
 | 
				
			||||||
	for _, s := range stats {
 | 
						for _, s := range stats {
 | 
				
			||||||
		ch <- prometheus.MustNewConstMetric(
 | 
							ch <- prometheus.MustNewConstMetric(
 | 
				
			||||||
			c.CardInfo, prometheus.GaugeValue, 1,
 | 
								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(
 | 
							ch <- prometheus.MustNewConstMetric(
 | 
				
			||||||
			c.GPUBusyPercent, prometheus.GaugeValue, float64(s.GPUBusyPercent), s.Name)
 | 
								c.GPUBusyPercent, prometheus.GaugeValue, float64(s.GPUBusyPercent), s.Name)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue