elastic / beats

:tropical_fish: Beats - Lightweight shippers for Elasticsearch & Logstash
https://www.elastic.co/products/beats
Other
12.13k stars 4.91k forks source link

Collect SMART data with metricbeat #8614

Open jsoriano opened 5 years ago

jsoriano commented 5 years ago

Data provided by SMART is useful to detect failures on disks or to prevent incidences caused by disk degradation. It'd be nice to add a system metricset that collects this information.

SMART data is usually collected using smartmontools, we may need to find a golang-based alternative for that.

sayden commented 5 years ago

I found this library that could potentially help with the implementation https://github.com/dswarbrick/smart

jsoriano commented 5 years ago

Other option could be to parse smartd logs with filebeat.

recrsn commented 5 years ago

I would like to work on this

jsoriano commented 5 years ago

@agathver great! I don't think anyone is working on this yet, so you are welcome to start with this :slightly_smiling_face:

What is the approach you want to try?

Thanks!

recrsn commented 5 years ago

@jsoriano I feel the smartmontools approach is more robust and mature. The Go library will be easier but has a warning of being experimental.

We already have other modules which require additional software, so this should not be an issue IMO.

jsoriano commented 5 years ago

How would you use smartmontools? I think we don't have other modules executing commands at the moment and I'd say we don't want to make an exception here. If we can use it as library, query a daemon, or parse their logs I think we'd be fine.

jsoriano commented 5 years ago

I agree in any case that using smartmontools if possible would be preferable to other options.

recrsn commented 5 years ago

My initial idea was to parse the output of smartctl. The other alternative is to parse logs by smartd which goes into syslog.

cskowronnek commented 4 years ago

Any news here? Is there a way to pull SMART data from Windows devices?

fearful-symmetry commented 4 years ago

This sounds fun to pick up. I need to look into how smartctl works, but if it's just doing ioctl calls to some disk device it probably won't be that hard to re-implement.

recrsn commented 4 years ago

@fearful-symmetry You can take a look at WMI as well, it provides SMART data as well

botelastic[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

guillaumedsde commented 3 years ago

kind bump :) I'd be quite interested in this feature

suprematis commented 3 years ago

Bump here too!!

fearful-symmetry commented 3 years ago

Gonna keep this open and see if we can at least keep it on our radar.

PrplHaz4 commented 3 years ago

this sounds like it could be related to #20562

HugoKuo commented 2 years ago

bump! This will be very useful for AI modeling to detect potential failure disk.

LMey commented 2 years ago

Is there any chance that the WMI functionality from Logstash could be moved into metricbeats?

Reasons: As I understand logstash is a central function. So using this requires remote calls and security configuration metric beat is where metrics are collate and set through to elastic. So why go somewhere else for your metrics.

It is also requested here: https://github.com/elastic/beats/issues/29072