mirror of
https://github.com/prometheus-community/smartctl_exporter.git
synced 2024-11-23 01:43:07 +01:00
parent
895bf1eeb3
commit
9698c581b3
1 changed files with 0 additions and 11 deletions
11
smartctl.go
11
smartctl.go
|
@ -68,7 +68,6 @@ func (smart *SMARTctl) Collect() {
|
||||||
smart.minePowerCycleCount()
|
smart.minePowerCycleCount()
|
||||||
smart.mineDeviceSCTStatus()
|
smart.mineDeviceSCTStatus()
|
||||||
smart.mineDeviceStatistics()
|
smart.mineDeviceStatistics()
|
||||||
smart.mineDeviceStatus()
|
|
||||||
smart.mineDeviceErrorLog()
|
smart.mineDeviceErrorLog()
|
||||||
smart.mineDeviceSelfTestLog()
|
smart.mineDeviceSelfTestLog()
|
||||||
smart.mineDeviceERC()
|
smart.mineDeviceERC()
|
||||||
|
@ -383,16 +382,6 @@ func (smart *SMARTctl) mineLongFlags(json gjson.Result, flags []string) string {
|
||||||
return strings.Join(result, ",")
|
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() {
|
func (smart *SMARTctl) mineDeviceErrorLog() {
|
||||||
for logType, status := range smart.json.Get("ata_smart_error_log").Map() {
|
for logType, status := range smart.json.Get("ata_smart_error_log").Map() {
|
||||||
smart.ch <- prometheus.MustNewConstMetric(
|
smart.ch <- prometheus.MustNewConstMetric(
|
||||||
|
|
Loading…
Reference in a new issue