@@ -109,6 +109,7 @@ func (smart *SMARTctl) Collect() {
109
109
smart .mineNvmeCriticalWarning ()
110
110
smart .mineNvmeMediaErrors ()
111
111
smart .mineNvmeNumErrLogEntries ()
112
+ smart .mineNvmeVolatileMemoryBackupFailed ()
112
113
smart .mineNvmeBytesRead ()
113
114
smart .mineNvmeBytesWritten ()
114
115
}
@@ -382,6 +383,21 @@ func (smart *SMARTctl) mineNvmeNumErrLogEntries() {
382
383
)
383
384
}
384
385
386
+ func (smart * SMARTctl ) mineNvmeVolatileMemoryBackupFailed () {
387
+ nvmeStatus := smart .json .Get ("smart_status.nvme" )
388
+ if nvmeStatus .Exists () {
389
+ volatileMemoryBackupFailed := nvmeStatus .Get ("volatile_memory_backup_failed" )
390
+ if volatileMemoryBackupFailed .Exists () {
391
+ smart .ch <- prometheus .MustNewConstMetric (
392
+ metricDeviceVolatileMemoryBackupFailed ,
393
+ prometheus .CounterValue ,
394
+ volatileMemoryBackupFailed .Float (),
395
+ smart .device .device ,
396
+ )
397
+ }
398
+ }
399
+ }
400
+
385
401
// https://nvmexpress.org/wp-content/uploads/NVM-Express-NVM-Command-Set-Specification-1.0d-2023.12.28-Ratified.pdf
386
402
// 4.1.4.2 SMART / Health Information (02h)
387
403
// The SMART / Health Information log page is as defined in the NVM Express Base Specification. For the
@@ -472,7 +488,7 @@ func (smart *SMARTctl) mineSmartStatus() {
472
488
if smartStatus .Exists () {
473
489
smart .ch <- prometheus .MustNewConstMetric (
474
490
metricDeviceSmartStatus ,
475
- prometheus .GaugeValue ,
491
+ prometheus .CounterValue ,
476
492
smartStatus .Get ("passed" ).Float (),
477
493
smart .device .device ,
478
494
)
0 commit comments