Node_exporter: S.M.A.R.T monitoring

Created on 26 Feb 2017  路  4Comments  路  Source: prometheus/node_exporter

I would like to be able to extract smart metrics from my HDDs mainly to detect failures. I'm motivated to create a new Linux collector for that purpose, the issue is that the only way to extract these info is to run the smartctl utility as root and then parse its output, which is not great.

So in order to allow the node_exporter to run this particular command as root means to have previously configured some sudo magic on the host itself.

Does it make sense to you ? What would you recommend ?

Most helpful comment

All 4 comments

I believe the recommended way to do this at the moment is to use a combination of smartctl with the textfile collector. I do have some (experimental) code that pulls SMART metrics from drives using pure Go, but it also requires root.

With either option, it seems like the textfile collector is the recommended option.

Because of policy, the node_exporter is not allowed to spawn any processes (there are some deprecated collectors that do, they will be removed soon).

We have implemented a textfile helper script included in this repo to provide SMART stats.

https://github.com/prometheus/node_exporter/blob/master/text_collector_examples/smartmon.sh

Because of policy, the node_exporter is not allowed to spawn any processes (there are some deprecated collectors that do, they will be removed soon).

We have implemented a textfile helper script included in this repo to provide SMART stats.

https://github.com/prometheus/node_exporter/blob/master/text_collector_examples/smartmon.sh

An updated location of this is now:
https://github.com/prometheus-community/node-exporter-textfile-collector-scripts/blob/master/smartmon.sh

Was this page helpful?
0 / 5 - 0 ratings