|
39 | 39 | currentCriticalMaxValue *prometheus.Desc |
40 | 40 | currentDesc *prometheus.Desc |
41 | 41 |
|
42 | | - powerPresent *prometheus.Desc |
43 | | - powerAllOk *prometheus.Desc |
| 42 | + powerWatt *prometheus.Desc |
| 43 | + powerPresent *prometheus.Desc |
| 44 | + powerAllOk *prometheus.Desc |
| 45 | + powerAllOkPrev *prometheus.Desc |
44 | 46 |
|
45 | 47 | rawValueDesc *prometheus.Desc |
46 | 48 | ) |
@@ -79,8 +81,10 @@ func init() { |
79 | 81 | currentCriticalMaxValue = prometheus.NewDesc(prefix+"current_critical_max_ampere", "Current critical high value. Unit: Ampere", sensorLabels, nil) |
80 | 82 | currentDesc = prometheus.NewDesc(prefix+"current_ampere", "Current input value. Unit: Ampere", sensorLabels, nil) |
81 | 83 |
|
82 | | - powerPresent = prometheus.NewDesc(prefix+"power_present", "Is Power Present. 1 = present, 0 = missing", sensorLabels, nil) |
83 | | - powerAllOk = prometheus.NewDesc(prefix+"power_all_ok", "Is PSU Ok. 1 = OK, 0 = KO", sensorLabels, nil) |
| 84 | + powerWatt = prometheus.NewDesc(prefix+"power_watt", "Current Usage. Unit: Watt ", sensorLabels, nil) |
| 85 | + powerPresent = prometheus.NewDesc(prefix+"power_present", "Is Power Present. 1 = present, 0 = missing", sensorLabels, nil) |
| 86 | + powerAllOk = prometheus.NewDesc(prefix+"power_all_ok", "Is PSU Ok. 1 = OK, 0 = BAD, -1 = POWERED OFF, -2 NOT DETECTED", sensorLabels, nil) |
| 87 | + powerAllOkPrev = prometheus.NewDesc(prefix+"power_all_ok_prev", "Is PSU Ok (Previous State). 1 = OK, 0 = BAD, -1 = POWERED OFF, -2 NOT DETECTED", sensorLabels, nil) |
84 | 88 |
|
85 | 89 | rawValueDesc = prometheus.NewDesc(prefix+"raw_sensor_reading", "Arbitrary sensor reading, see labels on how to interpret this value", []string{"description"}, nil) |
86 | 90 | } |
@@ -126,8 +130,10 @@ func (*Collector) Describe(ch chan<- *prometheus.Desc) { |
126 | 130 | ch <- currentCriticalMaxValue |
127 | 131 | ch <- currentDesc |
128 | 132 |
|
| 133 | + ch <- powerWatt |
129 | 134 | ch <- powerPresent |
130 | 135 | ch <- powerAllOk |
| 136 | + ch <- powerAllOkPrev |
131 | 137 | } |
132 | 138 |
|
133 | 139 | func (*Collector) Name() string { |
|
0 commit comments