mirror of
https://github.com/prometheus-community/smartctl_exporter.git
synced 2024-12-21 02:21:55 +01:00
Merge pull request #137 from tekert/remove_duplicate2
Remove duplicate smartctl_device_status metric
This commit is contained in:
commit
8331d7f6a9
2 changed files with 0 additions and 19 deletions
|
@ -227,14 +227,6 @@ var (
|
|||
},
|
||||
nil,
|
||||
)
|
||||
metricDeviceStatus = prometheus.NewDesc(
|
||||
"smartctl_device_status",
|
||||
"Device status",
|
||||
[]string{
|
||||
"device",
|
||||
},
|
||||
nil,
|
||||
)
|
||||
metricDeviceErrorLogCount = prometheus.NewDesc(
|
||||
"smartctl_device_error_log_count",
|
||||
"Device SMART error log count",
|
||||
|
|
11
smartctl.go
11
smartctl.go
|
@ -68,7 +68,6 @@ func (smart *SMARTctl) Collect() {
|
|||
smart.minePowerCycleCount()
|
||||
smart.mineDeviceSCTStatus()
|
||||
smart.mineDeviceStatistics()
|
||||
smart.mineDeviceStatus()
|
||||
smart.mineDeviceErrorLog()
|
||||
smart.mineDeviceSelfTestLog()
|
||||
smart.mineDeviceERC()
|
||||
|
@ -388,16 +387,6 @@ func (smart *SMARTctl) mineLongFlags(json gjson.Result, flags []string) string {
|
|||
return strings.Join(result, ",")
|
||||
}
|
||||
|
||||
func (smart *SMARTctl) mineDeviceStatus() {
|
||||
status := smart.json.Get("smart_status")
|
||||
smart.ch <- prometheus.MustNewConstMetric(
|
||||
metricDeviceStatus,
|
||||
prometheus.GaugeValue,
|
||||
status.Get("passed").Float(),
|
||||
smart.device.device,
|
||||
)
|
||||
}
|
||||
|
||||
func (smart *SMARTctl) mineDeviceErrorLog() {
|
||||
for logType, status := range smart.json.Get("ata_smart_error_log").Map() {
|
||||
smart.ch <- prometheus.MustNewConstMetric(
|
||||
|
|
Loading…
Reference in a new issue