Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mwennrich committed Oct 8, 2024
1 parent 831d26a commit 6aa55e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metalCollector.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ func (collector *metalCollector) Collect(ch chan<- prometheus.Metric) {
if m.Ipmi.Address != nil {
ch <- prometheus.MustNewConstMetric(collector.machineIpmiIpAddress, prometheus.GaugeValue, 1.0, *m.ID, *m.Ipmi.Address)
}
if m.Ipmi.LastUpdated == nil {
if m.Ipmi.LastUpdated != nil {
ch <- prometheus.MustNewConstMetric(collector.machineIpmiLastUpdated, prometheus.GaugeValue, float64(time.Time(*m.Ipmi.LastUpdated).Unix()), *m.ID)
}
if m.Ipmi.Powermetric != nil && m.Ipmi.Powermetric.Averageconsumedwatts != nil {
Expand Down

0 comments on commit 6aa55e3

Please sign in to comment.