windows_exporter icon indicating copy to clipboard operation
windows_exporter copied to clipboard

Feature Request: SMART-values

Open chrisgraf opened this issue 7 years ago • 10 comments

the SMART values should pr provided by WMI according to https://exchange.nagios.org/directory/Plugins/Operating-Systems/Windows/NRPE/check_smartwmi-SMART-Monitoring-for-Windows-by-using-builtin-WMI/details

that would be great!

chrisgraf avatar May 24 '17 13:05 chrisgraf

This should be doable! Thanks for the suggestion.

martinlindhe avatar May 25 '17 07:05 martinlindhe

I started work on this, but we need to resolve https://github.com/StackExchange/wmi/pull/30 before we can finish this off, the issue is the library we are using for talking WMI lacks the support for the data type used by the SMART data values.

I will push the initial work, but it will lack most of the functionality with regard to SMART values as compared to https://exchange.nagios.org/directory/Plugins/Operating-Systems/Windows/NRPE/check_smartwmi-SMART-Monitoring-for-Windows-by-using-builtin-WMI/details

martinlindhe avatar Aug 10 '17 03:08 martinlindhe

Also, the WMI query seems to require admin rights, so you will need to configure the running account accordingly. You can test your permissions using this query:

gwmi -namespace root\wmi -class MSStorageDriver_ATAPISmartData

if it returns data, you should be able to use the "smart" collector of wmi_exporter. Otherwise you should get gwmi : Access denied

martinlindhe avatar Aug 10 '17 03:08 martinlindhe

I tried to execute your test-query but even as local administrator I get the Access denied message. What additional privileges do I need to have to execute the query? How can these be added to the exporter service once it has the smart export feature enabled?

chrisgraf avatar Jan 12 '18 16:01 chrisgraf

The pr in upstream StackExchange/wmi has been merged and vendor updated in https://github.com/martinlindhe/wmi_exporter/commit/df0db7a54f15d76e12840c9c6ac755748a64ae65#diff-9d82496a83fa4e47d10aefb501c99b4e

martinlindhe avatar Mar 13 '18 20:03 martinlindhe

What's the status of this?

johtso avatar May 14 '21 11:05 johtso

@johtso abandoned. You could resume work on https://github.com/prometheus-community/windows_exporter/pull/108

martinlindhe avatar May 14 '21 14:05 martinlindhe

@martinlindhe thanks for clarifying! I think I'll see if I can get the data using the NewRelic PerfMon integration.. https://github.com/newrelic/nri-perfmon

johtso avatar May 14 '21 19:05 johtso

I am no Windows expert, but I just found a little information about this.

Something like: Get-Disk | Get-StorageReliabilityCounter | Select-Object -Property "*" should get a list with items like:

ReadErrorsUncorrected : 0 WriteErrorsUncorrected : 0 ...

You wouldn't need anything like "add support for []uint8 slices" for that. The Node Exporter for Linux/Unix seems to export one metric per S.M.A.R.T. attribute found, so the Windows Exporter could just export one metric for ReadErrorsUncorrected, another one for WriteErrorsUncorrected, and so on.

There is also this flag, at least on modern versions of Windows:

(Get-WmiObject -Namespace root\wmi –Class MSStorageDriver_FailurePredictStatus).PredictFailure

I have read that this is a boolean flag. That could be exported as a separate metric too.

rdiez avatar Nov 21 '21 22:11 rdiez

I don't know how much value would my comment add here. There is a project that can collect SMART data from windows, Scrutiny, which in reality uses smartmontools.

stavros-k avatar Jul 01 '22 14:07 stavros-k

Yearly visit to pray for this.

tekert avatar Jun 24 '23 03:06 tekert

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

github-actions[bot] avatar Dec 24 '23 02:12 github-actions[bot]