Skip to content

Commit

Permalink
Fix redfish crash from misconfigured metric scrape
Browse files Browse the repository at this point in the history
  • Loading branch information
mjgoble committed Jan 27, 2022
1 parent 8bee9d8 commit b2d114b
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions collector/system_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -578,8 +578,6 @@ func parseProcessor(ch chan<- prometheus.Metric, systemHostName string, processo
processorTotalThreads := processor.TotalThreads
processorState := processor.Status.State
processorHealthState := processor.Status.Health
processorMaxTDPWatts := processor.MaxTDPWatts
processorTDPWatts := processor.TDPWatts

systemProcessorLabelValues := []string{systemHostName, "processor", processorName, processorID, processorManufacturer, processorModel, processorSocket}

Expand All @@ -593,8 +591,6 @@ func parseProcessor(ch chan<- prometheus.Metric, systemHostName string, processo
}
ch <- prometheus.MustNewConstMetric(systemMetrics["system_processor_total_threads"].desc, prometheus.GaugeValue, float64(processorTotalThreads), systemProcessorLabelValues...)
ch <- prometheus.MustNewConstMetric(systemMetrics["system_processor_total_cores"].desc, prometheus.GaugeValue, float64(processorTotalCores), systemProcessorLabelValues...)
ch <- prometheus.MustNewConstMetric(systemMetrics["system_processor_max_tdp_watts"].desc, prometheus.GaugeValue, float64(processorMaxTDPWatts), systemProcessorLabelValues...)
ch <- prometheus.MustNewConstMetric(systemMetrics["system_processor_tdp_watts"].desc, prometheus.GaugeValue, float64(processorTDPWatts), systemProcessorLabelValues...)

}
func parseVolume(ch chan<- prometheus.Metric, systemHostName string, volume *redfish.Volume, wg *sync.WaitGroup) {
Expand Down

0 comments on commit b2d114b

Please sign in to comment.