@@ -109,6 +109,7 @@ func (smart *SMARTctl) Collect() {
109109 smart .mineNvmeCriticalWarning ()
110110 smart .mineNvmeMediaErrors ()
111111 smart .mineNvmeNumErrLogEntries ()
112+ smart .mineNvmeVolatileMemoryBackupFailed ()
112113 smart .mineNvmeBytesRead ()
113114 smart .mineNvmeBytesWritten ()
114115 }
@@ -382,6 +383,21 @@ func (smart *SMARTctl) mineNvmeNumErrLogEntries() {
382383 )
383384}
384385
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+
385401// https://nvmexpress.org/wp-content/uploads/NVM-Express-NVM-Command-Set-Specification-1.0d-2023.12.28-Ratified.pdf
386402// 4.1.4.2 SMART / Health Information (02h)
387403// 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() {
472488 if smartStatus .Exists () {
473489 smart .ch <- prometheus .MustNewConstMetric (
474490 metricDeviceSmartStatus ,
475- prometheus .GaugeValue ,
491+ prometheus .CounterValue ,
476492 smartStatus .Get ("passed" ).Float (),
477493 smart .device .device ,
478494 )
0 commit comments